The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Signing your assembly, newbie guide

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frans Bouma

Posts: 265
Nickname: fbouma
Registered: Aug, 2003

Frans Bouma is a senior software engineer for Solutions Design
Signing your assembly, newbie guide Posted: Dec 26, 2003 10:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Frans Bouma.
Original Post: Signing your assembly, newbie guide
Feed Title: Frans Bouma's blog
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/fbouma/Rss.aspx
Feed Description: Generator.CreateCoolTool();
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Frans Bouma
Latest Posts From Frans Bouma's blog

Advertisement

Follow these easy steps. The first 4 steps you only have to do ONCE in your life. Step 5-7 you only have to do ONCE per project.

  1. Open a command prompt
  2. Type vsvars32.bat (enter) or navigate to the .NET bin dir
  3. Type: sn -k mykey.key (enter)
  4. Move mykey.key to a folder where it gets backupped daily, for example: c:\myfiles\keys\
  5. Open your code's solution in Visual Studio.NET
  6. Open the AssemblyInfo class in the editor
  7. For the attribute AssemblyKeyFile(), specify instead of the default "", the full path of your key, in our example this is "c:\myfiles\keys\mykey.key", so the attribute in full will be:
    C#: [assembly: AssemblyKeyFile("c:\\myfiles\\keys\\mykey.key")]
    VB.NET: <Assembly: AssemblyKeyFile("c:\myfiles\keys\mykey.key")>
  8. Compile your solution. After compilation, your assembly is signed with your strong key.
  9. To congratulate yourself with this big achievement, walk to the fridge and pop open a fresh Heineken.

*Pfew* I have to lay down now to take some rest after this long, thorough lecture. Sorry people, but you don't need a plugin which requires registration to do this easy stuff. If you can program software, you can sign your assembly. If not, what are you doing near that keyboard? ;)

The signed assembly can be freely distributed to your clients/customers. They can reference it in their .NET projects without having to worry about public keys, public tokens or other hard to understand material. The world is already very complex, let's not make the easy stuff look like it's very complex also.

Update: Thanks to 'Prima Donna' Robert Mclaws for pointing to a typo in the title.

Kereltje, zodra jij zo goed Nederlands lult als ik Engels, heb je recht van spreken.

Read: Signing your assembly, newbie guide

Topic: New Blogging Home Previous Topic   Next Topic Topic: ToDoList new version

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use