访问Microsoft.Office.Interop.Word.dll? [英] Getting to Microsoft.Office.Interop.Word.dll?

查看:158
本文介绍了访问Microsoft.Office.Interop.Word.dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当FxCop检查程序集时,会出现以下错误:

When FxCop examines an assembly it gives the following error:


The following reference assembly could not be found.  The assembly is
required for analysis and was referenced by Test.dll.

Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c

所以,我做了一个搜索,并找到该文件:

C:\Windows\assembly\GAC\Microsoft.Office.Interop.Word\12.0.0.0__71e9bce111e9429c

So, I did a search and found the file in:
C:\Windows\assembly\GAC\Microsoft.Office.Interop.Word\12.0.0.0__71e9bce111e9429c

但是,FxCop中的对话框不允许我超过C:\Windows\assembly。看起来微软这个目录在通用对话框中显示不同,但是忘记告诉FxCop团队。

However, the dialog in FxCop doesn't let me get past C:\Windows\assembly. It looks like Microsoft hacked this directory to show up different in the common dialogs, but forgot to tell the FxCop team.

那么如何让FxCop找到那个DLL呢?

So how do I get FxCop to find that dll?

BTW:这是Windows XP。

BTW: This is Windows XP.

推荐答案

不得不处理这个。我的解决方案是将必要的文件复制到我的 src 目录附近的 libs 文件夹中,并引用该复制的文件。在编译期间,它应该与项目的构建结果一起复制到构建文件夹中,而FxCop应该没有问题。

I've had to deal with this before. My solution was to copy the necessary files to a libs folder adjacent to my src directory, and reference that copied file instead. During compilation, it should get copied into the build folder along with your project's build results, and FxCop should have no issue picking it up.

我认为问题是程序集在GAC中不会复制到您的项目的构建文件夹,而FxCop不知道如何处理非框架GAC引用。

I think the issue is that assemblies in the GAC don't get copied to your project's build folder, and FxCop doesn't know how to handle non-framework GAC references.

这篇关于访问Microsoft.Office.Interop.Word.dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆