-
Notifications
You must be signed in to change notification settings - Fork 124
VS 2017RC migration (EF 6x/.NET 4.6 reference issue) #1001
Comments
The issue is present also on VS2017 RTM |
@bricelam this has been fixed for the upcoming release, hasn't it? |
No idea. It sounds like |
Or it isn't present (which would explain why installing EF6 into the web app makes it work) |
The problem is that EntityFramework.SqlServer.dll is not referenced/copied to the bin folder. Which it did prior to VS2017. Thats why it works to nuget in EF to the web project. I don't know if that is a EF issue or a VS issue though. |
That sounds like the classic MSBuild issue that's been plaguing us for years: It doesn't copy transitive dependencies unless they are explicitly referenced in the dependent the assembly. The best way to work around this issue is to use NuGet's new MSBuild PackageReference items instead of |
Thank you! "At present, package references are supported in Visual Studio 2017 only, for .NET Core projects, .NET Standard projects". Replacing my DAL (.NET Framework Class Library) project with a .NET Standard Class Library project and setting TargetFramework to net461 worked. Now using PackageReference instead of packages.config |
From NuGet is now fully integrated into MSBuild:
|
Not sure if this is the right place for this.
I have a ASP.NET Core web project that references a business layer, that references a data layer.
The data layer is a .NET 4.6.2 project with EF 6x.
[Web (aspnetcore)] --> [BLL (aspnetcore)] --> [DAL (net46)]
This works fine in VS2015/project.json world.
The VS2017 migration went well without errors. I get this error when running the project.
"InvalidOperationException: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient' Make sure the provider is registered in the 'entityFramework' section of the application config file"
Installing EF6 in my web project solves the problem but that is obviously not a solution.
Advice is appreciated!
The text was updated successfully, but these errors were encountered: