Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the concept of an Assembly in .NET?

Tags:

c#

.net

I'm new to .NET and am having trouble understanding the concept of an Assembly - what is an Assembly? What do people mean when they say 'copy the assembly...'? What is the purpose of AssemblyInfo.cs?

like image 811
Nosrama Avatar asked Aug 04 '09 20:08

Nosrama


People also ask

What is assembly in c# NET with example?

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.

Which is an assembly format in NET?

. NET defines a binary file format, assembly, that is used to fully describe and contain . NET programs. Assemblies are used for the programs themselves as well as any dependent libraries.

What is .NET assembly explain its types?

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 is an assembly in Visual Studio?

An Assembly is a basic building block of . Net Framework applications. It is basically compiled code that can be executed by the CLR.


2 Answers

what is an Assembly?

A physical unit of deployment.

What do people mean when they say 'copy the assembly...'?

Most assemblies are XCopy deployable - meaning you can just file copy them to their destination.

What is the purpose of AssemblyInfo.cs?

It sets Assembly level metadata. Things like version number, copyright notices, COM interop rules, etc.

like image 135
Mark Brackett Avatar answered Oct 19 '22 10:10

Mark Brackett


a reusable, versionable, and self-describing building block of a common language runtime application.

Best to go to the creator's website and do a search:

http://msdn.microsoft.com/en-us/library/hk5f40ct(VS.71).aspx

http://msdn.microsoft.com/en-us/library/system.reflection.assembly.aspx

It's reusable, meaning you can duplicate it and use it in conjunction with other applications/assemblies that reference it.

It's versionable, meaning you can have many different versions of the same assembly and other applications/assemblies can reference any of those versions, or just the newest one.

It's self-describing, meaning it projects an interface to the world for other applications/assemblies to consume.

AssemblyInfo.cs is just a file where you can go edit various descriptors about your assembly. For instance the title, description, or the version number.

like image 30
Ben Lesh Avatar answered Oct 19 '22 11:10

Ben Lesh