Assembly is a fundamental unit in .net which is versionable and gets created after successful compilation and it has an extension of .dll or .exe.
Strong naming an assembly is Basically a process of Private and Public Key Pair.
In .Net there are 2 types of assemblies:
- Week named assemblies
- strong name assemblies
Week name assembly are those which does not have Private and Public Key Pair.
Ex.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("this is new line.");
}
}
}
In the above code we have used Console class, this Console class is present in System namespace and this System namespace is present in System assembly, and this System is basically a .net assembly which gets installed when install .net in our machine.
When we install .net in our machine, two very important component gets installed one is the .net framework class library and the other one is run time environment which is nothing but the CLR. Within .net framework class library we have several class assembly which are present at a special location which is called GAC (Global Assembly Cache).
Path for GAC is like :
C:\Windows\assembly
We use Assembly Version attribute to specify the Assembly Version. The default is 1.0.0.0. The
version number of an assembly consists of the following 4 parts :
- Major Version
- Miner Version
- Build Version
- Revision Number
An assembly consists of 4 parts:
- Simple textual name.
- Version number
- Culture information (Otherwise the
assembly us language neutral)
- Public Key Token
0 Comment(s)