While TinyCLR OS is our focus going forward, we understand that many products are already complete with NETMF and in active use in the field that need occasional tweaks. Of course you can use VS2013 or VS2015 with the official NETMF extensions, but sometimes it’s just easier to use VS2017 instead of maintaining multiple old installs. Unfortunately, there isn’t an official VS2017 extension for NETMF, but it is possible to tweak the official beta one for VS2015 so that it works in VS2017 in an unsupported fashion. We did test this out ourselves so wanted to share it here, even if we can’t official support it or make it available.
To get started, you need to get the VS2015 extension from the NETMF 4.4 release (it’s called NetMFVS14.vsix
). You can find this in the CodePlex archive. VSIX files are actually just zip archives with a different extension. So you can either change the extension to zip and extract its contents to a folder or use an archiving tool to open it.
Look for an open the file extension.vsixmanifest
. It’s a plaintext file, so a program like Notepad++ can edit it. It should look like this:
You need to change a few things inside it. On line 14, change the version so that it looks like Version="[15.0,)"
. Then on line 18 change the MPF version to 15 as well. It should be <Dependency Id="Microsoft.VisualStudio.MPF.15.0" DisplayName="Visual Studio MPF 15.0" Version="[15.0]" />
.
In the same folder delete the _rels
folder (this contains the digital signature that is now invalid since we changed the contents). Go ahead and rezip all of the files and change the extension back to VSIX. Make sure you don’t create a top-level folder in the archive. The archive should contain all of the existing files and folders directly at the top level. When you go to install you’ll get a warning that the extension may not be compatible, you can go ahead and ignore it. Make sure to also install the NETMF 4.3 and GHI SDKs as well.
You can go ahead and create a NETMF project just like you would before. By default it’ll use NETMF 4.4, you can change it to 4.3 in the usual way. You’ll get build errors though, that it can’t find .NET 4.3 assemblies. This is because MSBuild has changed how it works in the latest VS2017 updates. To fix it, open the csproj
file and find the property NetMfTargetsBaseDir
. You need to replace $(MSBuildExtensionsPath32)
with the actual path of where NETMF installs the files. On my computer it is C:\Program Files (x86)\MSBuild
and the entire updated line looks like <NetMfTargetsBaseDir Condition="'$(NetMfTargetsBaseDir)'==''">C:\Program Files (x86)\MSBuild\Microsoft\.NET Micro Framework\</NetMfTargetsBaseDir>
.
Save the csproj
and reopen the project in Visual Studio. You should now be able to deploy and debug! You will need to edit every csproj
file that you want to open in VS2017 like this.
We’ve also made all of the installers from our latest 2016 R1 SDK available in a zip archive so you can bypass the master installer and the bootloader tools. You can find it on the NETMF downloads page. Keep in mind that the above steps are not supported by us or by Microsoft, use is entirely at your own risk. Parts may not work or it may not work at all now or at some point in the future.