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
21
votes
3 answers

How do I merge multiple .net assemblies into a single assembly?

I have a .net application with about 10 assemblies. It would be nice to have them all together as a single assembly. How do I do it? I guess something like a jar file for Java applications.
Russell
  • 17,481
  • 23
  • 81
  • 125
21
votes
3 answers

How to load Assembly at runtime and create class instance?

I have a assembly. In this assembly I have a class and interface. I need to load this assembly at runtime and want to create an object of the class and also want to use the interface. Assembly MyDALL = Assembly.Load("DALL"); // DALL is name of my…
Pankaj
  • 4,419
  • 16
  • 50
  • 72
21
votes
1 answer

Use of specific version reference in Visual Studio 2008

I have an assembly, Foo, which has a reference to assembly Bar (version X.X.X.2000). In the properties, the specific version is set to False. I have both Bar (x.x.x.2000) and Bar (x.x.x.1000) in my local GAC. Everything is fine. On another machine,…
sloth
  • 99,095
  • 21
  • 171
  • 219
20
votes
3 answers

Can a C# .dll assembly contain an entry point?

My goal is to create an executable that will start a shadow copied application. The trick is, I want this starter program to have no external dependencies and not have to contain any knowledge about the program it has to start. I also want it to be…
Sean
  • 533
  • 1
  • 5
  • 6
20
votes
4 answers

Serialization Assembly. Is it needed or not?

I have a .net 2.0 c# ClickOnce app and it connects to its data via Web Services. I've been told that one way to potentially speed up the application is to generate a serialization assembly beforehand. I have several questions on this front. The…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
20
votes
1 answer

Assembly binding redirect in .NET Core

How do I do assembly binding redirect in .NET Core? I found this question asked a few time with no solutions offered. The situation is trivial. I have a package refering to assembly A in version 10. I want to use assembly A in version 12. In a…
Eliyahu
  • 435
  • 1
  • 3
  • 12
20
votes
2 answers

Is it possible to Load an assembly from the GAC without the FullName?

I know how to load an assembly from a filename, and also from the GAC. As My .msi file will put a dll project into the GAC, I'm wondering if it's possible to load it from the GAC unknowing the FullName (I mean just with the assembly name, or even…
metalcam
  • 392
  • 2
  • 16
20
votes
7 answers

Determining if an assembly is part of the .NET framework

How can I tell from the assembly name, or assembly class (or others like it), whether an assembly is part of the .NET framework (that is, System.windows.Forms)? So far I've considered the PublicKeyToken, and CodeBase properties, but these are not…
Dave Arkell
  • 3,920
  • 2
  • 22
  • 27
20
votes
1 answer

How to reference to multiple version assembly

I'm developing a Sharepoint application and use .NET AjaxControlToolkit library, we are adding a custom aspx page to the Sharepoint. Sharepoint 2007 run in quirks mode so I've made some modification to the AJAX library to make it behave like it…
Fajar
  • 333
  • 3
  • 6
20
votes
1 answer

.NET: Strong naming vs. Authenticode

Having read about strong names in .NET here, for example, I have the following question: We have an Authenticode code signing certificate with which we sign all our EXE, DLL and MSI files. The benefit of that is that Windows knows the MSI comes from…
Helge Klein
  • 8,829
  • 8
  • 51
  • 71
20
votes
3 answers

Where to put InternalsVisibleTo

Related to this question is, how does the generation of the AssemblyInfo work? I have been putting InternalsVisibleTo in the file of the first class of an assembly where I realize that it will be useful. It seems more appropriate to be in…
Berryl
  • 12,471
  • 22
  • 98
  • 182
20
votes
5 answers

.NET Reference "Copy Local" True / False Being Set Based on Contents of GAC

We had a very interesting problem with a Win Forms project. It's been resolved. We know what happened, but we want to understand why it happened. This may help other people out in the future who have a similar problem. The WinForms project failed on…
D-Sect
  • 537
  • 3
  • 10
  • 22
20
votes
6 answers

Finding all Namespaces in an assembly using Reflection (DotNET)

I've got an assembly (loaded as ReflectionOnly) and I want to find all the namespaces in this assembly so I can convert them into "using" ("Imports" in VB) statements for an auto-generated source code file template. Ideally I'd like to restrict…
David Rutten
  • 4,716
  • 6
  • 43
  • 72
19
votes
11 answers

Version numbers is 1.13 > 1.2?

I know from the .NET perspective that an assembly with a version of 1.13 is considered a newer release than version 1.2 because each number in the version is evaluated individually. However from a numerical point of view 1.13 is < than 1.2. The…
Paul Alexander
  • 31,970
  • 14
  • 96
  • 151
19
votes
1 answer

Maven, Proguard and assembly issues

I'm trying to get Maven working with ProGuard. What I want to achieve is the following: Run ProGuard over my source files and produce obfuscated classes Create a manifest file that references the main class so that I can execute it as a jar Unpack…
Sway
  • 1,647
  • 3
  • 16
  • 19