Questions tagged [assembly-resolution]
229 questions
7
votes
3 answers
Making binding redirects work for office add-ins
I'm using Microsoft.Bcl.Async in my Word addin, my addin is compiled as an exe (test_addin.exe) file, that is loaded as an assembly from Microsoft Word, when I start the executable directly, everything's working fine, but when I run it from Word,…

animaonline
- 3,715
- 5
- 30
- 57
7
votes
4 answers
How to provide a fallback assembly instead of the one that can't be loaded?
At runtime, if a referenced assembly fails to load with e.g. "Strong name validation failed" (because it's test-signed), is there a way to provide a substitution assembly from another path that is real-signed?
I tried subscribing to…

Kirill Osenkov
- 8,786
- 2
- 33
- 37
7
votes
2 answers
SharePoint features: How can I use wildcard assembly versioning?
I think this is likely to be a generic .NET assembly loading question, but in my specific case, I want my SharePoint Features to point to an assembly whose versioning is associated with the correct SVN revision number.
My assemblies are now…

Chris Farmer
- 24,974
- 34
- 121
- 164
6
votes
2 answers
Using a 32bit- or 64bit specific dll depending on the process bitness
I need to reference a DLL which is available in 2 versions (one for 32bit and one for 64bit).
My goal is to build an web application that works on both 32 and 64 bit systems.
I thought about referencing the 32bit assembly by default and using the…

ollifant
- 8,576
- 10
- 35
- 45
6
votes
4 answers
How to solve: Custom MSBuild task requires assembly outside of AppBase
I have a custom Task that I want to execute when building my C# projects. This task is located in MyTask.dll, which references another assembly, MyCommon.DLL.
The problem is that MyCommon.dll is located at "..\Common\MyCommon.dll" relative to…

aoven
- 2,248
- 2
- 25
- 36
6
votes
2 answers
How to achieve assembly binding redirect in a plugin scenario?
I have a plugin P extending and application A (.NET40) that I have no control over.
The P assembly (.NET40) has a shared dependency D (.NET35).
Both P and D depend on FSharp.Core, but different versions:
P is compiled against FSharp.Core,…

oli
- 682
- 1
- 12
- 21
6
votes
2 answers
MsBuild does not look in the good directory for custom task's second-level dependencies
I wrote a MsBuild Task : MyTask. In my solution, I have the Task project and others projects. MyTask references a project (say ProjA) which references third assemblies, say (dep1 and dep2).
The projects all builds well and I have the outputs in one…

Benjamin Baumann
- 4,035
- 2
- 25
- 35
6
votes
4 answers
silverlight 4, dynamically loading xap modules
I know that it is possible to load xap modules dynamically using Prism or MEF framework. However, I'd like not to use those frameworks; instead load my xap files manually. So, I created the following class (adapted from internet):
public class…

synergetic
- 7,756
- 8
- 65
- 106
6
votes
4 answers
How to resolve conflicting assemblies in .Net?
In my web application I am using NHibernate.dll. This has a dependency on folowing assembly.
'Antlr3.Runtime, Version=3.1.0.39271,
Culture=neutral,
PublicKeyToken=3a9cab8f8d22bfb7'
Now in the same project for another requirement I have to…

Amitabh
- 59,111
- 42
- 110
- 159
6
votes
2 answers
System.BadImageFormatException occurred when build in Release Mode
I am referencing an exe file in a dll. When run in DEBUG mode everything runs fine but when run in Release mode below exception is thrown
System.BadImageFormatException occurred
HResult=-2147024885
Message=Could not load file or assembly…

Sameer
- 3,124
- 5
- 30
- 57
6
votes
0 answers
Resolving MSB3247 conflicts between different versions - when binding redirects already exist
Does anyone have any idea why we'd get MSB3247 assembly version errors (which recommend a binding redirect), when the binding redirect is already there?
We've done the usual check with MSBuild detailed errors and AsmSpy to check this.
The error in…

James Crowley
- 3,911
- 5
- 36
- 65
6
votes
1 answer
How does the .NET Runtime Locate Non Strong-Named' Assemblies?
We have different versions of non strong-named assemblies, and no binding redirects/probing paths to them in app.exe.config. For example, MyDll (1.0.0.0_null_neutral) and MyDll (2.0.0.0_null_neutral). Relative to app.exe, these assemblies are stored…

ck.
- 1,056
- 1
- 14
- 25
6
votes
2 answers
.NET executable won't load referenced assemblies when started from \\localhost\xyz
My .NET executable abc.exe references several assemblies. One of them is called xyz.core.exe. I have trouble getting it to work when it is being started from a network location specified through a share name with a path such as…

Pierre Arnaud
- 10,212
- 11
- 77
- 108
6
votes
1 answer
How can I dynamically reference an assembly that looks for another assembly?
Apologies for the dodgy question - happy to rephrase if someone has a better suggestion.
I'm trying to create an object by dynamically invoking an assembly belonging to another application.
The following PowerShell code is working nicely for…

gf131072
- 155
- 2
- 5
5
votes
1 answer
How does .NET resolve different versions of the same package?
This question pertains to .NET 5+, not .NET Framework.
Consider the following dependency tree:
MyWebsite has package references to RandomWebLibrary 1.0.0 and RandomJsonLibrary 2.0.0.
The NuGet package RandomWebLibrary 1.0.0 has a package reference…

Sam Magura
- 850
- 8
- 18