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
30
votes
7 answers

Determine whether .NET assemblies were built from the same source

Does anyone know of a way to compare two .NET assemblies to determine whether they were built from the "same" source files? I am aware that there are some differencing utilities available, such as the plugin for Reflector, but I am not interested in…
Clayton
  • 301
  • 3
  • 4
30
votes
4 answers

A procedure imported by {myassembly} could not be loaded

when running a prorgam, it seems that I am missing a library, when I launch the output of my project I get an exception at startup. A first chance exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll An unhandled exception of…
BlueTrin
  • 9,610
  • 12
  • 49
  • 78
29
votes
4 answers

How to pre-load all deployed assemblies for an AppDomain

UPDATE: I now have a solution I'm much happier with that, whilst not solving all the problems I ask about, it does leave the way clear to do so. I've updated my own answer to reflect this. Original Question Given an App Domain, there are many…
Andras Zoltan
  • 41,961
  • 13
  • 104
  • 160
29
votes
4 answers

.NET: Should executables be strong-name signed? What about private DLLs?

My application consists of three assemblies: a single EXE which references a couple of DLLs. The DLLs are private to my application - they are used only by this executable. Should these assemblies be given a strong name? FxCop suggests that they…
user200783
  • 13,722
  • 12
  • 69
  • 135
29
votes
13 answers

Could not load file or assembly for Oracle.DataAccess in .NET

When I try to run a simple program to access oracle I am getting this message Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system…
Chris
  • 291
  • 1
  • 3
  • 3
28
votes
4 answers

Signing assemblies - basics

What does it mean to sign an assembly? And why is it done? What is the simplest way to sign it? What is the .snk file for?
raklos
  • 28,027
  • 60
  • 183
  • 301
28
votes
4 answers

How do I create and use a .NET metadata-only 'Reference Assembly'?

Since version 3.0, .NET installs a bunch of different 'reference assemblies' under C:\Program Files\Reference Assemblies\Microsoft...., to support different profiles (say .NET 3.5 client profile, Silverlight profile). Each of these is a proper .NET…
Govert
  • 16,387
  • 4
  • 60
  • 70
28
votes
2 answers

Reading Assembly version information of WPF application

I am reading version information of my wpf application, but I am not getting the correct version as I have write in AssemblyInfo.cs file. In my file there is [assembly: AssemblyVersion("0.1.001")] [assembly: AssemblyFileVersion("0.0.001")] I am…
Muhammad Akhtar
  • 51,913
  • 37
  • 138
  • 191
27
votes
5 answers

ASP.NET error with Assembly

Hello I am creating an ASP.NET/C# website and I want to use the Ajax Toolkit assembly. I added it to the "References". In Default.aspx I have this: <%@ Page Title="My_Website" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"…
Y2theZ
  • 10,162
  • 38
  • 131
  • 200
27
votes
4 answers

Initialize library on Assembly load

I have a .net library dll that acts like a functional library. There are a bunch of static types along with static methods. There is some initialization code that I need to run to set up the library ready for use. When the assembly gets loaded is…
sixtowns
  • 449
  • 2
  • 6
  • 13
27
votes
2 answers

AppDomain.CurrentDomain.AssemblyResolve asking for a .resources assembly?

using the code How to embed a satellite assembly into the EXE file provided by csharptest.net, I've created a custom assembly resolver and embedded my assemblies in my resources. I can successfully resolve my assemblies used in but somehow…
HuseyinUslu
  • 4,094
  • 5
  • 33
  • 50
27
votes
9 answers

Does .NET assembly size affect performance?

Does the size of a .net assembly affect performance at all? How about the number of assemblies in your windows forms/web forms project?
Blankman
  • 259,732
  • 324
  • 769
  • 1,199
27
votes
5 answers

How do I get the version of an assembly without loading it?

One small function of a large program examines assemblies in a folder and replaces out-of-date assemblies with the latest versions. To accomplish this, it needs to read the version numbers of the existing assembly files without actually loading…
Jay Cincotta
  • 4,298
  • 3
  • 21
  • 17
27
votes
4 answers

Not all assemblies are being loaded into AppDomain from the bin folder

I have the following method that should retrieve a list of loaded local (in bin folder) assemblies: static IEnumerable GetLocalAssemblies() { Assembly callingAssembly = Assembly.GetCallingAssembly(); string path = new…
Byron Sommardahl
  • 12,743
  • 15
  • 74
  • 131
26
votes
3 answers

Change assembly version for multiple projects

How can I change the assembly version in the file AssemblyInfo.cs for multiple projects. We have around 75 project in our solution and we need to change the version almost every week. What is the fastest way to do this.
Ramesh Soni
  • 15,867
  • 28
  • 93
  • 113