locked
Unresolved Reference: Microsoft.Vbe.Interop

    Question

  • 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
    Tuesday, August 09, 2005 3:22 PM

Answers

  • 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
    Wednesday, August 10, 2005 3:09 PM
  • In VS2005, we automatically pass the directories for all assembly references to FxCop (as this information, obviously, must be known in order to compile).
    Friday, January 06, 2006 6:16 PM

All replies

  • 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
    Wednesday, August 10, 2005 3:09 PM
  • 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

    Friday, January 06, 2006 3:57 PM
  • Try adding the file name to the information you paste into the dialog. Does that work?
    Friday, January 06, 2006 4:02 PM
  • 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?

    Friday, January 06, 2006 4:25 PM
  • In VS2005, we automatically pass the directories for all assembly references to FxCop (as this information, obviously, must be known in order to compile).
    Friday, January 06, 2006 6:16 PM
  • 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

     

    Saturday, January 07, 2006 10:55 AM