I did some more digging, and this is what I found:
NCrunch is doing an msbuild restore (not a dotnet restore) on project generated by NCrunch. That project is found in C:\Users\[username]\AppData\Local\NCrunch\[TempDir]\PackageRestore\restorePackages.csproj
In my case, this is the contents of that project file:
Quote:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.runner.utility" Version="2.4.1" />
</ItemGroup>
</Project>
The three packages that are referenced in this file (System.Runtime.Loader 4.3.0, xunit.abstractions 2.0.3, and xunit.runner.utility 2.4.1) are all downloaded when NCrunch calls msbuild.exe \t:restore on restorePackages.csproj
The msbuild restore command completes without errors:
Quote: 6 Warning(s)
0 Error(s)
But immediately after this, NCrunch gives me this error:
Quote:ERROR: Unable to restore required Nuget packages for .NET Core test environment
NCrunch was unable to restore Nuget packages required to build a test environment for this solution, due to an unspecified failure when invoking 'msbuild.exe /t:restore'
The following packages do not exist under the Nuget packages folder for the active user profile, yet they have been flagged by NCrunch as potentially needed for normal operation. NCrunch has attempted to restore these files via an MSBuild restore step, which has either failed or not returned the expected result. It's possible that these packages may not be needed for building projects or running tests in your environment. If you experience downstream problems with NCrunch on this solution, it is recommended you restore or download the packages manually.
Note that the restore of packages may fail if NCrunch is being hosted under a windows account that does not have sufficient rights to store files in the Nuget packages directory.System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
System.Runtime.Loader v4.3.0
xunit.abstractions v2.0.3
xunit.runner.utility v2.4.1
This happens even though the msbuild restore command downloaded all of those files, and they are present in the user's nuget package directory.
Why is it doing this? Could it be a timing issue, where they're still downloading when NCrunch checks on them?
Also, should I be concerned that the target framework of NCrunch's project is netcore 1.0?