Questions tagged [assemblyresolve]
42 questions
21
votes
2 answers
AssemblyResolve not fired for dependencies
I'm struggling with AssenblyResolve event for a while now. I've searched stackoverflow and did other googling and tried all that I think was relevant. Here are the links being the closer to my problem (in my opinion) :
AssemblyResolve is not…

Francis P
- 437
- 1
- 4
- 13
16
votes
2 answers
.NET 4 loads assemblies different from .NET 3.5
With migrating to .net 4 we started facing the problem with our library.
Assume we have our library MyLib.dll and it references interop assembly Interop.dll.
Interop.dll has reference to MissingInterop.dll.
So the references can be shown as:…

Puterdo Borato
- 388
- 4
- 19
6
votes
1 answer
Why do ASP.NET resolve assembly references differently?
I really tried hard to find a similar issue to get some leads, but no one seems to describe the case we are having, so here it goes.
Background
We have a product with the following general design:
[Local installation folder]
Contains a set of .NET…

Per Samuelsson
- 1,000
- 1
- 6
- 8
5
votes
0 answers
How to always intercept CLR load event (not only when the loading attempt fails)
I know that it is possible, registering to the AppDomain.AssemblyResolve event, to handle the attempt to load an assembly when the automatic CLR search has failed.
In my current project, It would be helpful to handle all the assembly loading through…

Andrea
- 884
- 1
- 10
- 23
4
votes
1 answer
ResolveEventArgs.RequestingAssembly is Null
I am trying to load assemblies dynamically through Reflection. i have folder structure like this:
project
\-- BIN
|-- myApp.exe
|-- SOMEEXTENTION1
| |-- someExtention1.dll
| \-- itsDependency1.dll
| …

inquisitive
- 3,549
- 2
- 21
- 47
4
votes
1 answer
Load x64 or x86 version of assembly appropriately based on bitness of referencing application
I've got two assemblies that both contain the same namespace and classes. One is 32 bit and named assembly_x86.dll, and the other is 64 bit and named assembly_x64.dll.
I would like to be able to build the containing application as AnyCPU and have…

Chris
- 81
- 1
- 8
4
votes
1 answer
ResolveEventHandler in DLL (class library)
In C# there is ResolveEventHandler event to load external dll s if they are not inside application directory.
To use it in winform application I register the event in Program.cs Main() function like the…

Alexander Benjamin
- 83
- 2
- 6
3
votes
1 answer
Dependent assembly resolution succeeds even with the wrong version number
I've been searching for the answer to the strange behavior I detected in assembly resolution to no avails. I am aware that the CLR records an assembly's references into its metadata(manifest). It records the name, version number, public key token…

Farhad Alizadeh Noori
- 2,276
- 17
- 22
3
votes
4 answers
After Handling AssemblyResolve Event Still getting Exception FileNotFound
I have handled the AssemblyResolve-event but I still get a FileNotFoundException. I have subscribed to the event in the type initializer and call the Assembly.LoadFrom method in the Main-method:
class Program
{
static Program()
{
…

Numan Hanif
- 246
- 2
- 17
2
votes
1 answer
AntiForgery error when calling AssemblyResolve function
I'm adding my own custom loader to AssemblyResolve to load some embedded resources in a .net library;
AppDomain.CurrentDomain.AssemblyResolve += (sender, e) => { return Domain.Assemblies.LoadResource(e.Name,…

Tony Cheetham
- 877
- 7
- 18
2
votes
0 answers
Make a single exe cefsharp application - embedding libcef.dll - costura.fody
I have tried many things before I found costura.fody and I were hoping that would be the solution to create a single file exe of a cefsharp application that I'm doing.
So the help file says set copy local to true of the file you want to embed in the…

andla007
- 21
- 2
2
votes
0 answers
LoaderOptimization.MultiDomain causes AssemblyResolve to not fire
I have some issues as soon as LoaderOptimization.MultiDomainis enabled.
Somehow, it doesn't fire AssemblyResolve event anymore when an assembly is not found in some specific scenarios.
I narrowed it down to a repro case with 2 projects.
You can…

xen2
- 111
- 5
2
votes
3 answers
VSTO AssemblyResolve issue
We develop a VSTO plugin for Word and we have the problem that the earliest entry point of the addin is the AddIn_Startup handler. The issue is that this handler is called too late for the AssemblyResolve handler we implemented to find the needed…

Manuel Schumach
- 21
- 3
1
vote
0 answers
Why does the VisualStudio DataSet Visualizer fire an AssemblyResolve event?
I'm working on a Visual Studio VB solution that uses the AssemblyResolve event, displaying a message and shutting down the application whenever it's fired.
Recently, a colleague has reported that whenever he tries to use the Data Visualizer during…

Jean-David Lanz
- 865
- 9
- 18
1
vote
3 answers
Re-Triggering Assembly Resolve?
I'm triggering AssemblyResolve by setting "Copy Local" of a particular DLL to false.
My AssemblyResolve gets triggered, and I get to choose the location of my DLL.
Later in the code, I want AssemblyResolve to re-trigger so I can specify a new DLL…

sooprise
- 22,657
- 67
- 188
- 276