我正在从使用MSOffice 2003在VS2003上运行的项目迁移到VS2010项目。 我的项目使用程序集“Microsoft.Office.Interop.Excel.dll” 但是我得到以下错误。
2>ResolveAssemblyReferences:
2> No way to resolve conflict between "Office, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "Office, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null". Choosing "Office, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily.
2>InitializeBuildStatus:
2> Touching "Debug\ACCT.unsuccessfulbuild".
2>CustomBuild:
2> All outputs are up-to-date.
2>cl : Command line warning D9035: option 'clr:oldsyntax' has been deprecated and will be removed in a future release
2> stdafx.cpp
2>stdafx.cpp : fatal error C1107: could not find assembly 'Microsoft.Office.Interop.Excel.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable
2>
2>Build FAILED.
我确保已引用程序集“Microsoft.Office.Interop.Excel.dll”。
答案 0 :(得分:0)
您必须删除旧引用,然后重新添加 2010 。它们实际上是不同的。升级办公室组件时会有点痛苦。