hmmm just stumbled on something that has be a bit ???
Changed a few lines of code in multiple projects in same solution and the could not build the TinyCLR Library all the other projects depended on.
Had me chasing tail for a bit!! As didnt keep track of changes and OF COURSE I have no Version Control set up as … well…
Anyway, found it, and it turns out if I reproduce same code in a NEW Blank TinyCLR Library v1.0.0 TinyCLR.Core (referenced only), VS2019 v16.2.5 I get same error
Can anyone else reproduce?
namespace TinyCLRClassLibrary1
{
public class Class1
{
private void RemoveCRLF(string text)
{
string aString = “Weeee”;
byte[] bBytes = new byte[4] {1,2,3,4 };foreach (byte b in bBytes) { } foreach (char c in aString) /* This is what cause emit error */ { } }
}
}
Build and get Error
"CS7038 Failed to emit module ‘TinyCLRClassLibrary1’
Remark out the foreach(char … and builds
Am I missing something obvious?