Questions tagged [assembly-resolution]
229 questions
2
votes
1 answer
How can I force csc / mcs to use a specific version of an assembly reference?
I need to reference a specific version of a signed assembly. Because it is present in GAC, compiler picks up the 'vendor' version instead of the one I provide (the GAC version number is higher, even though it's an older API). Is there some kind of…

skolima
- 31,963
- 27
- 115
- 151
2
votes
1 answer
How to handle NuGet dependency version resolution for the whole solution
I'm looking for a simple way to manage NuGet packages for the whole solution, to prevent conflicts between transitive NuGet packages when assembling all files into one installer.
When building a project all direct and indirect dependencies are…

Michael Dietrich
- 451
- 1
- 5
- 17
2
votes
4 answers
Error deserializing object having a field of type declared in the other assembly loaded on AssemblyResolve
I have an application which embedes (via BuildAction: Embedded Resource) referenced assembly (called ClassLibrary1) inside itself and loads it on AppDomain.CurrentDomain.AssemblyResolve event.
Main assembly defines a class Class1:
public class…

Alexzander
- 345
- 5
- 8
2
votes
1 answer
PortableLibrary Could not load file or assembly
I have asp.net 4 webforms website which references PortableLibrary project. In the website I serialize classes from PortableLibrary. When I deployed the project to webserver machine with IIS6 I'm getting following error:
Could not load file or…

Liero
- 25,216
- 29
- 151
- 297
2
votes
0 answers
Assembly.LoadFrom fails when referencing Microsoft.EntityFrameworkCore.dll
While attempting to dynamically load libraries in to my .NET Core application, I seem to be running the following exception:
FileLoadException: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.2.4.0, Culture=neutral,…

Serge
- 1,974
- 6
- 21
- 33
2
votes
1 answer
EntityFramework referencing back to caller - The located assembly's manifest definition does not match the assembly reference
My first question here because I'm usually pretty nifty with searching for my own answers, I've been on this for a few hours now and I'm stumped - thanks in advance!
After following many directions across SO and other sources for things like
clean,…

Jai Eldridge
- 21
- 2
2
votes
3 answers
Get assembly's requireed assemblies?
I am loading an assembly X.dll in my program, where X.dll can be anything, and I create an instance of the class X.A_Class. But what if the assembly X requires assemblies A, B, C and D?
How do I detect this?
How do I load them without holding them…

Vercas
- 8,931
- 15
- 66
- 106
2
votes
2 answers
stop creating local assemblies when I debug
I have developed a c# class library which I need to debug with an external program.
So I set the "start external program" of this project to my external program and then I start the debugger.
The problem is that this assembly is also located (as a…

Tobias Koller
- 2,116
- 4
- 26
- 46
2
votes
2 answers
How to reference assembly from web.config?
I need to add reference to 'System.XML.dll' assembly into web.config (in order to try solution for problem, mentioned here: Problem with Extension method: IXmlLineInfo).
I've tried to add the following line into "assemblies" section:

Budda
- 18,015
- 33
- 124
- 206
2
votes
2 answers
Why would I use Assembly.LoadFile in lieu of Assembly.LoadFrom?
It's my impression that Assembly.LoadFrom uses the ApplicationBase and PrivateBinPath. It also my impression that Assembly.LoadFile does not.
Why would anyone want to use LoadFile? In other words, if my understanding is correct, why would anyone…

Cheeso
- 189,189
- 101
- 473
- 713
2
votes
1 answer
WinForms app config manager is x86 and cannot reference assemblies that targets Any CPU
Hi
I'm using Win7 64x and Visual Studio 2010. I created a library/framework targeting Any CPU. Then I created a new WinForms project that uses that framework, leaving the default values of the wizard. I mean, I didn't change anything. When I…

ivos
- 21
- 1
2
votes
1 answer
Runtime swap out of assembly referenced statically at compile time
Under what conditions can I swap out an assembly that's statically referenced at compile time with a different one for use at runtime? For example:
App Assembly:
References Common Assembly
References ServiceProviderFactory in Service…

Kaleb Pederson
- 45,767
- 19
- 102
- 147
2
votes
2 answers
Windows service locks up on assembly load
I have a Windows Service written in C#. It includes a standalone console mode as well, for debugging purposes. It works fine on almost every computer it's been run on, but we ran into a situation where this service locks up when you try to start…

Bryce Wagner
- 2,640
- 1
- 26
- 43
2
votes
0 answers
Why is the CLR trying to load all referenced assemblies into my new AppDomain when calling CreateInstanceAndUnwrap?
Our application creates separate 'sandbox' AppDomains in order to load plug-in code, so that we can unload these plug-ins once we have finished with them.
We make use of the AssemblyResolve event in the sandbox AppDomain, in order to dynamically fix…

Chris Brook
- 2,335
- 20
- 24
2
votes
1 answer
Reference could not be found.(are you missing a using directive...)
I have created a project library dll and it resides in the bin directory of the solution. I've got a second solution that references that dll. In the VS2013 IDE my 'Using' directive is happy and down n the code when I reference a class in the dll…

bilpor
- 3,467
- 6
- 32
- 77