Marcello;15840 wrote:
Were you able to reproduce the issue there with a machine with only VS2019 build tools and SDK 6.0.100?
I've spent the last two days trying to set up an environment to reproduce the issue you've described. Perhaps needless to say, I'm not impressed with the stability of the platform involved here.
Here are my current conclusions when attempting to build projects using the MSBuild tools for VS2019 and Dotnet 6.0.100 on a clean installation of Windows 10:
- The standard installer for the MSBuild Tools does not actually install the latest version of this toolset. After installing it, you need to go back into the installer and deliberately update the product
- Setting the MSBuildSDKsPath environment variable to "C:\Program Files\dotnet\sdk\6.0.100\Sdks" is absolutely required and the toolset will not work without this
- When installing the MSBuild tools, it's important to select a range of different workloads that might be relevant to the projects you attempt to build. If you don't do this, the tools won't build _any_ projects at all, even if they are ubiquitous (i.e. netstandard)
- You absolutely must perform the 'msbuild.exe myproject.csproj /t:Restore' step on the netstandard project on the machine prior to attempting to build these projects either directly or through NCrunch. Most of the required files won't be installed by the .NET SDK or MSBuild tools even if they're always needed, and they need to be pulled down over a network via Nuget using a restore step before they will be present on the machine. NCrunch generally tries to copy SDKs it expects will be required but the install paths and dependency patterns of platform SDKs have become so complex and varied that it is not recommended to rely on this.
After following the above steps and installing the NCrunch grid node, the node was able to successfully build the sample netstandard protobuf project you provided on behalf of a VS2019 client using v6.0.100 of the Dotnet SDK. I did not experience the package resolution error shown in your log files.
My suspicion at the moment is that there are critical files missing from your "C:\NCrunch Grid Node\Snapshots\.nuget" directory. It might be worth cleaning out this directory to see if resyncing with the client resolves the problem. Otherwise, you might be able to transfer over a clean set of packages from another location, such as the .nuget directory under the current user profile on the machine, or one of the client machines that can already build these projects under NCrunch.