tags:

views:

247

answers:

5

Hi, 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?

+2  A: 

Its roughly analogous to a DLL or an EXE.

Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.

http://msdn.microsoft.com/en-us/library/hk5f40ct%28VS.71%29.aspx

Robert Harvey
+2  A: 

Assembly = .net DLL or EXE; AssemblyInfo.cs is the conventional place to put the values that lived in the Version resource of a native executable.

Steve Gilham
+4  A: 

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.

Mark Brackett
+3  A: 

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.

blesh
+1  A: 

The AssemblyInfo.cs contains attributes for the assembly (defined in all the other answers). Attributes for example are version info.

Web