I've noticed that having a globalPackagesFolder element explicitly configured in the nuget.config file of my repository causes the following error to be output by NCrunch.
Unable to restore required Nuget packages for .NET Core test environment.
Everything still seems to work okay, but can someone please confirm whether this error is spurious? Removing the explicit globalPackagesFolder configuration makes the warning go away, but for reasons beyond my control I need this configuration to be present. For reference, my nuget.config is reproduced below:
In your case, this error is probably more of a warning. It's being caused by an internal discrepancy between your redirected package path and the default global packages directory on your system. Essentially, NCrunch has tried to install several packages it suspects might be needed in your runtime environment to execute your tests. Its install system hasn't considered your redirection, but its background checks for the installed packages have .. so the error is kicked up.
You can choose to either ignore the error, or if you want the error to go away, you can make sure that the packages mentioned in the error are installed in your solution's packages directory. This can be done by either copying them in manually or by referencing the packages temporary from one of your projects to force VS to restore them.
Are there plans to make NCrunch respect the nuget.config overrides so it installs dependencies to the specified globalPackagesFolder? Presumably that would also get rid of the spurious warning?
VNicholson wrote:
Are there plans to make NCrunch respect the nuget.config overrides so it installs dependencies to the specified globalPackagesFolder? Presumably that would also get rid of the spurious warning?