Questions tagged [assemblyresolve]
42 questions
1
vote
0 answers
Assembly Resolve in Multi-tenant Application
I'm using "AppDomain.CurrentDomain.AssemblyResolve" in my multi tenant application and in the Assembly Resolve method, I'm planning to resolve the dll based on the current tenant.
The problem is that Assembly Resolve method always refer to the…

Himal Patel
- 387
- 4
- 19
1
vote
0 answers
Attaching to AssemblyResolve earlier
Consider the following code inside of the Program class:
static EmbeddedClass MyClass;
static Program()
{
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}
static Assembly CurrentDomain_AssemblyResolve(object sender,…

TheLethalCoder
- 6,668
- 6
- 34
- 69
1
vote
0 answers
.net assembly resolution handler fails in one machine but succeeds in another
I have noticed differences in how .net resolves assemblies in 2 different machines. In one machine it seems to be doing it as it executes line-by-line and in another machine per method.
Lets say I have the following in Test.dll:
public class…

alital
- 411
- 5
- 15
1
vote
1 answer
AssemblyResolve Event Handler vs. CodeBase policies
When trying to access assemblies from a C# assembly, there are several methods:
Implement a AssemblyResolve event handler
http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve(v=vs.110).aspx
Use the property in the .config file…

Aeon512
- 175
- 1
- 8
1
vote
0 answers
C# Outlook 2007 Addin + Embedded Assemblies
I'm creating an Outlook Addin and want to see if I can embed the dependent DLLs using AppDomain.CurrentDomain.AssemblyResolve, but I have no idea where to add this so that it will actually get called/fired :(
Which method should the…

SmithPlatts
- 773
- 7
- 20
1
vote
1 answer
Loading assemblies dynamically using the AssemblyResolve Event fails at random
Following the example of the following KB article we have implemented the AssemblyResolve event in order to point .Net to the correct folder to load assemblies from: http://support.microsoft.com/kb/837908
This is our current implementation:
public…

Peter
- 14,221
- 15
- 70
- 110
1
vote
1 answer
does .NET assemblyResolve event handler do version validation
I've some applications that rely on some shared components. I am moving these shared assemblies outside of application local directory to a shared directory. My goal is that each time a new version of shared assembly is released, I only have to…

user236215
- 7,278
- 23
- 59
- 87
0
votes
1 answer
Assembly is loaded differently via AssemblyResolve?
I have an app which dynamically loads a DLL from a different folder.
This DLL needs Microsoft.Extensions.Logging.dll, and if I load it before I load my DLL, it works fine:
void f()
{
…

user3570224
- 1
- 1
0
votes
0 answers
AppDomain.CurrentDomain.AssemblyResolve event fires even though dlls are present
In my programs I want to use libraries (dlls) located in a custom location. The solution I tried to implement is given here net-reference-dll-from-other-location.
Unfortunately this works perfectly in one case but does not in another.
What puzzles…

Marcin Skowronek
- 1
- 1
0
votes
1 answer
.Net5 version-tolerant assembly loading
I have the following situation in .Net5/C# that I'm struggling to resolve.
We have Application (let's call it Platform) U that is able to load plugins, e.g. Plugin P, referencing Utilities U which is part of the Platform and shares its version.
Our…

Ildrial
- 344
- 3
- 10
0
votes
1 answer
Runtime assembly binding redirect
I have a pluginA for application, pluginA executes pluginB, pluginB is referencing library and execute some method from it.
First, i am loading library with Assembly.Load(byte[]), then loading pluginB with Assembly.Load(byte[]), store assembly in…

Kliment Nechaev
- 480
- 1
- 6
- 13
0
votes
1 answer
async AppDomain.AssemblyResolve
I dynamically load large assemblies from remote server in Winforms UI using AppDomain.AssemblyResolve event. Is it possible make my assembly resolve method async?
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Assembly…

Petr Zima
- 3
- 1
0
votes
1 answer
C# Assembly ressolver doesn't start when instantiating variable but from function it does
Hi I have simple client to write value to UA server. I am using OpcLabs libraries in VS2017, Win10 NetFr 4.8. Libraries are loaded from other folder than executable. When dlls are in the same folder both methods below works, when resolver should be…

Mimoa
- 50
- 4
0
votes
0 answers
Load strong named assembly regardless of version in Compact Framework
I have written a plugin for an application which uses the Bouncy Castle Library.
This application runs on Windows CE and runs on the .NET Compact Framework.
The Bouncy Castle Library is a strong named assembly and different versions are are…

CathalMF
- 9,705
- 6
- 70
- 106
0
votes
1 answer
C# Entity Framework resources and assembly resolve (appdomain)
I am facing a problem that I can't seem to explain what is going on.
It is likely that if I use AppDomain.AssemblyResolve event in my DLL(C#) and I use Entity Framework, somehow, I see it tries to load the following resource…

Mr. Bone
- 69
- 7