How to replace regtlib? RRS feed

  • Question

  • I am building an unmanaged application with an associated type library. I then reference the type library in a C# dll. However, because of the requirements of the build, I needed to import a .dll with a "strong name".

    In VS 2005, I used this sequence of 3 commands to convert the type library into a dll which could be referenced by my C# dll:

    regtlib mytypelib.tlb

    tlbimp mytypelib.tlb /primary /key:key /out:mytypelibdll.dll

    regasm mytypelibdll.dll

    In VS 2010, I use the last two commands to build the dll (because there is no regtlib anymore, and regtlibv12 doesn't seem to do anything). However, when I try to use the dll in my C# project, I get this warning:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3341,9): warning : Type library exporter warning: Referenced type is defined in managed component, which is imported from a type library that could not be loaded because it was not registered (type: 'SLIMEstimate.ISolutionDual'; component: 'C:\Qsm\Dev81\QsmSuite\Tools\SLIMEstimate.dll').

    As I mentioned before, using regtlibv12 in place of regtlib does not change the situation - the warning persists.

    How should I go about replacing regtlib in the original sequence of commands to avoid this warning?

    Andy Canham


    • Moved by Martin_Xie Tuesday, May 11, 2010 5:22 AM Redirect to appropriate forums for better support. (From:Visual Basic Interop and Upgrade)
    Monday, May 3, 2010 10:03 PM