Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFCore in DotNetStandard2.0 Library contains not found dependencies #9289

Closed
isaacrlevin opened this issue Jul 28, 2017 · 5 comments
Closed

Comments

@isaacrlevin
Copy link

isaacrlevin commented Jul 28, 2017

I have EFCore installed in a DotNetStandard2.0 CL and everything is working fine except I get a warning on Build regarding not found packages and resolution has to take place

This is the warning I get on Build

Severity	Code	Description	Project	File	Line	Suppression State
Warning	NU1603	Microsoft.Extensions.Primitives 2.0.0-preview1-final depends on 
System.Runtime.CompilerServices.Unsafe (>= 4.4.0-preview1-25219-04)
but System.Runtime.CompilerServices.Unsafe 4.4.0-preview1-25219-04 was not found. 
An approximate best match of System.Runtime.CompilerServices.Unsafe 4.4.0-preview1-25305-02 
was resolved.	

Installing System.Runtime.CompilerServices.Unsafe explicitly fixes warning
Install-Package System.Runtime.CompilerServices.Unsafe -Pre

Steps to reproduce

Create New DotNetStandard2.0 CL
Add Microsoft.EntityFrameworkCore.SqlServer
Run Build

Further technical details

EF Core version: 2.0.0-preview2-final
Database Provider: Sql Server
Operating system: Windows 10 Pro
IDE: VS 2017 Prevew 3

@smitpatel
Copy link
Contributor

Can you share your csproj file and Nuget.config?

@isaacrlevin
Copy link
Author

Certainly

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.0-preview2-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0-preview2-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0-preview2-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="2.0.0-preview1-final" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0-preview2-final" />
  </ItemGroup>


</Project>

@divega divega added this to the 2.1.0 milestone Jul 28, 2017
@smitpatel
Copy link
Contributor

Check out #8923 (comment)
In preview2-final there is no SqlServer.Design package. Please remove that line and try again.

@smitpatel
Copy link
Contributor

After removing the stale package restore works fine for me.

@isaacrlevin
Copy link
Author

That did it, thanks

@ajcvickers ajcvickers removed this from the 2.1.0 milestone Oct 6, 2017
@smitpatel smitpatel removed their assignment Jan 12, 2022
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants