It seems like sometimes NCrunch Grid Node v5.x has problems restoring referenced nuget packages.
This can occur in differend situations.
Situation 1:
- Package.A is directly referenced
- Package.A has a references Package.B
- Both Packages are available in the same Package source
Situation 2:
- Package.B is directly referenced
- Package.B is available on a customer Package source that is also accesible by the Grid Node Server
Building the project locally everthing works fine and NCrunch is able to build the project.
Grid Node Server failes with "Package Package.B, version 2.0.22 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.
Known Workarounds:
It seems like NCrunch indeed tries to restore the nuget package to "<<Snapshotpath>>\.nuget" because there is a Directory "Package.B" including the correct version but containing the documentation file only. Nur "lib" folder and so on.
In some cases it helps copying the content from the local ".nuget" directory to that directory on the Grid Node Server. In some cases it also works to copy that content into the ".nuget" folder of any user known to that server even if the ncrunch service in running under "Local System" account.
What else to mention:
The problem occurs with ASP.net Core projects and Azure Function apps both compiled with .net 8.0 both using
Central Package Management with nuget.config but had worked with NCrunch v4.x before.