Weird Error: Failed to emit module

I recently upgraded to Windows 10 and had to establish Visual Studio 2015 again with the Netduino files prescribed in “Getting Started”. There were no drivers provided, so I had to Google back to the old Netduino forums to get them from an old post. I’m not sure if they are even compatible with my Netduino 3 wifi, but the PC does see the device as a Netduino.

When trying to deploy old code that worked fine in the past, I get the following error:

Error CS7038 Failed to emit module ‘NetduinoFingerPrintLCD’.

It doesn’t give any more info. Anyone see this before?

-Sean

Did you install the Netduino SDK from the downloads page? That should have installed the drivers.

What post did you grab the drivers from?

Did you clean and rebuild the code? That error is a strange one.

I had the same problem. It was the following that caused it for me: foreach (char letter in value) where value is a string.

1 Like

Thank you Michael_Riley, I was dead in the water with the ‘failed to emit module’ error on 2500 lines of unfamiliar code. I’m using the NanoFramework to compile for an ESP32. I had one instance of a foreach(char c in str), and when I commented it out, the code compiled without error! You’re a hero.

Thank you @Michael_Riley this solved my problem too… I had:

foreach (char _chr in _input)

Where _input was a string and which worked previously and changed it to:

foreach (char _chr in _input.ToCharArray())

Now it compiles again (have yet to try deploying)

Thanks
Joe