Signing an Assembly in Whidbey

I have been working on some components that require signing.  One of the things that frustrated me back during .NET 1.x beta was that the option to automagically create a keyfile was removed after beta 2.  The feedback that I heard was that security is important and the ability to just randomly create a keyfile was not good practice, therefore the ability to create the keyfile was removed.  Well, I have been dinking back around with COM+ in Whidbey.  With COM+, you have to create a keyfile.  Well, the ability to create and use a key has been put back into the IDE as of Beta 2, which I think is great news.  You select your project and then its properties.  There is a tab label signing.  With that, you can either create a new keyfile or use an exisiting one.  One side genefit of this is that it appears there is no need to specify the assebly's keyfile in the attributes for the assembly.  I think that this is an improvement as I always seemed to have problems with getting the directory correct in Everrett.


1 Comment

  • I have found that you can edit the .csproj file and "fix" the path to the key file, so that you can keep exactly one key file around. I just changed <AssemblyOriginatorKeyFile>keys.snk</AssemblyOriginatorKeyFile> to <AssemblyOriginatorKeyFile>..\..\keys.snk</AssemblyOriginatorKeyFile> in my case. The VS 2005 GUI needs to be fixed to respect that, because it just shows a blank! But, it works correctly when compiling .

Comments have been disabled for this content.