Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

.NET6 SDK must be always updated?
Marcello
#1 Posted : Friday, September 2, 2022 8:49:56 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 9/16/2019(UTC)
Posts: 42
Location: Italy

Was thanked: 3 time(s) in 3 post(s)
Hello,

We have 2 different machines with server grids, but only on one of them do we always need to update VS Build Tools to get the latest .NET6 Sdk every time one developer updates his own Visual Studio.
Why does this happen? What should I check to avoid updating .NET6 Sdk every time?
I'm using NCrunch v4.14.0.7

Listed below is a snippet of the output error after updating my local Visual Studio to the latest version 17.3.2 (NCrunch server has installed Visual Studio Build Tools version 17.2.6):

Marcello
#2 Posted : Friday, September 2, 2022 10:34:02 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 9/16/2019(UTC)
Posts: 42
Location: Italy

Was thanked: 3 time(s) in 3 post(s)
Since I had to go ahead with my work, I updated the Visual Studio Build Tools on the server machine and rebooted the machine, and now I get the below error anyway :(

Marcello
#3 Posted : Friday, September 2, 2022 11:55:30 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 9/16/2019(UTC)
Posts: 42
Location: Italy

Was thanked: 3 time(s) in 3 post(s)
Hi again,

Deleting the .vs hidden folder and all the *ncrunch* files the error disappeared.

Listed below is the batch I used

Code:
FOR /d /r . %%d IN (.vs) DO @IF EXIST "%%d" rd /s /q "%%d"
del /s .\*.ncrunch*


Could it be that this batch should be locally run every time I update Visual Studio?
Remco
#4 Posted : Friday, September 2, 2022 1:12:30 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,636

Thanks: 873 times
Was thanked: 1184 time(s) in 1104 post(s)
Thanks for sharing this.

It's difficult to draw any firm conclusions on this given the unfathomable complexity of MS's build system and the speed with which they're changing it, but my best guess is that VS was caching dependency details in a manner that was causing a different resolution path for platform packages that are involved in your local build. Since NCrunch would have been pulling this same data out when trying to align itself with the grid node, this would cause an inconsistency between the client machine and the grid node.

With the speed that new platform versions are being released, we really have no way to warrant which platform versions can interoperate across a grid. In many cases, it seems to be dependent on the environments involved or the packages being used. The best way to avoid problems is to do your best to keep your client and the grid node as consistent as possible in the versions of the toolset you have involved. This applies to both the version of VS/MSBuild and also that of the Dotnet SDK. We do our best to warn whenever the toolset appears to be inconsistent.

I realise this can create big problems when working on a team that may update tooling inconsistently (i.e. maybe you have one grid client running one version, another running a different one), but remember that under the hood the difference between minor versions of a platform can be massive in terms of build logic and dependency resolution.

I do also recommend doing a clean of your solution every time you update your VS or Dotnet toolset. Otherwise really crazy things happen :(
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.052 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download