Unresolved Reference: Microsoft.Vbe.Interop

Hey,

I'm working on a project that is in the process of being ported from VB6 to .NET. I've tried to run fxCop against the main .DLL (it's a web app) but I get an error message telling me that there is an unresolved reference to Microsoft.Vbe.Interop. Now, I have confirmed that this file does exist in C:\Windows\assembly\ and I've even verified that the version/public key that fxCop is expecting matches the assembly in the folder. However, fxCop will not allow me to select the file to be loaded, nor am I able to use Windows Explorer to copy the file to a local directory and point to it there.

Am I completely missing something here? Is it not possible to run fxCop against the assembly if it contains VB6 code?

BTW, I'm a software engineering student so there's a lot I don't know yet. I may be using this tool incorrectly (but it seems so straight-forward).

Oh... if it's relevant:
XP Pro SP2
Visual Studio .NET 2003
.Net Framework 1.1.4322.2032
Office 2003

Thanks,

Kyle

[1015 byte] By [KylePike] at [2008-2-22]
# 1
You have two options here, either copy the assembly to a disk location other than the GAC, or copy the fully-qualified path (including the binary name) and paste it into the browse window when FxCop queries you for the file. If I were required to locate the v1.1 System.dll file, for example, I would click browse and paste the following into it:

C:\WINDOWS\assembly\GAC\System\1.0.5000.0__b77a5c561934e089

Then click OK. There's special handling around GAC directories that prevent you from browsing and selecting files using the standard file open dialogs.

Michael Fanning
VSTS Development: Code Analysis

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 2

Hi Michael

I know this is not my thread but I'm having the same issue and I cannot get the open dialog box to accept the value (i'm using 1.35 in case it makes any difference) the path I'm trying to get the open dialog box to accept is C:\Windows\Assembly\GAC\Microsoft.Office.Interop.Word\11.0.0.0__71e9bce111e9429c

and

C:\Windows\Assembly\GAC\Microsoft.Vbe.Interop\11.0.0.0__71e9bce111e9429c

any ideas, this is now becoming annoying

DuncanFaulkner at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 3
Try adding the file name to the information you paste into the dialog. Does that work?
MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 4

Hi Michael

I could be wrong here but I thought that "Microsoft.Vbe.Interop" and "Microsoft.Office.Interop.Word" were the file names.

On a side note: why is this even an issue in the stand alone version, the version in VS2005 does not ask me for these files so why does the stand alone version, after all they are the same thing are they not?

DuncanFaulkner at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 5
In VS2005, we automatically pass the directories for all assembly references to FxCop (as this information, obviously, must be known in order to compile).
MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 6

Hi

Right just for reference in case anybody else has this issue this is how to resolve it, find the file that FX Cop is looking for in the references and copy the text in the path for the reference (from the properties box) for example:
C:\WINDOWS\assembly\GAC\Microsoft.Vbe.Interop\11.0.0.0__71e9bce111e9429c\Microsoft.Vbe.Interop.dll

I know this was mentioned in an earlier post, but I found I needed to add the file name, in this case \Microsoft.Vbe.Interop.dll was missing.

Thanks to Michael for pointing that out.

Duncan

DuncanFaulkner at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...

Visual Studio Team System

Site Classified