Type not found Microsoft.EntityFrameworkCore in .NET Standard project

.net .net-standard c# entity-framework-core

Question

I am having a total nightmare getting Entity Framework Core working in my .NET standard project! I am using .NET Standard 2

I can install the package fine (Microsoft.EntityFrameworkCore.SqlServer)

However, when I build my application although it compiles, I get the error below

Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.

Has anyone ever had this? I wasnt expecting this to be such a pain just to use Entity Framework in .NET Standard lol

I cant see any dlls related to this in my output folders

My application is hosted within service fabric, but I am not sure thats anything to do with it

Paul

1
0
2/3/2018 1:04:18 PM

Popular Answer

Try to add this into your .csproj file which contains reference to the

Microsoft.EntityFrameworkCore.SqlServer

<PropertyGroup>
  <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
  <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
0
7/12/2018 4:37:55 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow