Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly 'Microsoft.SqlServer.Types, Version=12.0.0.0, Culture=neutral, PublicKeyToken=myKey' or one of its dependencies.

After running an ASP.NET C# application with SQL SERVER version 2012, I get the following error message:

An error occurred during local report processing. The definition of the report 'C:\inetpub\wwwroot\psla\Reports\PD Listing Report - Per ED.rdlc' is invalid. An unexpected error occurred in Report Processing. Could not load file or assembly 'Microsoft.SqlServer.Types, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

What could be the cause? I have tried searching the net and there are references to version=11.0.0.0 but there are no references to version=12.0.0.0 for 'Microsoft.SqlServer.Types'. Reviewing the reference Manager for visual studio 2015, I was only able to find up to version=11.0.0.0.

like image 299
tksisawesome Avatar asked Jul 08 '16 21:07

tksisawesome


1 Answers

In your Package Manager download the 12 version from Nuget

https://www.nuget.org/packages/Microsoft.SqlServer.Types/

Also see that entry for this is backward compatible in web.config

In your references folder right click and set copy local = true

like image 166
rmehra76 Avatar answered Nov 17 '22 02:11

rmehra76