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
25
votes
2 answers

Which is better for getting assembly location , GetAssembly().Location or GetExecutingAssembly().Location

Please suggest which is the best to getting executing assembly location. Assembly.GetAssembly(typeof(NUnitTestProject.RGUnitTests)).Location or Assembly.GetExecutingAssembly().Location Please suggest which can be better. Can I use…
Neeraj Dubey
  • 4,401
  • 8
  • 30
  • 49
25
votes
6 answers

How to access classes in another assembly for unit-testing purposes?

I'm jumping into unit-testing the Visual-Studio 2008 way, and I'm wondering what's the best way to accomplish cross-assembly class access for testing purposes. Basically, I have two projects in one solution: MyProject (C#) MyProjectTests (C# Test…
Kevin Montrose
  • 22,191
  • 9
  • 88
  • 137
24
votes
2 answers

What is Fusion in .NET Assembly

In Suzanne Cook's blog there is such a description: LoadFrom Context: In general, if the user provided Fusion a path which was used to find the assembly (and the assembly at that path wouldn't have been found in the Load context), then it's in…
Tarik
  • 79,711
  • 83
  • 236
  • 349
24
votes
6 answers

Retrieve Target Framework Version and Target Framework Profile from a .Net Assembly

Is there any way that I can access the values that were used for TargetFrameworkVersion and/or TargetFrameworkProfile when a .Net assembly was compiled? The values I'm talking about are the ones contained the project file
Scott
  • 4,113
  • 6
  • 37
  • 49
24
votes
2 answers

Not allowed to load assembly from network location

I've recently set up a new Windows Server 2012 R2 environment and installed Visual Studio 2012. Now I'm having a problem with multiple .NET 4.5 project's I migrated from my old server, a Windows Server 2008 machine. This never occurred on the old…
Stijn
  • 1,970
  • 3
  • 27
  • 36
24
votes
2 answers

Powershell unable to find type [System.Windows.Forms.KeyEventHandler]

This might be a pretty simple question but I'm totally lost and searching for an answer hasn't been helpful. I've got some powershell code to display a simple GUI with TextBoxes. Some of the textboxes allows the user to press Enter to run…
user4317867
  • 2,397
  • 4
  • 31
  • 57
24
votes
1 answer

What is the format of `*.ni.dll.aux` files?

What is the format (data layout) of *.ni.dll.aux files found in C:\Windows\assembly\NativeImages_v4.0.30319_64? I understand that these are auxiliary files generated by ngen.exe. What data do they contain?
Marty Colos
  • 342
  • 1
  • 6
23
votes
1 answer

what is cache AppData\Local\assembly\dl3?

I have this assembly that for some reason Windows started to load from this path: C:\Users\marius\AppData\Local\assembly\dl3\MP6PT6BV.2Z4\GMRQEZL9.LCB\46d762c5\8cf066ff_7eaecc01\X.DLL That means whatever changes I do to the assembly, the new copy…
Marius Bancila
  • 16,053
  • 9
  • 49
  • 91
23
votes
2 answers

ASP .NET CORE could not find file or assembly with custom assembly

I've ran into a weird problem. I basically have my own web-stack for .NET-core which I've built into a few .dlls, and I want to reference these from another ASP CORE-solution. VS seems to find the assemblies, where I can navigate types etc. I can…
Tokfrans
  • 1,939
  • 2
  • 24
  • 56
23
votes
1 answer

Newtonsoft Json.NET version incompatibility (DLL hell)

Newtonsoft.Json release incompatible versions with same strong name, only changing the File version. According to MSDN: Assemblies that have the same strong name should be identical. Because of this our application breaks if other applications,…
23
votes
13 answers

Publish error: Could not load file or assembly 'Microsoft.Web.XmlTransform', Version=1.4.0.0, Culture=neutral, etc. or one of its dependencies

I want to publish a MVC project and I keep getting this error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.XmlTransform', Version=1.4.0.0, Culture=neutral, PublicKeyToken=... or one of its dependencies. The…
barca_d
  • 1,031
  • 2
  • 13
  • 30
23
votes
2 answers

Assembly Conflict with Newtonsoft.Json

I need to load 2 versions of assembly Newtonsoft.Json version 4.0.8.0 and 4.5.0.0. My current config file :
Alex
  • 8,908
  • 28
  • 103
  • 157
22
votes
1 answer

Are embedded resources in a .NET Assembly loaded from disk or from memory at runtime?

When I use GetManifestResourceStream to retrieve an embedded resource from a .NET assembly, what kind of I/O is involved? I see two possibilities: The entire assembly was already put into memory when .NET loaded it, so GetManifestResourceStream is…
Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
22
votes
5 answers

What does the portable class library actually solve?

I was wondering, what does the PCL actually solve? If all it does is limit me to what types are cross-platform, then why didn't Microsoft just make this as a feature in a standard .NET library through the IDE? Basically, I can easily compile a .NET…
michael
  • 14,844
  • 28
  • 89
  • 177
21
votes
2 answers

Can't load System.Web.Cors assembly after call to Microsoft.Owin.Cors

When I check the System.Web.Cors assembly reference in the Solution Explorer, the Version is 5.2.3.0. The Specific Version property is set to False. The path is to the local project bin folder. When checking the .dll properties from the File…
Caleb Faruki
  • 2,577
  • 3
  • 30
  • 54