无法加载文件或程序集 'DocumentFormat.OpenXml [英] Could not load file or assembly 'DocumentFormat.OpenXml
问题描述
我一直收到这个错误是 VS2013
I'm keep getting this error is VS2013
无法加载文件或程序集DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neut
ral, PublicKeyToken=31bf3856ad364e35"或其依赖项之一.
Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neut
ral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
在我的 web.config
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="hjkom_med_web_udvConnectionString" connectionString="Data Source=M95;Initial Catalog=hjkom-med_web;Persist Security Info=True;User ID=HJkom-MED_web;Password=bvkeB7hh" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
**<add assembly="DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>**
</assemblies></compilation>
</system.web>
</configuration>
我尝试插入 windowsbase 和许多其他东西.
I have tried to insert windowsbase and a lot of other things.
我已经搜索并搜索了解决方案,有人知道如何解决吗?
I have search and search for a solution, do any body know how to fix it?
推荐答案
我遇到了这个问题,因为我在运行本地主机的计算机上安装了新版本的 .dll,而我的服务器运行的是旧版本的相同 .dll 文件.dll
I had this problem because I had a new version of the .dll installed on my computer running on localhost and my server was running an old version of the same .dll
我刚刚更新了它,之后一切正常.
I just updated it and everything works well after that.
在您的情况下,请安装此 微软链接
In your case, install the DocumentFormat.OpenXml version 2.5 available in this microsoft link
这篇关于无法加载文件或程序集 'DocumentFormat.OpenXml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!