none
How do I perform "Deploying COM Components with ClickOnce" on a strong name signed project? RRS feed

  • Question

  • After reading http://msdn.microsoft.com/en-us/library/ms165432.aspx , my test C# project worked flawlessly with the isolated COM component that we want to get rid from the DLL ____.

    Then my next step is to port this method to our main project which is strong name + delay signed.
    Conclusion I got after trying steps below: Visual Studio 2010 just can't generate strong name signed interop files. I can't find out how to do it.

    I tried these 2 methods:

    A.

    1. I disabled strong name signing in the C# project settings.
    2. Add the component into a form, then re-enable strong name signing.
    3. Compilation failed badly due to generated interop files were not strong name + delay signed.
    Error:

    ResolveComReferences:
      COM Reference 'XXXXXLib' is the interop assembly for ActiveX control 'AxXXXXXLib' but was marked to be linked by the compiler with the /link flag. This COM reference will be treated as a reference and will not be linked.
    c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): warning MSB3283: Cannot find wrapper assembly for type library "XXXXXLib".
      C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\AxImp.exe "C:\Blah\XXXXX.ocx" /out:obj\Debug\AxInterop.XXXXXLib.dll /rcw:obj\Debug\Interop.XXXXXLib.dll /delaysign /keyfile:public.snk
    AXIMP : AxImp error : Invalid strong name parameters specified.
    c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1558,9): warning MSB3283: Cannot find wrapper assembly for type library "AxXXXXXLib".

    B. So I tried the other way round

    1. Enabled strong name signing in project.
    2. As soon as i tried to drag the COM component to my form, error prompted: Failed to import ActiveX control. Make sure it is properly registered.

     

    So I found this slightly outdated article instructing me how to make Visual Studio 2005 to auto-generate strong name + delay signed interops.
    http://support.microsoft.com/kb/313666

    I can't find the location of this Wrapper Assembly Key File field in VS2010.

     

    Yes, I know how to manually generate a delay signed interop file with TLBIMP and then a delay signed AxInterop file with AxImp. But using these 2 non-Visual Studio generated interop files does not allow me to "ISOLATE " the COM component, which I intend to "Deploying COM Components with ClickOnce".

    Their File Type appeared differently in Visual Studio.

    • Manually generated interop files are treated as Assembly.
    • Visual Studio auto-generated interop files are treated as ActiveX.

     

    So, how can i properly configure VS2010 to auto-generate strong name + delay signed interop files based on the signing settings in my C# project?
    Or should I ask, how can I make this to work? Thanks.


    You know Hokkien or not?
    • Moved by Victor_Chen Monday, January 24, 2011 3:29 AM strong name (From:Visual Studio Editor)
    Wednesday, January 19, 2011 9:30 PM

All replies