Progress & hurdles with Netduino on VS2017

OK so finally dedicated about 4hrs to mucking around with this.

Using the various tips around the web, I got the basics setup on VS2017, specifically the links that have been posted before: http://informatix.miloush.net/microframework/Articles/VS2017SDK.aspx

I’m not so sure WHY this whole solution hasn’t been made an “official” bundle here, seems like the usual stupid Netduino thing where there’s a flurry of activity then the most obvious projects never get completed or updated to the latest software releases, but there you go. Its not so bad… install all the core NETMF stuff, then install those 2 files, then hand copy the MSBUILD files over to the correct directories, and… things looked OK - at least in terms of VS2017 showing valid choices for the older NETMF version platforms.

Except… when I went to try to import my old VS2010 projects. OK I could compile fine for MF4.4 but of course not 4.2 or 4.3 so lot of good that does me… (again… why no firmware for 4.4 yet despite it being out for 3-4 years now or whatever? Netduintarded.)

I would get a host of errors trying to rebuild the projects under either legacy version. Mostly BC2017 “could not find” type stuff despite the exact path listed being verifiable and legit. References and imports all looked and should have been totally fine in the IDE, but the errors were still there.

Here’s where I should sheepishly add that I was probably part of the schtoopit .001% of people in the original-Netduino-era who’d ever tried to develop using VB instead of C#. That had often proven to be a mistake but I kept thinking I’d get over some hurdles (specifically a massive lack of documentation and inconsistency w/ the C# implementation and examples…) and so I had a couple apps in VB. About the time I abandoned Netduino between a combo of total annoyance and time conflicts, I had been intending to ditch VB and use C# like everybody else, but I did get pretty pissed off at what a crappy poorly supported platform it was and so it went into cold storage until last year…

After a good deal of searching around I dug deeper into it and found that the VisualBasic.targets files in the older msbuild directories were significantly different to the v.4.4 version. So I copied the 4.4 VisualBasic.targets file -> v.4.2 and v.4.3 directories, edited the one key version text string pointing to the correct directories, and… voila. Well almost. Down to only one error message. BC2000, which is basically duplicate Import statements, specifically for mscorlib. Deleted the mscorlib ref/import for the project, no help. In my one stupid source file there is no Import for it. Where is the stupid thing coming from… Thinking again about the msbuild files, I found import sections for mscorlib in Device.targets and deleted those. Voila2, can haz compiles.

Im too annoyed to go get the hardware at the moment so havent deployed yet to see if it actually works but at least it compiles. So it could still be a poopshow but i’m allowing myself a momentary celebration anyway.

Now I’m pretty sure I’ll have to do the same thing in CSharp.targets to get apps to compile there (aka copy the 4.4 version over and change version string for the directory…) but hopefully that was what was needed…?

If anybody has any watchouts or “no its not going to work”’ or “you should have done X instead” or “you are an idiot”, that would be much appreciated, this was definitely hacking around in a fairly hamfisted manner… I meantime hell maybe I will be able make this hardware useful again…

1 Like

What board are you trying to use?
I have basic 4.4 ports for N3 and N2+

1 Like

Hey Justin - Sorry just got back to this project… Finally got it compiling and loading to the board via VS2017 - in v.4.3 - so needed to be sure this was all working OK.

Yeah its an N2+.

1 Like

Excellent work, now you can move on to 4.4 :slight_smile:

Small update:

Updates from MS seem to keep breaking VS and killing the NetduinoSDK. Will not recognize the device anymore, even if it is recog’d in Windows just fine.

Just in case anybody else has the problem of suddenly getting “Device: none”…

Reloading NetduinoSDK yet again seems to do the job. I am thinking about putting the NetduinoSDK-install-repair task into a Windows Startup routine :roll_eyes:

Justin do you have info on 4.4 and how to get it working? Wondering if it will be a little less update-breaky than 4.3… And now of course MS is urging me to go to VS2019 (which probably will reformat your local storage or something if it sees .SPOT installed) :stuck_out_tongue_winking_eye:

I will look in the spare parts draw and if I can find an n2+ I can create a 4.4 firmware which you can use in 2017.

If it helps anybody else - had all kinds of problems deploying & debugging. Debugger wouldn’t attach at all, and annoyingly some programs would deploy, others would not…

Two things seem to have helped. Loading the pervasive NETMF extension…
https://marketplace.visualstudio.com/items?itemName=PervasiveDigitalLLC.pdnetmf-extension&ssr=false#overview

And then changing the USB connection used on the PC. Must be something about internal cascaded hubs or something.

Now I seem to be back to be able to compile and deploy and debug 4.3 code. I still get a /ruleset warning despite adding the following to the .csproj (used to be an error now just a warning) but at least ‘it works’.

<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>