简体   繁体   English

无法加载文件或程序集“Microsoft.SqlServer.Types, Version=12.0.0.0, Culture=neutral, PublicKeyToken=myKey”或其依赖项之一。

[英]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:使用 SQL SERVER 2012 版运行 ASP.NET C# 应用程序后,我收到以下错误消息:

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.报告“C:\\inetpub\\wwwroot\\psla\\Reports\\PD Listing Report - Per ED.rdlc”的定义无效。 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.无法加载文件或程序集“Microsoft.SqlServer.Types, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”或其依赖项之一。 The located assembly's manifest definition does not match the assembly reference.定位的程序集的清单定义与程序集引用不匹配。 (Exception from HRESULT: 0x80131040) (来自 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'.我试过在网上搜索,并且有对 version=11.0.0.0 的引用,但没有对 version=12.0.0.0 的“Microsoft.SqlServer.Types”的引用。 Reviewing the reference Manager for visual studio 2015, I was only able to find up to version=11.0.0.0.查看visual studio 2015的参考管理器,我只能找到版本= 11.0.0.0。

In your Package Manager download the 12 version from Nuget在你的包管理器中从 Nuget 下载 12 版本

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

Also see that entry for this is backward compatible in web.config另请参阅该条目在 web.config 中向后兼容

In your references folder right click and set copy local = true在您的引用文件夹中右键单击并设置 copy local = true

It appears that some library in your project is referencing Microsoft.SqlServer.Types, Version=12.0.0.0 but .NET runtime cannot find it at execution.您的项目中的某些库似乎正在引用 Microsoft.SqlServer.Types,Version=12.0.0.0,但 .NET 运行时在执行时找不到它。

On the web server, where the application is running, make sure that there exists a following directory: C:\\Windows\\assembly\\GAC_MSIL\\Microsoft.SqlServer.Types\\12.0.0.0__89845dcd8080cc91\\在运行应用程序的 Web 服务器上,确保存在以下目录: C:\\Windows\\assembly\\GAC_MSIL\\Microsoft.SqlServer.Types\\12.0.0.0__89845dcd8080cc91\\

Also make sure that this directory has the file Microsoft.SqlServer.Types.dll of version 12 (12.0.2000.8).还要确保此目录具有版本 12 (12.0.2000.8) 的文件Microsoft.SqlServer.Types.dll Different versions of the file can be downloaded from https://www.nuget.org/packages/Microsoft.SqlServer.Types/可以从https://www.nuget.org/packages/Microsoft.SqlServer.Types/下载不同版本的文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法加载文件或程序集 'Microsoft.SqlServer.Types,Version=15.0.0.0,Culture Neutral,PublicKeyToken=89845dcd8080cc91' - Could not load file or assembly 'Microsoft.SqlServer.Types,Version=15.0.0.0,Culture Neutral,PublicKeyToken=89845dcd8080cc91' 程序集加载错误 - > 无法加载文件或程序集“Microsoft.SqlServer.Types,版本 = 10.0.0.0”或其依赖项之一 - Assembly Load Error - > Could not load file or assembly 'Microsoft.SqlServer.Types, Version=10.0.0.0' or one of its dependencies 无法加载文件或程序集“Microsoft.SqlServer.Types,Version=10.0.0.0”或其依赖项之一 - Could not load file or assembly 'Microsoft.SqlServer.Types, Version=10.0.0.0' or one of its dependencies 无法加载文件或程序集“Newtonsoft.Json,Version=12.0.0.0,Culture=neutral,PublicKeyToken=30ad4fe6b2a6aeed”或其依赖项之一 - Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies 无法加载文件或程序集“Microsoft.Bcl.AsyncInterfaces,Version=1.0.0.0,Culture=neutral,PublicKeyToken=XX”或其依赖项之一 - Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XX' or one of its dependencies 无法加载文件或程序集'XXX,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一 - Could not load file or assembly 'XXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies 无法加载文件或程序集'Dapper,Version = 1.8.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一 - Could not load file or assembly 'Dapper, Version=1.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies C#:无法加载文件或程序集'OpenPop,Version = 2.0.4.369,Culture = neutral,PublicKeyToken = null'或其依赖项之一 - C#: Could not load file or assembly 'OpenPop, Version=2.0.4.369, Culture=neutral, PublicKeyToken=null' or one of its dependencies 无法加载文件或程序集“BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null”或其依赖项之一 - Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies 无法加载文件或程序集'MySql.Data,版本= 6.9.5.0,区域性=中性,PublicKeyToken = c5687fc88969c44d'或其依赖项之一。 - Could not load file or assembly 'MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies.
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM