ASP.NET

How .NET finds the assemblies during program execution

.NET finds the assemblies during program execution

1.NET figures out what version is needed : Usually the information about the dependant assemblies is present in the application’s assembly manifest. CLR checks the application configuration file, publisher policy file(if exists), and machine config file for information that overrides the version information stored in the calling assembly’s manifest. 
2. .NET searches GAC (Global Assembly Cache) : .NET searches GAC only if the assembly is strongly named.
3. If the assembly is not found in the GAC, and if there is a .config file, then .NET searches the location in the cofiguration file, else .NET searches directory containing the executable (.EXE)
4. If the assembly is not found, the application terminates with error.

Note: Version checking is not done for Weakly Named Assemblies (Assemblies without a strong name)

About the author

shohal

Leave a Comment