Questions tagged [assembly-resolution]

229 questions
3
votes
0 answers

File Not Found Exception in my code

In my Silverlight application, I have a map that I drag a GPX and TCX file onto and it populates the route on the map. When I drag a GPX file onto the map it works, but when i do the same for TCX i get an error. Now if it is a GPX it will call…
Ben Clarke
  • 1,051
  • 4
  • 21
  • 47
3
votes
1 answer

Load any version of a statically referenced .NET assembly

I'm working on an tool that uses .NET assemblies from another product. A handful of the assemblies are statically referenced in my project (using "Add Reference") because I need to actually use those types in my code. But I load many other…
Hydrargyrum
  • 3,378
  • 4
  • 27
  • 41
3
votes
1 answer

Inexplicable Assembly Load in WCF Service (IIS 7)

I'm working on a new WCF web service that's to be hosted within an existing ASP.NET web application. When I attempt to run the .svc file for the service, I'm getting an exception that it can't find the file for an assembly. Could not load file or…
Adam Robinson
  • 182,639
  • 35
  • 285
  • 343
3
votes
1 answer

Loading dll using Assembly.Load(byte[], byte[]) different behaviour between Visual Studio 2013 and 2015

I though I left VS2013 behind when I started using VS2015 RTM. However I noticed a very odd thing that could be a setting problem or a just a bug. I have implemented my own NUnit testrunner to be able to test addons (class libraries) for an…
Erik83
  • 539
  • 3
  • 5
  • 19
3
votes
0 answers

Assembly resolution for PoSh cmdlet causes other module imports to fail

I have a PowerShell module that is written in C#. As a result of the the module using the Google APIs, I need to have a specific System.Net.Http.Primitives.dll referenced. Running the code in C# has no issues loading that module, but in PowerShell I…
squid808
  • 1,430
  • 2
  • 14
  • 31
3
votes
1 answer

Why does trying to unit test with two .NET 4.0 assemblies under NUnit 2.5.4 fail?

I have an MSBuild script that uses NUnit to run tests in two assemblies. These were on .NET Framework 3.5 and it worked perfectly for a long time. The command line was: (actual paths & names simplified) nunit-console tests1\bin\debug\tests1.dll…
John Mills
  • 10,020
  • 12
  • 74
  • 121
3
votes
4 answers

Help System.Web.Compilation.BuildManager find a type in a non-referenced assembly

I'm trying to write a plug-in system where assemblies can be dropped in a folder that ASP.NET has no knowledge about. This plug-in system works fine for ASP.NET MVC based assemblies, but for old-school WebForm assemblies (where the .aspx files…
3
votes
3 answers

How does AssemblyName.ReferenceMatchesDefinition work?

Given the following code: var n1 = new AssemblyName ("TestDll, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089"); var n2 = new AssemblyName ("TestDll, Version=2.0.0.2001, Culture=en-US, PublicKeyToken=ab7a5c561934e089"); …
Fabian Schmied
  • 3,885
  • 3
  • 30
  • 49
3
votes
4 answers

NHibernate and Windsor assembly conflicts

I am having an issue getting Hibernate and Windsor to work together. My setup details are as follows I have two projects -DomainModel -MVCApp I have downloaded NHibernate 2.1.2 and Windsor 2.1.1 I added the following references to DomainModel…
Matt
  • 2,730
  • 4
  • 28
  • 35
3
votes
2 answers

.NET Load assembly from attr in .config file

I have an application that loads most of its dll's from a subfolder specified in the configuration (myapp.exe.config) file in the attribute My question is: Can I load a dll (say mydll.dll) at runtime, using only its…
Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233
3
votes
1 answer

How to dynamically load an assembly from custom directory including its dependencies?

I found the following code that loads a dll dynamically from a custom location: private void Form1_Load(object sender, EventArgs e) { AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.AssemblyResolve += new…
christophrus
  • 1,170
  • 2
  • 14
  • 27
3
votes
3 answers

How to fix "type exists in both assemblies" failure when using DynamicProxy types in an assembly referencing NSubstitute?

I have an application that uses DynamicProxy 3.1 to do runtime interception. I have a test assembly that uses NSubstitute for mocking. I just wrote some "integration" tests against my fully bootstrapped container (StructureMap using InterceptWith to…
Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
3
votes
1 answer

Microsoft.SqlServer.SqlTools.VSIntegration reference problem/oddities in Visual Studio 2010

SQL Server Edition: 2008 Enterprise Visual Studio: 2010 w/ .NET 4.0 SSMS 2008 Addin - Data Scripter project source code on CodePlex references Microsoft.SqlServer.SqlTools.VSIntegration.dll I have referenced the DLL under <
dance2die
  • 35,807
  • 39
  • 131
  • 194
3
votes
2 answers

LINQPad can't find Entity Framework 4.3: Could not load file or assembly EntityFramework

I'm trying to use LINQPad with my MVC3 project that is using Entity Framework 4.3. In LINQPad I create a new connection like this: Add Connection -> Use A typed Data Context -> EF DBContext POCO Point it to my assembly, provide full typename,…
trailmax
  • 34,305
  • 22
  • 140
  • 234
2
votes
1 answer

Dynamically loaded assembly reference issues

I have an Assembly A, this Assembly dynamically loads Assemblies B, C, and E. And it'll load more in the future. Issue one: B references F and G, when I try to execute methods in an instance of a type declared in B, from A, I get an exception…
bevacqua
  • 47,502
  • 56
  • 171
  • 285