Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding .NET assemblies

When I build a project in a solution in Visual Studio (it can be C# VB.NET F# or else) I suppose that only one assembly per project is generated right?

So if I have a solution containing project 1 2 3 and 4 When I build one by one each project I get 4 assemblies right?

However, is there the possibility to let the builder/compiler generate only one assembly for the entire solution? Or for two projects compiled together?

I mean something like calling the compiler using the command line and setting a target assembly...

like image 262
Andry Avatar asked Feb 28 '11 10:02

Andry


People also ask

What do you understand about .NET assemblies?

NET-based applications. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. Assemblies take the form of executable (.exe) or dynamic link library (. dll) files, and are the building blocks of .

What are the different types of .NET assemblies?

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. .

What are assemblies in C#?

An assembly is a file that is automatically generated by the compiler upon successful compilation of every . NET application. It can be either a Dynamic Link Library or an executable file. It is generated only once for an application and upon each subsequent compilation the assembly gets updated.

What is difference between DLL and assembly in NET?

An assembly is a collection of one or more files and one of them DLL or EXE. DLL contains library code to be used by any program running on Windows. A DLL may contain either structured or object oriented libraries. A DLL file can have a nearly infinite possible entry points.


1 Answers

By default there is a 1 to 1 correspondence between projects and assemblies. But you can use a tool like ILMerge to create one assembly from several.

like image 130
CodesInChaos Avatar answered Oct 22 '22 13:10

CodesInChaos