Using Visual Studio 2015

Last modified July 25, 2016

Micro Framework has several incompatibilities with Visual Studio 2015. As a result, we do not officially support it for use with our SDK. However, with our limited investigation and changes Microsoft has pushed to GitHub, we have produced a completely unsupported patch that appears to resolve most issues; use is entirely at your own risk. If you run into any issues when using the patch, the safest route is to reinstall our SDK and everything related to Micro Framework and use Visual Studio 2013.

The first issue is around the new C# and VB compiler. It has been observed generating IL that is not supported by Micro Framework. This can manifest itself in any number of ways, some very subtle or seemingly impossible, and will not always throw an exception. This may be nearly impossible to track down or reliably reproduce. While we no longer observe the incorrect IL in our test cases as of Visual Studio 2015 Update 2, the possibility of unsupported IL being generated remains. The fix is to tell Micro Framework to use the previous unsupported legacy compilers.

The second issue is broken support for Visual Basic, partially caused by the fix for the first issue. Visual Studio complains that it cannot find the Microsoft.VisualBasic runtime. The fix for this is to rework how the runtime and mscorlib are resolved. Be aware that the emulator does not work with Visual Basic in all versions of NETMF.

The third issue is that Visual Studio can fail to compile a project due to issues with rulesets. The fix is to disable the code analysis rule set.

The last issue is that deployment and debugging can sometimes fail. This most often occurs with G400 based products. There is no known fix at this time.

To apply the patch, download Extract the files inside and replace the files found at C:\Program Files (x86)\MSBuild\Microsoft\.NET Micro Framework\v4.3 with the extracted files (Emulator.targets and Tasks.settings are not changed). Make sure Visual Studio is closed while doing so. You may wish to create a backup of the files that will be overwritten so you can easily undo the patch.

Be aware that this patch only fixes NETMF 4.3. The same issues exist with all other earlier versions. While we do not provide a patch for those versions, the same fix may work.

Our patch was adopted from changes made in To see what exact changes were made, compare the above patch with the original files.

Leave feedback about this document.
Let us know if the information presented here was accurate, helpful and if you have any suggestions.
Leave feedback about this document.
Let us know if the information presented here was accurate, helpful and if you have any suggestions.

* Indicates required fields.
This form is only for feedback not support.
Review our how to find information guide on locating helpful resources.