Visual studio 2010 致命错误C1107:找不到程序集';Microsoft.Office.Interop.Excel.dll';:

Visual studio 2010 致命错误C1107:找不到程序集';Microsoft.Office.Interop.Excel.dll';:,visual-studio-2010,ms-office,visual-studio-2003,excel-interop,Visual Studio 2010,Ms Office,Visual Studio 2003,Excel Interop,我正在从使用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=b03f5f7f11d50

我正在从使用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”已被引用。

您必须删除旧引用,然后重新添加2010引用。他们实际上是不同的。升级office组件时有点麻烦。

您的意思是添加新版本的支持VS2010的“Microsoft.office.Interop.Excel.dll”吗?但是在我的电脑上仍然只安装了MSOffice-2003等等。。。我以为你升级了办公室。我应该更仔细地阅读这个问题。。。在任何情况下,互操作DLL可能位于不同的位置。单击引用,右键单击并选择properties,注意路径,并确保interop dll确实存在。否则,再次删除并添加新的。嗯。。。我已经尝试了所有,检查、删除和再次添加。。还有什么好主意吗?嗯哼。嗯,经过仔细评估,VS2010似乎只支持Office2007或Office2010。非常不幸。所以,你需要升级你的办公室或者至少将你的VS降级到2008年。您可能能够同时安装VS2010和VS2008。本博客提供了更多信息:我已经尝试通过保持Office2003不变来安装Office2007(因为我不想使用VS2003为现有项目分发我的工作环境)。所以现在,我的机器有VS2003、VS2010、Office 2003、Office 2007,但仍然出现相同的错误..:(