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

Notification

Icon
Error

Grid node can't build with RuntimeIdentifier specified
davetorutek
#1 Posted : Thursday, February 8, 2024 1:30:44 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2018(UTC)
Posts: 12
Location: New Zealand

Thanks: 3 times
Was thanked: 6 time(s) in 4 post(s)
As of the latest ncrunch we get failure to build projects on the grid node if their csproj contains:
Code:

    <PublishSingleFile>true</PublishSingleFile>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <PublishReadyToRun>true</PublishReadyToRun>


If we remove the runtime identifier it builds.

You can reproduce this by creating a new xunit test project in VS2022 and copying those lines in to the first <PropertyGroup> in the csproj.

Logs from ncrunch:
Quote:

NCrunch: The build results for this project are not consistent across all computers within the grid.

This project was successfully built on computers: (local)
This project failed to build on computers: NCRUNCHER1

Associated tests will continue to run on computers that are able to build this project successfully. Please ensure all computers within the grid are configured correctly with all required SDKs installed.

****************** BUILD OUTPUT FROM '(local)' ******************


****************** BUILD OUTPUT FROM 'NCRUNCHER1' ******************

..\..\..\..\..\WINDOWS\system32\Program Files\dotnet\sdk\8.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets (491, 5): The runtime pack for Microsoft.NETCore.App.Runtime.win-x64 was not downloaded. Try running a NuGet restore with the RuntimeIdentifier 'win-x64'.

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\microsoft visual studio\2022\professional\MSBuild\Current\Microsoft.Common.props
... lots more ...


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.


Thanks!
Remco
#2 Posted : Friday, February 9, 2024 12:34:48 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks for sharing this issue.

Just looking at the log - can you confirm whether this issue happens only when you use distributed processing? (i.e. is everything fine if you don't connect to your nodes?)
davetorutek
#3 Posted : Friday, February 9, 2024 1:13:38 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2018(UTC)
Posts: 12
Location: New Zealand

Thanks: 3 times
Was thanked: 6 time(s) in 4 post(s)
Yep, works fine locally, only issues on grid nodes.
Remco
#4 Posted : Friday, February 9, 2024 1:42:15 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Ok, I have some theories about this issue.

My first theory is that the grid node is missing a package that exists on the client machine. NCrunch generally transfers packages over from the client to the node, but the installation paths and manner of certain system-level packages can be quite varied between versions of .NET, so its quite possible this system doesn't handle some of the built-in ones. Something worth trying is to manually copy the project over to the grid node, then perform a package restore on it from there. This will cause the node to download the required packages and make sure they are installed.

My second theory is an SDK inconsistency between the client and the node. Check to make sure you have the same versions of the .NET SDK installed between your client and node. The older versions shouldn't matter much, but the newest version does. If the node is running a different build of .NET 8 to your client, this can cause problems.

My third theory is that the MSBuild SDK change we introduced in 4.19 has triggered an issue between your client and node, such that the node is running a whole different version of MSBuild to your client machine. This can be resolved by setting your Build Sdk NCrunch project-level config setting to a value that is sensible for your environment. Note that the chosen SDK must be present on both machines with the exact same version.
davetorutek
#5 Posted : Friday, February 9, 2024 2:01:15 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2018(UTC)
Posts: 12
Location: New Zealand

Thanks: 3 times
Was thanked: 6 time(s) in 4 post(s)
2 - VS 2022 is installed on both my machine and the grid node and they are both up to date.

3 - I've tried setting this to 8.0.101 or VS2022, same issue remains.

1 - I tried this last, I copied the project (Test project with the csproj changes made as in my opening post) to the grid node and ran dotnet restore, this has resolved the issue.
1 user thanked davetorutek for this useful post.
Remco on 2/9/2024(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.038 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download