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: 70
Location: Italy

Thanks: 1 times
Was thanked: 4 time(s) in 4 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: 70
Location: Italy

Thanks: 1 times
Was thanked: 4 time(s) in 4 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: 70
Location: Italy

Thanks: 1 times
Was thanked: 4 time(s) in 4 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,968

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 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 :(
Marcello
#5 Posted : Wednesday, October 12, 2022 8:08:37 AM(UTC)
Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Hi Remco,

Even if we keep the Visual Studio Build Tools updated on NCrunch Grid nodes, we often still get issues building our projects.

Today, for example, I cannot understand why a couple of projects cannot be built on NCRUNCH server anymore. Please have a look at this video: https://www.screencast.com/t/kLiULrytFW

As you can see it gives errors building ImageSharp project on NCRUNCH server, but I cannot understand why it hangs on NET6 SDK when the project is configured to be built against .Net Framework 4.7.2 only.

Currently, we're using NCrunch 4.14.0.7 and really we need a way to avoid issues like this. I understand your point about "the speed that new platform versions are being released", but it's becoming really onerous to continue to use NCrunch for testing purpose.

Please, let me know your thoughts about this and if there is a way to avoid those problems at all.
Remco
#6 Posted : Wednesday, October 12, 2022 9:48:03 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi, thanks for sharing this video. It looks like somehow the nuget package is being intermittently removed from the node.

When this happens, does reconnecting to the node from the client (by cycling the node on and off via the distributed processing window) temporarily suppress the problem?

If not, does recycling the node via the button in the distributed processing window make any difference?
Marcello
#7 Posted : Wednesday, October 12, 2022 10:57:30 AM(UTC)
Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Removing this flag and enabling it again does NOT solve the issue
Marcello
#8 Posted : Wednesday, October 12, 2022 11:00:13 AM(UTC)
Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Neither restarting the client helps :(
Marcello
#9 Posted : Wednesday, October 12, 2022 11:06:49 AM(UTC)
Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Trying to Restart Service from Distributed Processing makes it dead at all :(

I had to connect to the remote server and manually start the NCrunch service: now the project builds.
As far as you can understand, we cannot do this every time... is there nothing else I can do in a case like this?
Remco
#10 Posted : Wednesday, October 12, 2022 10:22:15 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Can you confirm whether this seems to always affect the same package, or does it seem to be a different package every time?

Also, how often does the problem appear?
Marcello
#11 Posted : Thursday, October 13, 2022 2:08:35 PM(UTC)
Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Hi Remco,

No, the package is not always the same.

Today, for example, I'm in trouble with the below one.

Code:
..\..\..\..\Program Files\dotnet\sdk\6.0.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets (267, 5): Package System.IO, version 4.3.0 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
Remco
#12 Posted : Thursday, October 13, 2022 11:32:24 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Can you confirm for me the following:

- How often does this problem appear? (a rough guess is fine)
- Is the effected node being shared by multiple users?
- If so, do the missing versions of the packages have binary differences between the users of the effected node? (i.e. at binary level, do the directories containing these files on the users machines contain different files or different binary footprints of the files such that a calculated hash would be different? I suggest using a tool like KDiff to check this)
Marcello
#13 Posted : Friday, October 14, 2022 6:44:19 AM(UTC)
Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
- Currently, at least a couple of times every day on different developer machines
- Yes, the node is shared by multiple users. The issue comes on different nodes as well.
- Consider that every developer can work on a different branch, but for the same branch all the developers have the same packages. What can be different is the Visual Studio version: not always we're able to keep all developer machines up to date with the latest version.
Remco
#14 Posted : Saturday, October 15, 2022 2:58:14 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Marcello
#15 Posted : Monday, October 17, 2022 12:10:00 PM(UTC)
Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Ok, I can try.

Can I read the release notes somewhere?
Remco
#16 Posted : Monday, October 17, 2022 11:37:41 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Marcello;16314 wrote:

Can I read the release notes somewhere?


As this is a not a published release build, we don't provide release notes for this. This is only a small increment over the existing v4.14 release available on the download page. If the fix works, this will be included in v4.15 when it is released.
Marcello
#17 Posted : Tuesday, October 18, 2022 6:39:17 AM(UTC)
Rank: Advanced Member

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

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Ok! I will try it and I will be back with feedback ASAP
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.105 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download