Questions tagged [assemblies]

Assemblies are collections of compiled .Net types and resources grouped into a logical and physical unit (in the form of a .dll file or .exe file).

Assemblies are collections of compiled .Net types and resources grouped into a logical and physical unit (in the form of a .dll file or a .exe file - which has an entry point).

If a .exe is a .NET assembly then it also contains a CLR header as a data block inside the PE header.

2372 questions
43
votes
6 answers

ILMerge DLL: Assembly not merged in correctly, still listed as an external reference

In the build process for a .NET C# tool, I have been using ILMerge to merge the assemblies into a single exe. I added a new class library recently, and now the ILMerge is failing. I have remembered to tell it to merge in the new DLL! It is now…
Fiona - myaccessible.website
  • 14,481
  • 16
  • 82
  • 117
42
votes
4 answers

When should I deploy my assemblies into the GAC?

I would like to know practically what kind of Assemblies should I deploy in GAC. Case 1: If in my Solution multiple project uses log4net.dll then should it be deployed in GAC? Case 2: If I have multiple application deployed in a machine each using…
Amitabh
  • 59,111
  • 42
  • 110
  • 159
42
votes
4 answers

How to prevent a .NET application from loading/referencing an assembly from the GAC?

Can I configure a .NET application in a way (settings in Visual Studio) that it references a "local" assembly (not in GAC) instead of an assembly within the GAC, although both assemblies have the same name and the same version?
Flo
  • 27,355
  • 15
  • 87
  • 125
42
votes
4 answers

how to load all assemblies from within your /bin directory

In a web application, I want to load all assemblies in the /bin directory. Since this can be installed anywhere in the file system, I can't gaurantee a specific path where it is stored. I want a List<> of Assembly assembly objects.
mrblah
  • 99,669
  • 140
  • 310
  • 420
41
votes
4 answers

What is a mixed mode assembly?

I am looking at the System.Data.SQLite download page, and it lists mixed mode assembly for .NET 4 and a regular (I assume). My project that is going to use this library is all .NET 4 which will be compiled to x86. I have 2 questions: What is a…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
41
votes
7 answers

How to get Namespace of an Assembly?

Consider i have an assembly(class library dll) which i have loaded using the following code, Assembly a = Assembly.LoadFrom(@"C:\Documents and Settings\E454935\My Documents\Visual Studio…
SyncMaster
  • 9,754
  • 34
  • 94
  • 137
41
votes
3 answers

Error reading assemblies: No assembly descriptors found

I get Error reading assemblies: No assembly descriptors found when building my project. I'm trying to set permissions for my .sh files and exclude a nasty .jar file that makes my application crash...I don't think the problem is about that…
Luli
  • 661
  • 1
  • 6
  • 10
41
votes
5 answers

How to load a .NET assembly for reflection operations and subsequently unload it?

I'm writing a tool to report information about .NET applications deployed across environments and regions within my client's systems. I'd like to read the values of assembly attributes in these assemblies. This can be achieved using…
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
41
votes
8 answers

Embedding assemblies inside another assembly

If you create a class library that uses things from other assemblies, is it possible to embed those other assemblies inside the class library as some kind of resource? I.e. instead of having MyAssembly.dll, SomeAssembly1.dll and SomeAssembly2.dll…
xyz
  • 27,223
  • 29
  • 105
  • 125
41
votes
11 answers

ASP.Net cannot create/shadow copy

I get this error repeatedly when developing ASP.Net applications: Cannot create/shadow copy 'XXXXX' when that file already exists Where XXXXX is a random DLL. Typically the DLL is one of the DLLs from Microsoft's Enterprise Library, but it…
david.mchonechase
  • 2,219
  • 3
  • 22
  • 24
40
votes
5 answers

How to save DLLs in a different folder when compiling in Visual Studio?

Let's suppose I have a Window Forms / Console Application C# project with some external references and references to other class library projects in the same solution too. When I build the Window Form project, I want the referenced libraries be…
Oscar Mederos
  • 29,016
  • 22
  • 84
  • 124
40
votes
5 answers

Is a Java package the equivalent of a .Net assembly?

I am a .Net developer starting Java development for Android and would like to know if it's correct to think of Java packages like .Net assemblies.
JimDaniel
  • 12,513
  • 8
  • 61
  • 67
38
votes
4 answers

Best practices for assembly naming and versioning?

I am looking out for some good practices on naming assemblies and versioning them. How often do you increment the major or minor versions? In some cases, I have seen releases going straight from version 1.0 to 3.0. In other cases, it seems to be…
Gulzar Nazim
  • 51,744
  • 26
  • 128
  • 170
36
votes
11 answers

"Are you missing an assembly reference?" compile error - Visual Studio

I am currently working on a server control for other applications in our company to interface with a WCF service. Every time I make a change code change and recompile the control, I increment the the AssemblyVerison and AssemblyFileVersion class…
Michael Kniskern
  • 24,792
  • 68
  • 164
  • 231
36
votes
5 answers

C# assemblies, whats in an assembly?

I'm trying to understand the internal access modifier in C#. I can't seem to understand what an assembly is exactly, and what part of my program is held inside that assembly. I was trying to make it so that a variable is accessibly only by objects…
Prodigga
  • 1,457
  • 1
  • 22
  • 37