There is supposed to be Assembly.GetExecutingAssembly().GetManifestResourceString
it is not there .... There is the standard GetManifestResourceStream...
I tried to use that, BUT THERE IS ALSO NO System.IO StreamReader.
How can i easily read an embed text file if i can pull as a string and i cant use a StreamReader?
I am force to use low level stream io and byte conversion
Just to let you know, in DuoCode 1.1 we added support for System.IO.BinaryReader over MemoryStream.
Thats weird... My visual studio projects has them... But my mono builds dont.... I will see whats going on in mono packages.
I can confirm that on our side all these methods introduced almost 2 months ago, can you please recheck.
In your project please check that reference to mscorlib is v1.0.1355.0, and check reference path in Properties window too.
Also try to create new HelloDuoCode template and check this line:
var buffer = Assembly.GetExecutingAssembly().GetManifestResourceBytes();
Also phisycally check the version of dcc.exe in packages folder.
Hope this helps.
yep using 1.0.1355
<package id="DuoCode" version="1.0.1355.0" targetFramework="net45" />
But no "String" just STREAM... No Bytes either... Just Stream
Assembly.GetExecutingAssembly().GetManifestResourceString(name) is present in DuoCode version 1.0, are you using latest version.
Also you can use
GetManifestResourceBytes(name) method, which returns byte array (which is typed Uint8Array in JS).
See also DataView for byte level access in JS, similar to StreamReader in .NET.
using DuoCode.Dom; byte bytes = asm.GetManifestResourceBytes("some_resource"); Uint8Array array = bytes.As<Uint8Array>(); DataView dv = new DataView(array.buffer); float firstFloat = dv.getFloat32(0);
Hope this helps, and please stay tuned v1.1 is released very soon.