In a C# application I'm Loading 2 DLLs provided by user during runtime (not a pre-difined reference) Let it be A.dll, B.dll.
A.dll is referencing B.dll, but they are supplied separately.
When I try to access a method from A.dll, with a parameter of type that is declared in B.dll, I get an:
"Could not load file or assembly 'B, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. The system cannot
find the file specified.".
error, although both DLLs were loaded. Even calling MethodInfo.GetParameters() will throw the exception.
Tried to Load both DLLs with different methods:
Assembly.Load(<Path>)
Assembly.LoadFile(<Path>)
Assembly.LoadFrom(<Path>)
I set the reference in project A to B.dll as "Copy Local = false".
Any usage of types and method from A or B which does not involve the connection described above seems to work fine.
I made sure both assembly were loaded with
AppDomain.CurrentDomain.GetAssemblies()
(they both are).
I have to presume I don't have developer access to A.dll and B.dll projects (provided by users), but for testing purpose I can try to change stuff in them as well.
Fusion log For A.dll:
*** Assembly Binder Log Entry (8/10/2019 # 11:47:04 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Users\<username>\AppData\Local\JetBrains\Installations\ReSharperPlatformVs15_95cb26a8\JetBrains.ReSharper.TaskRunner.CLR45.x64.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = A, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///<project fullpath>/bin/Debug
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = C:\Users\<username>\AppData\Local\Temp\u5r0nb10.kwf\k2mn3yzp.umi
LOG: AppName = AppTest
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///<project fullpath>/bin/Debug/A.DLL.
LOG: Attempting download of new URL file:///<project fullpath>/bin/Debug/A/A.DLL.
LOG: Attempting download of new URL file:///<project fullpath>/bin/Debug/A.EXE.
LOG: Attempting download of new URL file:///<project fullpath>/bin/Debug/A/A.EXE.
LOG: All probing URLs attempted and failed.
You are missing are probably missing another dependency of B.dll it.
When you try to load a dll, Windows will try to look all dependency of it (other dlls). Unfortunately, the error you see will be:
"The system can not find the specified"
All dependencies of B.dll should be also copied to the local directory.
Use Dependency Walker .NET to find the missing dependencies.
Since everything is "there" I've got another possibility. Normally, this is obscure, but it can happen.
If B.dll depends on a higher version of a dll that your main program depends on, sometimes the lower version dll you loaded can't be made to work with the higher version B wants. In that case, you get this error.
Related
I have a DLL written in C# that runs a job from within the context of a 3rd party application. The DLL needs to reference another 3rd party DLL. Intellisense in VS works great but during runtime the error is generated: "Could not load file or assembly or one of its dependencies. The system cannot find the file specified."
I ran the dependency tool and saw a missing reference to mscorwks and perfcounter.dll. Putting these 2 missing DLLS in the same folder as the 3rd party DLL corrects the missing references in the dependency tool.
I'm not sure what to do next. Where do all these files need to reside for my DLL to work properly? The interesting thing is I also have a stand-alone executable that references the same 3rd party DLL and it doesn't have any issues with missing references.
What should I try next?
Edit:
Downloaded Fusion++ and this is the result from the log. Looks like it can't find the parent. Not sure how to point the dependent DLL to the right folder when it's running in the context of a 3rd party application.
*** Assembly Binder Log Entry (11/24/2019 # 6:59:35 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\Autodesk\Vault Professional 2020\Explorer\Connectivity.JobProcessor.Delegate.Host.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = LicenseSpring, Version=4.7.0.0, Culture=neutral, PublicKeyToken=2d5c13cc31edbaaf
(Fully-specified)
LOG: Appbase = file:///C:/Program Files/Autodesk/Vault Professional 2020/Explorer/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = Connectivity.JobProcessor.Delegate.Host.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: LicenseSpring, Version=4.7.0.0, Culture=neutral, PublicKeyToken=2d5c13cc31edbaaf
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/Autodesk/Vault Professional 2020/Explorer/LicenseSpring.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Autodesk/Vault Professional 2020/Explorer/LicenseSpring/LicenseSpring.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Autodesk/Vault Professional 2020/Explorer/LicenseSpring.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Autodesk/Vault Professional 2020/Explorer/LicenseSpring/LicenseSpring.EXE.
LOG: All probing URLs attempted and failed.
When you added LicenseSpring.dll from disk(via Browse) - VS just copied this DLL and placed it to the package folder. But VS doesn't know anything about dependent DLL. Let's consider that LicenseSpring.dll contains two methods. The first method, do some simple stuff and don't have any dependencies from another DLL. The second method depends on some other DLL. If you call the first method - it will work fine. But when you try to exec the second method - you will get an error:
"Could not load file or assembly or one of its dependencies ...
How to fix this:
When you are adding a library from disk - you need to add all dependencies as well.
You can add your assemblies to GAC - but this will be more complicated
If you cannot find out, what Assembly the system is missing at runtime, you can enable FUSLOG (https://learn.microsoft.com/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer) and use Assembly Binding Log Viewer to find out what is missing.
To be honest: FUSLOG is not very comfortable, but it's working great. Don't forget to disable it, when you are done.
I have a C# program that links to a (large) third-party library and builds successfully with it. All necessary references between my program and the library are included, and the program starts correctly.
Upon loading the .NET managed DLL for the aforementioned library, I get a System.IO.FileNotFoundException that says that the library or one of its dependencies could not be loaded ("The specified module could not be found.").
Since the relevant DLL is present in the Release directory, I went through the fusion event logs and found only binding failures for a bunch of nonexistent <PROJECT>.resource.<DLL|EXE> files under a nonexistent Release\en directory. This doesn't make much sense to me at all, since the project's only resource (a single icon) is internalized.
The logs look like this, with some information redacted:
*** Assembly Binder Log Entry (7/11/2016 # 10:08:49 AM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\USER\Desktop\PROJECT\bin\x86\Release\PROJECT.vshost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = PROJECT.resources, Version=1.0.0.0, Culture=en, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Users/USER/Desktop/PROJECT/bin/x86/Release/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = PROJECT.vshost.exe
Calling assembly : PROJECT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\USER\Desktop\PROJECT\bin\x86\Release\PROJECT.vshost.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/USER/Desktop/PROJECT/bin/x86/Release/en/PROJECT.resources.DLL.
LOG: Attempting download of new URL file:///C:/Users/USER/Desktop/PROJECT/bin/x86/Release/en/PROJECT.resources/PROJECT.resources.DLL.
LOG: Attempting download of new URL file:///C:/Users/USER/Desktop/PROJECT/bin/x86/Release/en/PROJECT.resources.EXE.
LOG: Attempting download of new URL file:///C:/Users/USER/Desktop/PROJECT/bin/x86/Release/en/PROJECT.resources/PROJECT.resources.EXE.
LOG: All probing URLs attempted and failed.
Update: This is what Process Monitor shows when loading the DLL:
The first three loads are the relevant DLL, and the following ones are (ostensibly) its dependencies, all from the standard VS C++ redistributable.
Update 2: Dependency Walker shows the same DLLs as missing, although this doesn't seem to manifest at load time:
I have a WPF application that follows the MVVM pattern. We recently signed the app and now I am getting a lot of first chance exceptions on startup. I have traced the problem to the following:
In any view, if I reference another namespace with in the application when the view is initialized I get the error:
"Could not load file or assembly 'MyApplication, Version=3.0.5917.24348, Culture=neutral, PublicKeyToken=xxxxxxxxxxxx' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"MyApplication, Version=3.0.5917.24348, Culture=neutral, PublicKeyToken=xxxxxxxxxxx"
Its always looking for a version that is 1 behind the version that I'm actually running.
If I remove the references to the other namespaces from the views, the InitializeComponent() does not throw the error
View:
<UserControl x:Class="MyApplication.View.DiagnosticsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:convert="clr-namespace:MyApplication.Converters" <!--Causes error-->
xmlns:behave="clr-namespace:MyApplication.Behaviors" <!--Causes error-->
xmlns:controls="clr-namespace:MyApplication.UserControls" <!--Causes error-->
If I remove these references, and move my converters and behaviors into another DLL and then reference them through the DLL there is no problem. The errors go away. Also If I don't sign the application I do not get the errors. I don't really want to have to reference these things in a different DLL, it seems like this should work fine. It also spends about 30 seconds throwing all of these errors as all of the views are created, so I am taking a hit on performance. I dont get why the application is trying to load itself, and why its trying to load an older version of itself. No matter how many times I build, the error is always 1 version behind.
Fusion Log:
*** Assembly Binder Log Entry (3/17/2016 # 10:30:11 AM) ***
The operation failed.
Bind result: hr = 0x80131040. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\tfs\Development\dev-feature\src\MyApplication\bin\Debug\MyApplication.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = MyApplication, Version=3.0.5920.15594, Culture=neutral, PublicKeyToken=xxxxxxxxxxxx
(Fully-specified)
LOG: Appbase = file:///C:/tfs/Development/dev-feature/src/MyApplication/bin/Debug/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MyApplication.exe
Calling assembly : PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\tfs\Development\dev-feature\src\MyApplication\bin\Debug\MyApplication.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: MyApplication, Version=3.0.5920.15594, Culture=neutral, PublicKeyToken=7b0591cb18d2a932
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/tfs/Development/dev-feature/src/MyApplication/bin/Debug/MyApplication.DLL.
LOG: Attempting download of new URL file:///C:/tfs/Development/dev-feature/src/MyApplication/bin/Debug/MyApplication/MyApplication.DLL.
LOG: Attempting download of new URL file:///C:/tfs/Development/dev-feature/src/MyApplication/bin/Debug/bin/MyApplication.DLL.
LOG: Attempting download of new URL file:///C:/tfs/Development/dev-feature/src/MyApplication/bin/Debug/bin/MyApplication/MyApplication.DLL.
LOG: Attempting download of new URL file:///C:/tfs/Development/dev-feature/src/MyApplication/bin/Debug/MyApplication.EXE.
LOG: Assembly download was successful. Attempting setup of file: C:\tfs\Development\dev-feature\src\MyApplication\bin\Debug\MyApplication.exe
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: MyApplication, Version=3.0.5920.15596, Culture=neutral, PublicKeyToken=7b0591cb18d2a932
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: The assembly reference did not match the assembly definition found.
ERR: Run-from-source setup phase failed with hr = 0x80131040.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Edit:
Did you use ProcessMonitor to see where Visual Studio is loading v 3.0.5917.24348 from? Visual Studio wants v3.0.5920.15596 so you have to put that DLL where its expected.
Edit 2:
Can you put in a binding redirect in your config file like this?
<dependentAssembly>
<assemblyIdentity name="xxxxxx" publicKeyToken="121fae78165ba3d4"/>
<bindingRedirect oldVersion="3.0.5920.15596" newVersion="3.0.5917.24348"/>
</dependentAssembly>
Ref: .Net picking wrong referenced assembly version
Original:
One reason you might get the error:
Could not load file or assembly 'MyApplication, Version=3.0.5917.24348, Culture=neutral, PublicKeyToken=xxxxxxxxxxxx' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Is when your assembly is signed and your reference to it has the Specific Version property set to True, resulting in FileLoadException.
Check you have Specific Version set to False:
Is it possible that you're trying to use strong-named URI references in your XAML? For example, by setting the AssemblyPublicKeyToken attribute your project file or by modifying the generated code-behind for the XAML?
If your XAML references are using a strong name and you use a constantly-changing version, then your XAML may end up using the previous version of the project, because the references are generated prior to the build being completed (and the new version being set).
To check, find your generated for your XAML under the obj directory and check for Uris (for example ~\obj\Debug\TestControl.g.i.cs):
System.Uri resourceLocater = new System.Uri("/T_Signing;V1.0.0.0;76005ee8ffcf5f2d;component/testcontrol.xaml", System.UriKind.Relative);
Above the URI has the full name and version. Whereas if you don't have strong named references, the uri would be more like:
System.Uri resourceLocater = new System.Uri("/T_Signing;component/testcontrol.xaml", System.UriKind.Relative);
I'm having this weird revision mismatch error. All my NUnit test projects used to work with NUnit 2.5.7, but now that I switched them to using NUnit v2.5.10, I keep on getting the following error:
FileLoadException: Could not load file or assembly 'nunit.framework, version 2.5.7...
Note: I cleaned up, rebuilt, double checked the references, no problem there.
Using the Assembly Binder Log Viewer (see below), it seems to me that the trigger of this error is the Spring.Testing.NUnit.dll... which seems weird given that the Spring.Testing.Nunit 1.3.2 Nuget page says in its Dependency List: NUnit (≥ 2.5.7)
Any idea what I'm missing here?
Thanks in advance,
TB.
Assembly Binder Log Entry (02.07.2012 # 16:06:35)
The operation failed.
Bind result: hr = 0x80131040. No description available.
Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under
executable
F:\robin\4-Development\Workspace\3rdParty\NUnit\2.5.10\nunit-agent.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: User = Mth\tbourguignon LOG: DisplayName = nunit.framework, Version=2.5.7.10213,
Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 (Fully-specified)
LOG: Appbase = file:///F:/robin/4-Development/Workspace/Application
LOG: Initial PrivatePath =
Rh.Robin.Common.Tests\bin\Debug;Rh.Robin.Service.Test\bin\Debug;Rh.Robin.Domain.Unit.Test\bin\Debug;Rh.Robin.Service.Unit.Test\bin\Debug;Rh.Robin.Web.UI.MVC.Unit.Test\bin\Debug
LOG: Dynamic Base = NULL LOG: Cache Base =
C:\Users\tbourguignon.Mth\AppData\Local\Temp\nunit20\ShadowCopyCache\4980_634768419945070499
LOG: AppName = Tests_29030132 Calling assembly : Spring.Testing.NUnit,
Version=1.3.2.40943, Culture=neutral, PublicKeyToken=65e474d141e25e07.
=== LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using host configuration file: LOG:
Using machine configuration file from
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: nunit.framework, Version=2.5.7.10213,
Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 LOG: GAC Lookup was
unsuccessful. LOG: Attempting download of new URL
file:///F:/robin/4-Development/Workspace/Application/nunit.framework.DLL.
LOG: Attempting download of new URL
file:///F:/robin/4-Development/Workspace/Application/nunit.framework/nunit.framework.DLL.
LOG: Attempting download of new URL
file:///F:/robin/4-Development/Workspace/Application/Rh.Robin.Common.Tests/bin/Debug/nunit.framework.DLL.
LOG: Assembly download was successful. Attempting setup of file:
F:\robin\4-Development\Workspace\Application\Rh.Robin.Common.Tests\bin\Debug\nunit.framework.dll
LOG: Entering download cache setup phase. LOG: Assembly Name is:
nunit.framework, Version=2.5.10.11092, Culture=neutral,
PublicKeyToken=96d09a1eb7f44a77 WRN: Comparing the assembly name
resulted in the mismatch: Revision Number ERR: The assembly reference
did not match the assembly definition found. ERR: Setup failed with hr
= 0x80131040. ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Did you gain anything from referencing a newer dot-version of NUnit? If not, the easiest thing you could do is go back and reference the older version of NUnit assemblies matching the version Spring is referencing in your code.
The other option is to modify your (Spring) application's configuration to use binding redirects to pick up the newer version of NUnit assemblies.
It makes me wonder if Spring's reference to NUnit's assembly had Specific Version set to true. Seems unlikely, though. Here's a reference on how .NET locates and binds assemblies at runtime.
Somehow I managed to solve this issue... but I still don't know what caused it. I did a major cleanup of the references, excluding all the NUnit references from my project, removing all the DLLs and reintroducing the new DLL only. I can only guess that a DLL was stuck somewhere and Spring was picking it up instead of the new one... wild guess though :(
I get the following error when i try to run a console program which calls a Workflow 4 activity I created. Note the workflow compiles and runs without issue when executed from unit Tests or embedded in another workflow.
Could not load file or assembly
'Microsoft.Practices.EnterpriseLibrary.Logging.Database,
PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The system
cannot find the file specified.
I am using EnterpriseLibrary 5.0 for logging and connection strings.
I notice that the path to the assemblies is as follows:
C:\Program Files (x86)\Microsoft
Enterprise Library
5.0\Bin\Microsoft.Practices.EnterpriseLibrary.*
Looking at the Assembly Binding Log is
see the following:
* Assembly Binder Log Entry (17/03/2011 # 15:32:48) *
The operation failed. Bind result: hr
= 0x80070002. The system cannot find the file specified.
Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable
C:\Development\Work\EquinoxeAISManagementSystemWorkflow\EquinoxeAISManagementSystemWorkflow.FeedManager\bin\Debug\EquinoxeAISManagementSystemWorkflow.FeedManager.vshost.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: User = EQUINOXEAIS\pmckee LOG:
DisplayName =
Microsoft.Practices.EnterpriseLibrary.Logging.Database,
Version=5.0.414.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
(Fully-specified) LOG: Appbase =
file:///C:/Development/Work/EquinoxeAISManagementSystemWorkflow/EquinoxeAISManagementSystemWorkflow.FeedManager/bin/Debug/
LOG: Initial PrivatePath = NULL LOG:
Dynamic Base = NULL LOG: Cache Base =
NULL LOG: AppName =
EquinoxeAISManagementSystemWorkflow.FeedManager.vshost.exe
Calling assembly :
EquinoxeAISManagementSystemWorkflow.ActivityLibrary,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null.
LOG: This bind starts in default load
context. LOG: No application
configuration file found. LOG: Using
host configuration file: LOG: Using
machine configuration file from
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference:
Microsoft.Practices.EnterpriseLibrary.Logging.Database,
Version=5.0.414.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35 LOG:
GAC Lookup was unsuccessful. LOG:
Attempting download of new URL
file:///C:/Development/Work/EquinoxeAISManagementSystemWorkflow/EquinoxeAISManagementSystemWorkflow.FeedManager/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Logging.Database.DLL.
LOG: Attempting download of new URL
file:///C:/Development/Work/EquinoxeAISManagementSystemWorkflow/EquinoxeAISManagementSystemWorkflow.FeedManager/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Logging.Database/Microsoft.Practices.EnterpriseLibrary.Logging.Database.DLL.
LOG: Attempting download of new URL
file:///C:/Development/Work/EquinoxeAISManagementSystemWorkflow/EquinoxeAISManagementSystemWorkflow.FeedManager/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Logging.Database.EXE.
LOG: Attempting download of new URL
file:///C:/Development/Work/EquinoxeAISManagementSystemWorkflow/EquinoxeAISManagementSystemWorkflow.FeedManager/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Logging.Database/Microsoft.Practices.EnterpriseLibrary.Logging.Database.EXE.
LOG: All probing URLs attempted and
failed.
I have tried the following to resolve the issue:
- Setting 'Specific version' to False for all referanced EnterpriseLibrary assemplies
- Recreating the app.config using the EnterpriseLibrary config tool again (and again and again :(
- Deleting all references assemblies and adding them back in one by one.
I would be really grateful if anyone had further pointer as to how to debug this issue.....THANKS!
I see three possible issues...
Your app is x64 (C:\Windows\Microsoft.NET\Framework64\), is Microsoft.Practices.EnterpriseLibrary.Logging.Database x86 or x64? (never tried to do this so I'm not sure if it can be done or not)
Is this file being copied local on build? It has to be located in C:/Development/Work/[snip]/bin/Debug in order for the fusion loader to find it. Fusion won't look under every directory.
It is in the GAC, but it is not in the directory mentioned in #2. Fusion must first find the assembly under the install directory before it will probe the GAC for the assembly, IIRC*.
*this behavior depends on how the assembly is loaded at runtime using a partial bind, i.e., not using the assembly's strong name.