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
26
votes
5 answers

InvalidCastException for two Objects of the same type

I have this weird problem that I cannot handle myself. A class in the model of my mvp-project designed as singleton causes an InvalidCastException. The source of error is found in this code line where the deserialised object is assigned to the…
LLEA
  • 345
  • 1
  • 4
  • 7
26
votes
2 answers

Maven assembly - Error reading assemblies

I have defined a personalized jar-with-dependencies assembly descriptor. However, when I execute it with mvn assembly:assembly, I get : ... [INFO] META-INF/ already added, skipping [INFO] META-INF/MANIFEST.MF already added, skipping [INFO] javax/…
Laurent
  • 14,122
  • 13
  • 57
  • 89
26
votes
3 answers

Unable to uninstall an Assembly from GAC?

I am unable to uninstall an Assembly (log4net.dll) from GAC. It is giving following error. "Assembly is required by one or more applications". However if I search the Assembly using ProcessExplorer nothing comes up? How can I remove this Assembly…
Amitabh
  • 59,111
  • 42
  • 110
  • 159
26
votes
3 answers

Getting runtime version of a Silverlight assembly

I want to show my Silverlight 3 application's version number in the about box, but when I use a traditional .Net call like: Assembly.GetExecutingAssembly().GetName().Version; I get a MethodAccessException on the GetName() call. How am I supposed to…
Dov
  • 15,530
  • 13
  • 76
  • 177
25
votes
4 answers

Good way to preload .NET assembly

In my app I need to show a form on mouse click. The problem is that the form is in another assembly and because of lazy nature of assembly loading it is likely that the assembly isn't loaded yet when the mouse button is pressed. So what I have is…
Dyppl
  • 12,161
  • 9
  • 47
  • 68
25
votes
5 answers

ASP.NET: WebResource.axd call 404 error: how to know which assembly/resource is missing or responsible?

I get a 404 HTTP status error (not found) on a specific WebResource.axd call inside an ASP.NET 3.5 (AJAX) web application. I guess the error is thrown because a specific referenced assembly is missing in the bin folder/GAC. But I don't know which,…
splattne
  • 102,760
  • 52
  • 202
  • 249
25
votes
3 answers

Embedding Intellisense Xml Documentation in Assembly?

I have an assembly containing very thorough XML-based documentation, which is used through Sandcastle to generate the help-files for the product. We also use the output XML files for providing proper Intellisense in Visual Studio when programmers…
ulrikj
  • 176
  • 2
  • 12
25
votes
5 answers

Why is assembly binding redirect not working in my web site?

I have a web site project that I run from Visual Studio using the built in development web server. The virtual path of the web site is set to / The web.config contains a runtime element with
Michiel van Oosterhout
  • 22,839
  • 15
  • 90
  • 132
25
votes
8 answers

.NET Assembly Diff / Compare Tool - What's available?

I'd like to be able to do a code-level diff between two assemblies; the Diff plug-in for Reflector is the closest thing I've found so far, but to compare the entire assembly is a manual process requiring me to drill-down into every…
STW
  • 44,917
  • 17
  • 105
  • 161
24
votes
7 answers

C# - Fastest way to get resource string from assembly

I really don't know/have the answer, knowledge to find a resource value using a key from a resx file in a assembly using c#.(or may be i am ignorant). What would be the fastest code, way i can retrieve string values or values using a key from a…
Deeptechtons
  • 10,945
  • 27
  • 96
  • 178
24
votes
13 answers

C# - Excluding unit tests from the release version of your project

How do you usually go about separating your codebase and associated unit tests? I know people who create a separate project for unit tests, which I personally find confusing and difficult to maintain. On the other hand, if you mix up code and its…
petr k.
  • 8,040
  • 7
  • 41
  • 52
24
votes
2 answers

Assemblies in Web.config

I've been doing .NET development for about a year, but I still don't know what the purpose of the section is. What is the section's purpose? Can I delete the assemblies specified in there? I asked some senior developers in my team but…
kevin
  • 13,559
  • 30
  • 79
  • 104
24
votes
2 answers

Loading different versions of the same assembly

Using reflection, I need to load 2 different versions of the same assembly. Can I load the 2 versions in 2 different AppDomains in the same process? I need to do some data migration from the old version of the app to the new version. Please let me…
Gulzar Nazim
  • 51,744
  • 26
  • 128
  • 170
24
votes
5 answers

Is it possible to execute a .NET dll without an exe to load it?

I'm curious if there's a way to execute a static .DLL method in a new process without having to create an .EXE for it? AFAIK, this isn't possible with native Win32/64 DLLs. How about .NET DLL assemblies? UPDATE: I forgot to mention I'm primarily…
aoven
  • 2,248
  • 2
  • 25
  • 36
24
votes
16 answers

How to stop Visual Studio adding assemblies to my web.config?

Every time i build, or publish, a web-site, Visual Studio attempts to check out the web.config file so that it can add numerous assemblies that are not required. In other words: web.config before:
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219