assembly-resolution

Why do I get assembly bind failure in IIS CGI program

I have a C# program that is running as a CGI app in IIS on XP Pro SP3. It runs fine until I reference a library assembly class and use it in the program's code. If I run the CGI program by hand it loads and executes. But when it is run by IIS the referenced assembly fails to bind despite it being right in the same directory as the parent...

NHibernate 2nd level cache provider for NHibernate 2.1.1.4000

I am using s#arp which is built against NHibernate 2.1.1.4000, However I would like to use NHibernate.Caches.SysCache as my second level cache. However the Nhibernate contrib caches are built against NHibernate 2.1.2.4000 which obviously gives me a problem. Can anyone point me to a URL that I can download NHibernate.Caches.SysCache.dll ...

NHibernate and Windsor assembly conflicts

Hi, 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 from the required_Bins folder of the NHibernated download - Antlr3,Iese,log4net and NHi...

how can I embed an assembly into a console application without ILMerge?

There are a lot of posts on here about this, I'm using this code from another SO post and placing a delegate assignation in my Main() method. None of the other posts have directly answered my question. I've got my third party assembly embedded as a resource but when I fire up the app: I'm getting a TypeInitializationException with a...

Assembly FileLoadException (Access is denied) after period of time

I have a web application that works fine for a while (a few days) and then starts throwing FileLoadException's when instantiating a class that references an external dll. I'm not explicitly loading the assembly with any of the Assembly static methods. I'm just instantiating a class that itself instantiates a class from the referenced l...

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"); Console.WriteLine (AssemblyName.ReferenceMatchesDefinition (n1, n2)); Console.WriteLine (A...

.NET assembly loading problem

I'm maintaining the build process for our application which consist of an ASP.Net application, two different Win32 services and other sysadmin related applications. I want to end up with the following configuration to be used both when debugging & deploying. libraires/ -- Contains shared assemblies used by all other apps. web/ ...

Handling Types Defined in Plug-ins That Are No Longer Available

I am developing a .NET framework application that allows users to maintain and save "projects". A project can consist of components whose types are defined in the assemblies of the framework itself and/or in third-party assemblies that will be made available to the framework via a yet-to-be-built plug-in architecture. When a project is...

Adding assembly reference requires base assembly to be referenced as well

I created a assembly having a child class that derives from a parent defined in another assembly. When I add reference to the child, Visula studio also requires reference to be added to the parent. Why is it so and how can I prevent it without losing any functionality? ...

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 Inherits the System.Web.UI.Page derived classes) System.Web.Compilation.BuildManager is respons...

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 tests2\bin\debug\tests2.dll I've upgraded to VS2010 and have now made the two test assembl...

How to correctly load 32-bit DLL dependencies when running a program from a batch file

I have written a tool that references Microsoft.TeamFoundation.VersionControl.Client.dll, which is a 32-bit DLL. When I build my tool on 64-bit Windows, I set Visual Studio to specifically target X86 in order to force it to a 32-bit build. Targetting X86 instead of All-CPU's prevents me from getting a BadImageFormatException, as long a...

"Could not load file or assembly" error on trying to access auxillary assemblies from COM

We have the project structure as follows: COMExposedCCW.dll -refers-> BusinessLayer.dll -refers-> Utils.dll COMExposedCCW.dll -refers-> Utils.dll The COMExposedCCW.dll has been registered for COM interop. From the COM application we can successfully create the CCW object and access its properties, but when we try to invoke methods th...

Bug in MVC2 means I need to compile the source, but nothing works with the compiled assembly

There seems to be an issue around generating IDs with indexers within the MVC Framework (as detailed here http://aspnet.codeplex.com/WorkItem/View.aspx?WorkItemId=5495). To fix this, I've downloaded the source, modified it and tried using it - but due to the lack of snk file for signing in the source download, everything I try is result...

Compiling .NET component that uses a non specific required version of a 3rd Party Vendor component

If someone were to develop a .NET component that relied on non specific versions of a vendor DLL - let's say it worked with My3rdPartyComponent.dll which is a .NET assembly, but it didn't matter which version. Some instances of classes found in this component would need to be passed into my component. Developers would reference my comp...

.NET & Worflow, SqlTrackingQuery.GetWorkflows() on wire correct - presented object not

With windows workflow when using the tracking service, the SqlTrackingQuery.GetWorkflows() method returns correctly the workflow type and assembly version on the wire from the DB query - but when one comes to query the returned SqlTrackingWorkflowInstance object it's WorkflowType.AssemblyQualifiedName property is returned as the current...

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 introduce Antlr3.StringTemplate.dll. Which has a dependency on another version of the abov...

Is it possible to run Silverlight code using the runtime of the full .NET framework?

To integrate with the current system for continuous integration, we want to use NUnit for testing (non UI) Silverlight code. Doing this means executing Silverlight code using the runtime of the full .NET framework which usually works just fine as long as not actually using Silverlight specific classes such as the visual elements or Depen...

Problems with AssemblyResolve event on created AppDomain

Hello, I am trying to customize the assembly resolution process by wrapping the AppDomain and its AssemblyResolve event inside a class. The simplified version of my ClassLoader is below. The problem I am having is that when the event AssemblyResolve is fired, it seems that I get a new instance of ClassLoader, not the one I previously c...

Drawbacks, advantages, etc. between ILMerge or ResolveAssembly for embedding assemblies?

Currently I know of two methods of embedding assemblies into one application file: ILMerge and using the ResolveAssembly event. I would like to know if anyone have had more success with one over the other. Is there any drawbacks from using either one of those (performance, security, ...)? From my point of view, it looks like we should...