none
regasm and the codebase switch

    Question

  • Hello,

     

    I'm using regasm with the codebase switch. I get this warning:

     

    RegAsm warning: registering an unasigned assembly with /codebase can cause your assembly to interfere with other app. that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name.

     

    I fully understand this warning and attempted to rectify the problem by signing my assemblies. However, I now get build errors as some of my project references (other .net dlls) are not strongly typed.

     

    I don't really want to have to edit these projects to make them signed assemblies (they are part of a much bigger solution that I don't really want to touch).

     

    Is there any way around this?

    Thursday, April 24, 2008 7:53 PM

Answers

  • Nope, all of the assemblies referenced by a strong named assembly need to be strong named as well.  There's no workaround for this.  If your problem is caused by having unsigned Interop assemblies, sign your assembly first, then remove the references and add them back in.  The IDE ensures that the Interop assemblies will now be strong named as well.
    Friday, April 25, 2008 1:53 PM
    Moderator

All replies

  • The warning says you shouldn't register unsigned assemblies with codebase. If you don't use the codebase switch, then the warning doesn't appear.

    The advice given by Microsoft (and others) is that do not use codebase when you are deploying your product. It should be used only for testing purposes. I don't know if you can get rid of codebase. If you can't then you have to live with the warning.

    Also note that when you are installing your product, this particular dll might give you problems while registering. Installshield causes a lot of trouble for regasm with codebase dlls.
    Friday, April 25, 2008 9:21 AM
  • Nope, all of the assemblies referenced by a strong named assembly need to be strong named as well.  There's no workaround for this.  If your problem is caused by having unsigned Interop assemblies, sign your assembly first, then remove the references and add them back in.  The IDE ensures that the Interop assemblies will now be strong named as well.
    Friday, April 25, 2008 1:53 PM
    Moderator
  • Thanks for the replies.

     

    I signed the references and it works fine now.

    Friday, April 25, 2008 6:41 PM