未能加载文件或程序集“Office, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f1
异常详细信息: System.IO.FileLoadException: 未能加载文件或程序集“Office, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
源错误:
行 12: public class ExcelUtil
行 13: {
行 14: public Excel.Application m_xlApp = null;
行 15:
行 16: /// <summary>
源文件: e:\webroot\DYSystem\Page\App_Code\File\ExcelUtil.cs 行: 14
程序集加载跟踪: 下列信息有助于确定程序集“Office, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”未能加载的原因。
警告: 程序集绑定日志记录被关闭。
要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。
注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
堆栈跟踪:
[FileLoadException: 未能加载文件或程序集“Office, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)]
File.ExcelUtil..ctor() in e:\webroot\DYSystem\Page\App_Code\File\ExcelUtil.cs:14
BusManage_Task_Device_List.btnToExcel_Click(Object sender, EventArgs e) in e:\webroot\DYSystem\Page\BusManage\Task_Device_List.aspx.cs:173
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.272