Determine the .NET Versions on which an Application is Compiled and Running

No Comments »

The version of .NET against which you compile an application or assembly may not be the same version of .NET on which the application is currently running. A .NET application should always be able to run on the same or newer version of .NET against which it was compiled.

This is because .NET is backward compatible. This means that an application compiled on .NET v1.1 should run OK on .NET v2.0 and v3.0. But an application compiled on .NET v2.0 will not run on .NET v1.1.

Read the rest of this entry »

.NET Assembly FAQ – Part 4 – Global Assembly Cache

29 Comments »

This multi-part article answers common questions about assemblies, the basic building blocks of .NET applications. This Part 4 covers shared assemblies and the Global Assembly Cache.

Read the rest of this entry »

Determine if a Loaded .NET Assembly is Signed

9 Comments »

A .NET assembly is “signed” if the developer compiled the assembly with the private key of a digital signature. When the system later loads the assembly, it verifies the assembly with the corresponding public key. Occasionally you may need to determine whether an assembly you have loaded has been signed.

Read the rest of this entry »

.NET Assembly FAQ – Part 3 – Strong Names and Signing

39 Comments »

This multi-part article answers common questions about assemblies, the basic building blocks of .NET applications. This Part 3 discusses assembly security using strong names, signing and public-private key pairs.

Read the rest of this entry »

.NET Assembly FAQ – Part 2 – Attributes

1 Comment »

This multi-part article answers common questions about assemblies, the basic building blocks of .NET applications. This Part 2 discusses assembly attributes.

Read the rest of this entry »

Obfuscation? Gesundheit!

11 Comments »

If you are a .NET developer, how would you feel if your original C# or VB source code was published on the Web for the world to see? That’s exactly what happens if you release your .NET software without obfuscation.

Read the rest of this entry »

.NET Assembly FAQ – Part 1

19 Comments »

Frequently asked questions, some assembly required.

This multi-part article answers common questions about assemblies–the basic building blocks of .NET applications. Some developers may never need to understand assemblies. But if you create shared components, use DLLs or deliver a suite of applications, then it’s essential to understand what .NET assemblies are and how they work.

Read the rest of this entry »

Adding Assemblies to the Visual Studio “Add Reference” Dialog

8 Comments »

When you attempt to add an assembly reference to a Visual Studio project, the Add Reference dialog appears with a list of registered global assemblies in the .NET tab:

Add Your Assembly to Visual Studio

Unfortunately, adding your assembly to the Global Assembly Cache (GAC) does NOT make it automatically appear in the Visual Studio list of installed assemblies; you must add your assembly manually as follows:

Read the rest of this entry »

Determine the Version of a Loaded .NET Assembly

1 Comment »

Sometimes you need to know which version of an assembly was loaded by your .NET application. The following code snippet makes it easy:

Read the rest of this entry »