I have a class library that multi targets .NET Standard 2.0, .NET Standard 2.1, and .NET Framework 4.7.2.
I also have a unit test library which multi targets .NET Core 2.2, .NET Core 3.0 and .NET Framework 4.7.2.
The class libary uses Entity Framework packages, specifically:
.NET Standard 2.0: Microsoft.EntityFrameworkCore 2.2.6
.NET Standard 2.1: Microsoft.EntityFrameworkCore 3.0.0
.NET Framework 4.7.2: EntityFramework 6.3.0
These packages are conditionally included in the library .csproj file based on the target framework.
In Visual Studio all projects build fine and I can manually run any test against all 3 frameworks and they work.
NCrunch fails to build the test project for .NET Core 2.2 with the following error:
Quote:CSC (0, 0): Assembly 'Library' with identity 'Library, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.EntityFrameworkCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.EntityFrameworkCore' with identity 'Microsoft.EntityFrameworkCore, Version=2.2.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
It seems like it is not identifying that .NET Core 2.2 should load the 2.2.6 version of Microsoft.EntityFrameworkCore.