无法加载文件或程序集'DocumentFormat.OpenXml [英] Could not load file or assembly 'DocumentFormat.OpenXml
问题描述
我一直收到此错误,是VS2013
I'm keep getting this error is VS2013
无法加载文件或程序集'DocumentFormat.OpenXml,版本= 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的旧版本
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.
根据您的情况,安装此 microsoft上可用的DocumentFormat.OpenXml版本2.5链接
In your case, install the DocumentFormat.OpenXml version 2.5 available in this microsoft link
这篇关于无法加载文件或程序集'DocumentFormat.OpenXml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!