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
12
votes
1 answer

"Why is my .net exe so huge" analyzer tool?

Is there a tool that can explain the size of a .NET assembly (executable or DLL file)? In the olden days, there was an IDE extension that would detail the space used by a project. It should show the large code files: And data resources: Is there…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
12
votes
4 answers

Get the Assembly path C#

Im trying to know the path of a dll.... several sites says that ive to use System.Reflection.Assembly.GetExecutingAssembly().Location BUT it returns a path in C:\Windows\Microsoft.Net ... etc... \File.Dll and i want…
jmpena
  • 1,399
  • 6
  • 19
  • 26
12
votes
5 answers

How can I troubleshoot : System.TypeLoadException?

Can you show me a way to troubleshoot System.TypeLoadException ? I am having this exception for an existing project in my solution which I reference from a unit test project in the same solution. This exeption is thrown when I run my unit tests.…
pencilCake
  • 51,323
  • 85
  • 226
  • 363
12
votes
8 answers

Signing my assembly with a strong name stops it from working

A colleague of mine created an assembly in VB.net for use with JScript via COM interop. The assembly used to work fine, but we signed it and now it only seems to work on Windows 7 machines. I've tested 2 Windows 7 machines and 2 Windows Vista…
Andy E
  • 338,112
  • 86
  • 474
  • 445
12
votes
4 answers

Including resources file for Unit test in C# project

I have some functions that read and modify files. In order to make the unit tests independent of any file system issues, I want to include the files inside the project. However, my function should be getting the filePath, and all I can get from the…
Yossale
  • 14,165
  • 22
  • 82
  • 109
12
votes
6 answers

Modify Emdeded String in C# compiled exe

I have an issue where I need to be able to have a compiled exe ( .net 3.5 c# ) that I will make copies of to distribute that will need to change a key for example before the exe is sent out. I cannot compile each time a new exe is needed. This is a…
nitefrog
  • 1,760
  • 6
  • 31
  • 59
12
votes
2 answers

C#: How to load assembly from GAC?

I have "mycomp.myassembly.dll" in GAC but Load and LoadFrom throws file not found exception and LoadWithPartialName returns null. I'm doing the following: AssemblyName name = new AssemblyName(); name.Name = "mycomp.myassembly.dll"; …
Artem
  • 7,275
  • 15
  • 57
  • 97
12
votes
3 answers

What is the best practice for compiling Silverlight and WPF in one project?

I've just completed a Silverlight project and it's time to have a little clean up. I'd like to take my core files and put them into a separate project which I will reference from my main Silverlight app. Some of these classes are compatible with WPF…
Mark Ingram
  • 71,849
  • 51
  • 176
  • 230
12
votes
8 answers

How do I find out if a .NET assembly contains unmanaged code?

.NET assemblies that contain a mixture of managed and unmanaged code cannot be ILMerged with other assemblies. How can I verify if a given .NET assembly contains purely managed code, or a mix of managed and unmanaged code?
Daniel Fortunov
  • 43,309
  • 26
  • 81
  • 106
12
votes
1 answer

What install files in location - Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5

Please bear with me on this, I will try to explain as clearly as I can. I started a new project (class library) which targets 4.5 and not the client profile 4.5. I added a reference "System.Runtime.Serialization" and the properties indicates it's in…
rizan
  • 339
  • 1
  • 3
  • 16
12
votes
3 answers

Programmatically retrieving assembly version of a running service

I'd like to access to assembly version information of a service I "control" with ServiceController class. (ie. I'd like to display "2.3.1.23" ), however I can't find any information about retrieving assembly versions ... Is it possible at all? EDIT:…
David Božjak
  • 16,887
  • 18
  • 67
  • 98
12
votes
3 answers

FileNotFoundException for mscorlib.XmlSerializers.DLL, which doesn't exist

I'm using an XmlSerializer to deserialize a particular type in mscorelib.dll XmlSerializer ser = new XmlSerializer( typeof( [.Net type in System] ) ); return ([.Net type in System]) ser.Deserialize( new StringReader( xmlValue ) ); This throws a…
Keith
  • 150,284
  • 78
  • 298
  • 434
11
votes
2 answers

Tool to show assembly dependencies

I begun work in a new project with lots of assemblies in a single solution. I am not familiar yet with the assembly dependencies and having a hard time figuring out which assembly depends on another. Do you know any tools that are capable to show a…
SvenG
  • 5,155
  • 2
  • 27
  • 36
11
votes
1 answer

When should I use "Invariant Language (Invariant Country)" as neutral language for an assembly?

At the moment I can think of three cases: assemblies that don't contain any resources control libraries that only contain images (ie. ToolBoxBitmaps) within their resource files libraries that contain only text used for throwing exceptions (we…
takrl
  • 6,356
  • 3
  • 60
  • 69
11
votes
2 answers

Could not load file or assembly 'Microsoft.Windows.Design.Extensibility'?

Strange. I am trying to deploy my application, normally there is not problems but recently i played with adding LINQ2SQL to the project and adding Entity Framework.. but removed them. Now when i try to deploy to my server, running it i am getting…
Rushino
  • 9,415
  • 16
  • 53
  • 93