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):
NCrunch: This project was built on server 'NCRUNCH'
..\..\..\..\Program Files\dotnet\sdk\6.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets (267, 5): Package System.CodeDom, version 4.7.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.
NCrunch: v6.0.400 of the Dotnet SDK is being used by the NCrunch client, but this server is using v6.0.302, which is the closest matching version found installed. This may cause issues with the build system. Consider installing v6.0.400 of the Dotnet SDK on this machine.
NCrunch: The following files were used when building this project locally but do not seem to exist on the remote grid node responsible for building this project:
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props
c:\program files\microsoft visual studio\2022\professional\MSBuild\Current\Microsoft.Common.props
c:\program files\microsoft visual studio\2022\professional\MSBuild\Current\Imports\Microsoft.Common.props\ImportBefore\Microsoft.NuGet.ImportBefore.props
c:\program files\microsoft visual studio\2022\professional\MSBuild\Microsoft\NuGet\17.0\Microsoft.NuGet.props
c:\program files\microsoft visual studio\2022\professional\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props
C:\Program Files\dotnet\sdk\6.0.400\Microsoft.NETCoreSdk.BundledVersions.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.SupportedTargetFrameworks.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.SupportedPlatforms.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.WindowsSdkSupportedTargetPlatforms.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.CSharp.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ILLink.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.ILLink.Tasks\Sdk\Sdk.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.ILLink.Tasks\build\Microsoft.NET.ILLink.Tasks.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Compatibility.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackProjectTool.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.WindowsForms.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\System.Windows.Forms.Analyzers.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.NET.Sdk.WindowsDesktop.WPF.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Windows.props
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.BeforeCommon.targets
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.DefaultAssemblyInfo.targets
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.DefaultOutputPaths.targets
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportPublishProfile.targets
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets
C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.targets
...
Often this can be caused by configuration differences between your client machine and the grid node, in which case the installed SDK directories may be different between machines. If you are experiencing consistent problems when building this project on the grid node, the missing files listed above are worth investigating as they may highlight SDKs required on the grid node that have not yet been installed. Please note that this is not necessarily an error case as projects very often build successfully on grid nodes with only a subset of the client machine's installed SDKs.