Home arrow VB.Net arrow Building Assemblies with VB.Net

Building Assemblies with VB.Net

Shekar's article is a brief introduction into the world of Assemblies, using VB.Net, and their core security features.

Author Info:
By: Shekar Krishna
Rating: 4 stars4 stars4 stars4 stars4 stars / 53
October 16, 2003
  1. · Building Assemblies with VB.Net
  2. · How to Build a Strong Name Assembly
  3. · Signing of the Assembly and Preventing Tampering

print this article

Building Assemblies with VB.Net
(Page 1 of 3 )

This article discusses how to build assemblies and secure them from being tampered with.  Every assembly built using the .NET compiler has a four-part name consisting of the following elements:

  1. Friendly name
  2. Version number
  3. Culture setting
  4. Public key or public key token

The first part is a friendly name Like MyAssembly.

The second part is the version number say These four numbers represent the major version, minor version, build number, and revision number respectively.  The assembly can be built with a specific version number by placing the following code at the top of any of the project source files:

Imports System.Reflection
<Assembly: AssemblyVersion (>

The AssemblyVersion attribute is defined in the System.Reflection namespace. If no version number is specified, the compiler assigns a version number of

The third part is the culture setting indicating that the assembly has been localized for a particular spoken language.

The fourth, and the last, part of an assembly name is the public key.  This value is unique and represents a particular company or developer . Two companies should never use the same public key.  The public key occupies 128 bytes and is stored as a binary format in a key file. It can also be written using a text based hexadecimal format as shown below:

                  00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00  
           00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00  
           CD 79 18 40 51 8C D7 25 A5 49 13 BA 4B 4F CF 34   
           03 4A 7B 6E 17 8E 5C 41 9E 95 EA 78 0B E9 60 5D   
           9D EE 52 24 25 0A 25 90 E0 7D 4A EC 13 90 21 45   
           76 BB AE FB F4 B6 08 1D F4 7B 6C B9 A4 EC 62 AF 
           1F C8 54 B2 92 96 11 B6 B8 9D 41 8C 24 B5 30 10   
           0B 1C F5 1C CA D3 4A 2F D5 59 16 D5 E0 B5 B9 D6  
           68 61 18 4D 3B D0 E7 C4 73 6C 6B DF 41 D0 00 4F   
           A6 E0 9F 98 52 6C 68 FA 1E 86 CA 1D AE CE A5 B7

Because the public key is so large, a smaller 8 byte value, known as a public key token, is used in its place. The public key token is usually represented by a 16-character hexadecimal string value that looks like this:

A9 FA E6 01 40 67 F5 F1

There is a one to one correspondence between a public key value and a public key token -- i.e.: for a specific public key token there is exactly one corresponding public key value.

blog comments powered by Disqus

- MyClass - Implementing Polymorphism in VB.Net
- Building a News Ticker Using VB.Net
- Everything You Wanted to Know About Forms In...
- Building Assemblies with VB.Net
- Simple VB.NET Notify Icon with Panel Applica...
- Regular Expressions in .NET
- String Encryption With Visual Basic .NET
- Deploying Applications in VB.NET: Part 1/2
- Watching Folder Activity in VB.NET
- Creating A Windows Service in VB.NET
- Implementing The Google Web Service In VB.NET
- Migrating to Visual Basic.NET from Visual Ba...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials