我有使用MS Excel文件读/写的网站.
我将相关的dll添加到网站的Bin文件夹中,它在我的本地主机上运行完美(我认为因为我在我的电脑上安装了MS Excel 2010)
但是当我将它上传到远程PC并运行该站点时,它会抛出一个错误:
Could not load file or assembly ‘Microsoft.Office.Interop.Excel,
Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c’ or
one of its dependencies. The located assembly’s manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Microsoft.Vbe.Interop.dll office.dll Microsoft.Office.Interop.Excel.dll Microsoft.Office.Interop.Excel.xml office.xml
我在远程PC上安装了“Microsoft Office 2010:Primary Interop Assemblies Redistributable”,
http://www.microsoft.com/en-us/download/details.aspx?id=3508
但同样的错误发生了.
如何解决这个问题?
谢谢.
解决方法
一种方法 – 安装MS Office(MS Excel)