I have a number of projects that target .NET Micro Framework 4.3.2. I developed them in Visual Studio 2013. I've just upgraded to Visual Studio 2015, and now I'm getting odd problems with the same code that used to compile and run.
Specifically, I've started getting this error:
CS1579 foreach statement cannot operate on variables of type 'string' because 'string' does not contain a public definition for 'GetEnumerator'
And fair enough, it doesn't seem to. But this worked when I developed the code. It is compiled, pushed to NuGet and working in several other projects, so it MUST have worked.
So, why did this stop working in Visual Studio 2015? I have many projects that use this idiom to iterate through the characters in a string, I hope I'm not going to have to change them all... :(