Questions tagged [.net-assembly]

A group of classes and namespaces compiled into a binary file, written in a .NET-specific language such as C# or VB.NET.

An assembly in .NET terminology is a set of modules assembled into a single process assembly (executable, ".exe") or a library assembly (".dll").

Assembly is the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions for .NET-based applications. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality.

3347 questions
57
votes
1 answer

What is the difference between Version and 'Runtime Version' in .Net?

When I open the properties window of one of the referenced dlls in my project in Visual Studio I see a Version and also a runtime version . Actually it is Rhino.Mocks library I am checking. And I see Runtime Version : v2.0.50727 Version :…
pencilCake
  • 51,323
  • 85
  • 226
  • 363
57
votes
7 answers

Find out dependencies of all DLLs?

I have a collection of DLLs(say 20). How do I find out all the DLLs on which one specific DLL (say DLL A) is depending upon?
Abhijeet
  • 13,562
  • 26
  • 94
  • 175
56
votes
5 answers

How to check the version of an assembly (dll)?

I have c# application and when I made a change, I am getting the error message: An unhandled exception of type 'System.TypeLoadException' occurred in WindowsFormsApplication1.exe Additional information: Could not load type …
user3229570
  • 853
  • 2
  • 10
  • 23
54
votes
6 answers

System.IO.FileNotFoundException: Could not load file or assembly 'X' or one of its dependencies when deploying the application

I'm having a strange problem with deploying an application, which references an assembly, written in managed c++. I've created an assembly X, compiled it and referenced it in an exe file, called Starter. Starter.exe starts normally on local mashine.…
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
52
votes
3 answers

Caching reflection data

What's the best way to cache expensive data obtained from reflection? For example most fast serializers cache such information so they don't need to reflect every time they encounter the same type again. They might even generate a dynamic method…
CodesInChaos
  • 106,488
  • 23
  • 218
  • 262
48
votes
10 answers

Resharper runs UnitTest from different location

When I run unit tests with Visual Studio it works fine, because it runs from project directory where all assemblies are. But when I run it with resharper it goes with error on var services = Assembly.Load("SomeAssembly"); with error Could not…
Roar
  • 2,117
  • 4
  • 24
  • 39
43
votes
3 answers

DLL reference not copying into project bin

Project A references Project B, and Project B references an external DDL (restored using NuGet). The DLL should get copied into Project A's bin folder (along with Project B's DLL): In my case, when running Project A, I get the following exception…
Dave New
  • 38,496
  • 59
  • 215
  • 394
42
votes
2 answers

How to determine calling method and class name?

I'm currently developing a application logging library using the built in TraceListener. This library will be used in many projects and should offer a simple interface where I only have to care about WHAT is going to be written in into the log file,…
Neurodefekt
  • 899
  • 2
  • 10
  • 18
42
votes
5 answers

How to get the assembly (System.Reflection.Assembly) for a given type in .Net?

In .Net, given a type name, is there a method that tells me in which assembly (instance of System.Reflection.Assembly) that type is defined? I assume that my project already has a reference to that assembly, just need to know which one it is.
Fabio de Miranda
  • 1,096
  • 1
  • 8
  • 13
41
votes
9 answers

Exception from HRESULT: 0x80070057 (E_INVALIDARG)

I have a WPF application . While building it I am getting the following error: Could not load file or assembly or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Application is trying to…
Simsons
  • 12,295
  • 42
  • 153
  • 269
40
votes
4 answers

How can I see the strong name of my assembly?

I have a project, and I created a strong name key file for it. How can I tell what the strong name of my assembly is? It seems this should be obvious, but I can't find any reference to it.
Jeremy Holovacs
  • 22,480
  • 33
  • 117
  • 254
39
votes
2 answers

How to register a .NET assembly as COM?

I have created a class library for a workflow on a local machine and build that. I moved the complete solution to a Tridion server and tried to register the assembly in the server using regasm.exe tool as below: C:\User\XYZ\Desktop\>RegAsm \codebase…
Jey
  • 2,137
  • 4
  • 22
  • 40
38
votes
3 answers

Get company name and copyright information of assembly

I am using Assembly.GetEntryAssembly().GetName() to get application/assembly name and its version but I do not see any variable for company name and copyright. How do I get that?
Computer User
  • 2,839
  • 4
  • 47
  • 69
38
votes
2 answers

Why does ASP.NET MVC 4 have so many NuGet packages and which are truly important?

As the title says, why do the ASP.NET MVC 4 projects have soooo many NuGet packages? Is the entire framework split into packages now? Which ones are truly important for an empty project that will be a website, no API, etc? UPDATE To clarify, I'm not…
Gup3rSuR4c
  • 9,145
  • 10
  • 68
  • 126
36
votes
9 answers

'Could not load file or assembly 'netstandard, Version=2.0.0.0, ...'. Reference assemblies should not be loaded for execution

Goal: From a .NET 4.7 console app, using reflection with Assembly.GetType(), I am trying extract the Type of a netstandard 2.0 class from Assembly X. Then I want to create an instance of this Type with Activator.CreateInstance(). What I am trying…