Assembly Microsoft.Office.Interop.Word, Version=15.0.0.0 uses Microsoft.Vbe.Interop, Version=15.0.0.0

♀尐吖头ヾ 提交于 2019-12-23 12:23:45

问题


I just downloaded MS Visual Studio 2010 solution and get that error.

Error 1 Assembly 'Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' uses 'Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' which has a higher version than referenced assembly 'Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' c:\PROJECTS\UHelper\Assemblies\Microsoft.Office.Interop.Word.dll AcceptService.Web

I have MS Office 2010 installed. I have reference to local copy of Microsoft.Office.Interop.Word.dll within project.

Any clue how to fix it?


回答1:


First I got this page that I assumed should be useful. But it was not. :( Anyway I put that link so it CAN be useful for someone else.

Second point was to use advice that I found here

So I navigated to http://www.microsoft.com/en-us/download/details.aspx?id=18249 And installed Microsoft Office 2010 Primary Interop Assemblies Bootstrapper Package.

And finally I deleted Microsoft.Office.Interop.Word.dll reference in the project and added another one

Visual Studio installs these copies of PIAs to the following locations:

On the development computer: %ProgramFiles%\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Office14 (or %ProgramFiles(x86)%\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Office14 on 64-bit operating systems)

%ProgramFiles%\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Office15 (or %ProgramFiles(x86)%\Microsoft Visual Studio 12.0\Visual Studio Tools for Office\PIA\Office15 on 64-bit operating systems)

And yeah!!! Error gone! :)



来源:https://stackoverflow.com/questions/23085723/assembly-microsoft-office-interop-word-version-15-0-0-0-uses-microsoft-vbe-inte

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!