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

Notification

Icon
Error

System.IO.IOException on GridNode
alexander_jesner
#1 Posted : Thursday, October 21, 2021 8:38:48 AM(UTC)
Rank: Member

Groups: Registered
Joined: 10/21/2021(UTC)
Posts: 10
Location: Austria

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
With the newest 4.10.0.6 I get the following error on my Grid Node (running as a service under LOCAL_SYSTEM)


Code:
System.IO.IOException: Could not find a part of the path 'C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\VisualStudio'.: C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\VisualStudio
   at nCrunch.Common.IO.DirectoryPath.GetDirectories(String wildcardSpec)
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(VisualStudioVersion )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(IList`1 , ProcessLoadParameters , VisualStudioVersion )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(EffectiveProcessorArchitecture , BuildSystemParameters , IList`1 , FilePath )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher..()
   at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridAddress )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.BuildComponentInExternalProcess(ComponentBuildParameters buildParameters, VisualStudioVersion vsVersion, GridClientId client, IList`1 customEnvironmentVariables, Guid taskId, GridAddress clientAddress)
   at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress, Boolean extractCoverageReportStructure)
   at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
   at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
   at nCrunch.GridNode.NodeTaskProcessor..()
   at nCrunch.Common.ErrorHandler.DoWithErrorHandling(Action action, Object context)



I then tried to run the service under a named user account (John.Doe) to rule out problems with the LOCAL_SYSTEM user:

Code:
System.IO.IOException: Could not find a part of the path 'C:\Users\John.Doe\AppData\Local\Microsoft\VisualStudio'.: C:\Users\John.Doe\AppData\Local\Microsoft\VisualStudio
   at nCrunch.Common.IO.DirectoryPath.GetDirectories(String wildcardSpec)
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(VisualStudioVersion )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(IList`1 , ProcessLoadParameters , VisualStudioVersion )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(EffectiveProcessorArchitecture , BuildSystemParameters , IList`1 , FilePath )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher..()
   at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridAddress )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.BuildComponentInExternalProcess(ComponentBuildParameters buildParameters, VisualStudioVersion vsVersion, GridClientId client, IList`1 customEnvironmentVariables, Guid taskId, GridAddress clientAddress)
   at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress, Boolean extractCoverageReportStructure)
   at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
   at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
   at nCrunch.GridNode.NodeTaskProcessor..()
   at nCrunch.Common.ErrorHandler.DoWithErrorHandling(Action action, Object context)


It seems that

  • when I run as a user where this folder exists, everything works fine
  • when I run as a user where this folder does not exist, I get the error BUT when I create an empty folder at the specified path, it starts to work again.


Please have a look at this problem; it was working fine in all the versions of the last 24 months. If you need more information, do not hesitate to contact me.
For now I'm going to work around the problem by creating the folders where necessary.

--- Alex
Remco
#2 Posted : Thursday, October 21, 2021 10:04:52 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi Alex,

Thanks for taking the time to report this problem. This is a known issue that was introduced in the v4.10 release. It affects systems that have preview versions of the Dotnet SDK installed alongside the gridnode. It is caused by a fix that was introduced to help resolve client-side problems with the underlying system using the wrong version of Dotnet when building projects. Unfortunately, this code doesn't make sense in its current form when executed on the node.

We're planning a fix for this, but for the time being the easiest way to work around this problem is to just create the missing directory so that the code can run without any exceptions. If the grid node uses the wrong version of the Dotnet SDK, you may need to set the DOTNET_MSBUILD_SDK_RESOLVER_SDKS_* environment variables on the node to force it to use the correct SDK version. Right now our plan for this fix is to change the logic of the node so that the client hands it the expected SDK version and it then does its best to use the best match it can find.

Please accept my apologies for any trouble caused by this problem.
alexander_jesner
#3 Posted : Thursday, October 21, 2021 11:55:11 AM(UTC)
Rank: Member

Groups: Registered
Joined: 10/21/2021(UTC)
Posts: 10
Location: Austria

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hi,
thanks for the quick reply.
I created the folders for now and everything seems to be fine.

The only remark I have: on my Grid Nodes only the VS2019 Build Tools are installed, no VS2022 Preview and no .NET 6 Preview. The VS2022 Preview is only installed on my developer machine.
Not sure if it makes a difference, but maybe you can draw some conclusions from this to improve nCrunch here.
Remco
#4 Posted : Thursday, October 21, 2021 12:01:10 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
alexander_jesner;15732 wrote:

The only remark I have: on my Grid Nodes only the VS2019 Build Tools are installed, no VS2022 Preview and no .NET 6 Preview. The VS2022 Preview is only installed on my developer machine.
Not sure if it makes a difference, but maybe you can draw some conclusions from this to improve nCrunch here.


Thanks, it's good to know this. Also glad you're up and running again.
1 user thanked Remco for this useful post.
alexander_jesner on 10/21/2021(UTC)
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.037 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download