Update project to new version

What’s the best way to update a project to a new version of driver/libraries etc?

I flashed the device with the new version but when I use Nuget to update, the mscorlib error always gets thrown up.

I deleted the BIN and OBJ directories but still get this error.

[Error||The assembly ‘mscorlib, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null’ has been referenced multiple times with different versions.

Could you show me the all nugets references to so I can take a look? A screenshot that fine.

Hi Dave, Martin sent me this some months ago when I was having mscorlib issues:

In addition to packages/, bin/, and obj/, don’t forget that intellisense may hide another copy of mscorlib in your .vs/ directory. The .vs directory is a child of your solution directory and may be marked ‘hidden’.

And FWIW, I looked into how to solve this in a durable fashion by fixing various msbuild scripts, but it turned out to be a much bigger task than I expected. It might be fixable by changing the TinyCLR build files into the new Sdk package format. It’s like a hole in the roof - I don’t think about it when it is not raining, and when it’s raining, I just grab a bucket because I don’t have time to do the proper fix.

1 Like

Turns out it was because I had included one of the libraries as source code as I had been making changes to get the Modbus library working and once I removed this and used Nuget to load the new one, it builds and runs.

That was what we think. That why we wanted to look at your references :)).

Glad to hear everything is ok now.