I was trying to port over some code from .NETMF to TinyCLR OS and was not sure what to substitute Microsoft.SPOT.ResourceUtility.GetObject() with. Below is an example of Microsoft.SPOT.ResourceUtility.GetObject() being used in my project.
I would recommend recreating your resources file instead and let the tool generate the codebehind for you. TinyCLR resources were changed from NETMF’s to more closely align with the desktop.
I have encountered another problem related to this topic and was wondering if anyone had a solution for it. I am trying to make new XmlReader instance using a memory stream that contains data from a binary resource file, but it keeps throwing an argumentNullexception followed by a CS7069 error. I was wondering how I can go about fixing this since System.IO.TestReader is not part of mscorlib in TinyCLR OS. Below is the line of code and the error.
It’s probably because you added a reference to an XML library not meant for TinyCLR. That library is built against a different mscorlib, hence the error about TextReader.
The .NET Core Framework source may be a good place to start for an XML implementation. The problem with NETMF’s is that it was integrated into the core so there’s not much managed code to use. We don’t have a timeline on when, or if, System.Xml will return.
BinaryReader isn’t in the current release. We will be looking into it though. In the mean time, GHIElectronics.TinyCLR.Storage.Streams.DataReader may be useful to you.