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
21
votes
6 answers

.Net 4.6 website not loading Reference Assemblies correctly

I have a web project in Visual Studio 2013, including several library projects. Problem is that adding a reference (ie. System.Collection, System.Net) to the web project is being added as a 'Reference Assembly' from C:\Program Files (x86)\Reference…
Sam
  • 5,416
  • 7
  • 47
  • 49
21
votes
1 answer

Proper way to digitally sign the application having referenced assemblies

I have an application that has 1 referenced assembly (test.exe, test.dll) What I want is when the test.exe runs, it should show publisher name as "TestCompany". To do that, I digitally signed it and it does what I want. And if I alter one byte of…
xmen
  • 1,947
  • 2
  • 25
  • 47
21
votes
1 answer

How does Visual Studio know if the source file matches the original version?

I figured out how a .NET assembly .dll file maps to a .pdb using a GUID (blog). When I debug into an assembly and it asks for the source code, if I navigate to a file, it may tell me that the source code is different from the original. How does it…
Cameron Taggart
  • 5,771
  • 4
  • 45
  • 70
21
votes
3 answers

Edit .NET assembly and recompile

I'm in a really bad situation. I lost my source code and my customer needs to change a little bit in the application. Think of edit an assembly for an example: Test.dll then add a code line and finally recompile it So my question is: - Is it…
Bac Clunky
  • 353
  • 3
  • 6
  • 18
20
votes
3 answers

Can a C# .dll assembly contain an entry point?

My goal is to create an executable that will start a shadow copied application. The trick is, I want this starter program to have no external dependencies and not have to contain any knowledge about the program it has to start. I also want it to be…
Sean
  • 533
  • 1
  • 5
  • 6
20
votes
2 answers

Cross platform system libraries reference for PowerShell and Server Manager module

The program I am writing is using System.Management.Automation library to make use of PowerShell classes and interfaces that are defined there. There are two versions of those libraries: 1.0.0.0 and 3.0.0.0. Windows Server 2008 has in its GAC…
Mike
  • 842
  • 1
  • 9
  • 31
20
votes
5 answers

Can a call to Assembly.Load(byte[]) raise the AppDomain.AssemblyResolve event?

Suppose I have a handler for AppDomain.AssemblyResolve event, and in the handler I construct a byte array and invoke the method Assembly.Load(byte[]). Can this method itself cause the AssemblyResolve event to be raised again, and cause my handler to…
Vladimir Reshetnikov
  • 11,750
  • 4
  • 30
  • 51
20
votes
2 answers

All projects referencing sub-project must install NuGet package Microsoft.Bcl.Build (C#/Windows Phone 7)?

I'm having a particularly difficult refactoring session involving a C# solution with multiple projects in Visual Studio 2012. I needed to pull out a bunch of code into their own assemblies so that code could be shared across several projects, all…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
20
votes
8 answers

Best way to check if a DLL file is a CLR assembly in C#

What is the best way to check if a DLL file is a Win32 DLL or if it is a CLR assembly. At the moment I use this code try { this.currentWorkingDirectory = Path.GetDirectoryName(assemblyPath); //Try to load the assembly. …
schoetbi
  • 12,009
  • 10
  • 54
  • 72
20
votes
12 answers

Could not load file or assembly Temporary ASP.NET Files

I am developing a website on ASP.NET in C# (.NET Framework 4). After creating a new website project I tried to run the project. But I am getting the below error: Could not load file or assembly…
new_programmer
  • 840
  • 3
  • 12
  • 22
20
votes
6 answers

Can I use Activator.CreateInstance with an Interface?

I have an example: Assembly asm = Assembly.Load("ClassLibrary1"); Type ob = asm.GetType("ClassLibrary1.UserControl1"); UserControl uc = (UserControl)Activator.CreateInstance(ob); grd.Children.Add(uc); There I'm…
Arman Hayots
  • 2,459
  • 6
  • 29
  • 53
19
votes
5 answers

Adding multiple Icons (Win32-Resource) to .NET-Application

it is possible to set the Application-Icon in the Project Properties. If you do this the exe will have this icon instead of the default one. this icon is a win32-resource and can also be accessed like this: i want to have special icons for…
0xDEADBEEF
  • 3,401
  • 8
  • 37
  • 66
19
votes
1 answer

The *deps.json file in .NET Core

What is the purpose of *deps.json file in .NET Core? What is the reason to store references in such file and not in assembly manifest(as in standalone .NET Framework)? Using Ildasm i checked that assembly manifest doesn't contain entries for these…
Roman Roman
  • 617
  • 1
  • 9
  • 16
19
votes
7 answers

JIT code generation techniques

How does a virtual machine generate native machine code on the fly and execute it? Assuming you can figure out what are the native machine op-codes you want to emit, how do you go about actually running it? Is it something as hacky as mapping the…
HS.
  • 15,442
  • 8
  • 42
  • 48
19
votes
1 answer

Method inlining across native images of assemblies

As explained in another question, Ngen is usually only allowed to inline methods across assemblies if the method has the TargetedPatchingOptOutAttribute set. But is this also true for hard bound assemblies by using the DependencyAttribute with…
cremor
  • 6,669
  • 1
  • 29
  • 72