Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assemblies vs Class Libraries (.NET)

Could anyone point out the advantage of using assemblies, in the 'context' of ASP.NET.

As I understand it, assemblies run as executables, have a single entry point, and can be run inside an application domain, but I've found very few suitable examples on the web.

like image 474
maxp Avatar asked Dec 11 '09 14:12

maxp


1 Answers

An assembly is not just an executable... an assembly is essentially a .NET library that may have an executable entry point...

Wikipedia article with description of assemblies First paragraph:

In the Microsoft .NET framework, an assembly is a partially compiled code library for use in deployment, versioning and security. There are two types: process assemblies (EXE) and library assemblies (DLL). A process assembly represents a process which will use classes defined in library assemblies. .NET assemblies contain code in CIL, which is usually generated from .NET languages, and then compiled into machine language at runtime by the CLR just-in-time compiler. An assembly can consist of one or more files. Code files are called modules. An assembly can contain more than one code module and since it is possible to use different languages to create code modules it is technically possible to use several different languages to create an assembly. Visual Studio however does not support using different languages in one assembly.

like image 140
John Weldon Avatar answered Nov 13 '22 00:11

John Weldon