Installing the EFCore.Relational package, I get this NuGet error,
which blocks me from adopting the latest base changes in preparation for 1.2/2.0:
Attempting to gather dependency information for package 'Microsoft.EntityFrameworkCore.Relational.1.2.0-preview1-23731' with respect to project 'EntityFramework.SqlServerCompact40', targeting '.NETFramework,Version=v4.5.1'
Gathering dependency information took 42,82 sec
Attempting to resolve dependencies for package 'Microsoft.EntityFrameworkCore.Relational.1.2.0-preview1-23731' with DependencyBehavior 'Lowest'
Unable to find a version of 'System.Runtime.CompilerServices.Unsafe' that is compatible with 'Microsoft.Extensions.Primitives 1.2.0-preview1-23731 constraint: System.Runtime.CompilerServices.Unsafe (>= 4.4.0-beta-25027-01)'.
Create a .NET 4.5.1 class library.
Install EFCore.Relational pacakge from dev feed on MyGet
EF Core version: 1.2.0-preview1-23731
Database Provider: N/A
Operating system: Windows 10
IDE: VS 2015 with NuGet 3.5.0.1484
I'm surprised to see a 4.4.0 corefx package. I thought we went back to 4.3.0 because of issues like this...
Is this resolved in the latest nightly build (23738)?
@bricelam Nope:
Attempting to resolve dependencies for package 'Microsoft.EntityFrameworkCore.Relational.1.2.0-preview1-23738' with DependencyBehavior 'Lowest'
One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Microsoft.EntityFrameworkCore.Relational 1.2.0-preview1-23339'
Unable to resolve dependencies. 'System.Runtime.CompilerServices.Unsafe 4.4.0-beta-24913-01' is not compatible with 'Microsoft.Extensions.Primitives 1.2.0-preview1-23738 constraint: System.Runtime.CompilerServices.Unsafe (>= 4.4.0-beta-25104-02)'.
Getting a possibly related error... Using VS2017 RTM, the new simplified csproj and the very latest packages from aspnetcore-dev, building fails with error:
C:\Program Files\dotnet\sdk\1.0.0\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(154,5): error : Unexpected dependency 'System.Runtime.CompilerServices.Unsafe' with no version number. [C:\projects\Npgsql.EntityFrameworkCore.PostgreSQL\src\Npgsql.EntityFrameworkCore.PostgreSQL\Npgsql.EntityFrameworkCore.PostgreSQL.csproj]
Adding an explicit package reference with version 4.4.0-* into my own csproj makes the error go away. Referencing version 4.3.0 warns about multiple versions.
Got @ErikEJ error while restore. Adding a package reference in all csproj files to version 4.3.0 seems to work around the issue.
@roji So ?
@ErikEJ I have the following references in my provider csproj (among others):
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="1.2.0-*" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.3.0" />
I'm getting warnings but stuff seems to work.
Thanks; I will give it a try with Classic csproj and Nuget 3.5... There are some many provider changes I need to catch up with
I feel your pain... I'm also in the midst of a blitz of conversions and build work...
not pain - "improvements" for EF Core 2! 馃槒
We <3 you guys. We're trying to get all of the planned 2.0 breaking changes in now to give you plenty of time to react.
P.S. I'll dig into this issue today to see if I can get to the bottom of it.
@bricelam Thanks, Brice, confident that you are on top of the situation as always!
Any update? @bricelam
Sill haven't dug into it... 鈽癸笍
I'm not able to repro this. .NET Framework 4.5.1 projects on both VS 2015 & 2017 install the latest version of the package without error...
What build is that?
1.2.0-preview1-24025 (from the aspnetcore-dev feed)
The latest from aspnetcore-ci-dev also worked for me.
Magic!
Same here!