user957479
user957479

Reputation: 501

Could not load file or assembly 'Microsoft.SqlServer.Types with EF5 and VS 2010

I had a .NET Framework 4 project running with EF 4.3 and Visual Studio 2010. I have upgraded the project to EF 5 and installe .NET Framework 4.5 on my dev machine. When running my project I now receive "Could not load file or assembly 'Microsoft.SqlServer.Types, Version=11.0.0.0"

I'm not using any new features of EF5 or new features of .NET Framework 4.5. What's wrong here ?

Upvotes: 4

Views: 12940

Answers (1)

Harry Sarshogh
Harry Sarshogh

Reputation: 2197

I found the solution ! Just install the nuget package Microsoft.SqlServer.Types

PM> Install-Package Microsoft.SqlServer.Types

And then

Solution > References > System.Data.Entity > Properties > Copy Local, and setting it to True.

Note: Copy Local for Microsoft.SqlServer.Types was already set to true, and even though the problem was with System.Data.Entity, the error message was still about Microsoft.SqlServer.Types.

Upvotes: 2

Related Questions