C# binding failure on missing ".resources" files - c#

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:

Related

DLL dependency of another DLL not found though loaded

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.

Assembly Binding Issue in asp.net web application, Enabled Fusion Log

I am working on legacy web application and I am getting run time assembly binding error (FileNotFoundException)
I looked into application base directory and can confirm that required DLL with correct version and public token is available under bin/ directory.
I enabled Fusion Log on server to capture details and realized that CLR is probing for assembly in GAC first (I think this is by design for signed assemblies) Below is log for quick reference :
I am able to make it work by installing assembly in GAC - but question and curiosity still remains open why CLR did not picked it from application base directory after it is not found in GAC ?
Also from below log it appears that after GAC, search is performed under directory C:Windows/System32 vs my application directory. I think it's because also logs says it's Running under executable C:\Windows\system32\dllhost.exe
Any help/comment appreciated !!
*** Assembly Binder Log Entry (6/28/2018 # 4:18:02 AM) ***
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:\Windows\system32\dllhost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.3.10102, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/system32/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = dllhost.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: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory.EXE.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.EXE.
LOG: All probing URLs attempted and failed.
*** Assembly Binder Log Entry (6/28/2018 # 4:18:02 AM) ***
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:\Windows\system32\dllhost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.3.10102, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/system32/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = dllhost.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: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory.EXE.
LOG: Attempting download of new URL file:///C:/Windows/system32/Microsoft.IdentityModel.Clients.ActiveDirectory/Microsoft.IdentityModel.Clients.ActiveDirectory.EXE.
LOG: All probing URLs attempted and failed.
*** Assembly Binder Log Entry (6/28/2018 # 4:18:03 AM) ***
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:\Windows\system32\dllhost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.3.10102, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/system32/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = dllhost.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: The same bind was seen before, and was failed with hr = 0x80070002.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).
*** Assembly Binder Log Entry (6/28/2018 # 4:18:03 AM) ***
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:\Windows\system32\dllhost.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.19.3.10102, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/system32/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = dllhost.exe
Calling assembly : MS.UST.EC.Oem.ServiceProxy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0753af11def5a5f8.
===
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: The same bind was seen before, and was failed with hr = 0x80070002.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).
The EXE image C:\Windows\system32\dllhost.exe is known as the "COM Surrogate" host. When you want to activate a COM+ component service, and not load it in your own process (for security or stability), dllhost.exe will be invoked to load the component and expose it as an "out of process" activation, then communicate back to your process via some transparent proxy channel, allowing the calling program to pretend that the component is loaded locally.
What this means is that you likely have some code which is being accessed via a COM+ interface and getting launched out-of-process. This code in turn is trying to load the Microsoft.IdentityModel.Clients.ActiveDirectory assembly. The problem is, it's not in your process anymore, and won't participate in any binding policy you've setup (private bin path, binding redirects, etc). This is why you see it trying the GAC first and then failing to find your dll - it's not your process.
Look for any component you might be loading which is a COM component: are you using some COM TypeLib, or a Runtime Callable Wrapper to some COM dll, or do you have any code which inherits System.EnterpriseServices.ServicedComponent?
If you can find where the out-of-process COM component is being launched, you may be able to refactor it to bring the logic in-process and fix your loading issues this way. Otherwise you'll have to put the assemblies in the GAC.

Could not load the file or assembly {ASSEMBLY-DETAILS} The system cannot find the file specified

Recieving this error in a VSTO project. The program flows like this:
WordAddIn (VSTO project) >> Ribbon btn click >> Capture content of doc >> All went ok? >> Call Office.Forms.frmOfficeAddIn.Initialise() >> Call same form's mbSignOn() function
A FileNotFoundException occurs at the final stage, mbSignOn(), because it cannot find the library ADODBHELPER. According to the FusionLog, it seems to be looking for the dll in the WordAddIn vsto project, even though the project is referenced and used exclusively in a seperate project containing frmOfficeAddIn.
This same code works on my standard dev machine (64bit Win7). The trouble is occurring on a new dev machine I'm trying to get up and running (32bit Win7). Exception details, fusion log included below. Any help appreciated.
Exception Msg:
{"Could not load file or assembly 'ADODBHELPER, Version=6.0.8.19015, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.":"ADODBHELPER, Version=6.0.8.19015, Culture=neutral, PublicKeyToken=null"}
Stack Trace:
at OfficeCaptureAddIn.frmOfficeAddIn.mbSignon()
at OfficeCaptureAddIn.frmOfficeAddIn.Initialise(Dictionary`2 dictFiles) in C:\SOURCECONTROL\dotNET\Office\Forms\frmOfficeAddIn.vb:line 45
FusionLog:
=== Pre-bind state information ===
LOG: DisplayName = ADODBHELPER, Version=6.0.8.19015, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/SOURCECONTROL/dotNET/dotNET/WordAddIn/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : OfficeCaptureAddIn, Version=5.0.6073.19015, Culture=neutral, PublicKeyToken=null.
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\SOURCECONTROL\dotNET\dotNET\WordAddIn\bin\Debug\WordAddIn.dll.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:/SOURCECONTROL/dotNET/WordAddIn/bin/Debug/ADODBHELPER.DLL.
LOG: Attempting download of new URL file:///C:/SOURCECONTROL/dotNET/WordAddIn/bin/Debug/ADODBHELPER/ADODBHELPER.DLL.
LOG: Attempting download of new URL file:///C:/SOURCECONTROL/dotNET/WordAddIn/bin/Debug/ADODBHELPER.EXE.
LOG: Attempting download of new URL file:///C:/SOURCECONTROL/dotNET/WordAddIn/bin/Debug/ADODBHELPER/ADODBHELPER.EXE.

Assembly load failure

I am having a managed assembly load issue stemming from a spawned mixed-mode process. See below for details. Assume BinPath and ExecutablePath are two valid paths that are not the same.
I have a web app that was started in BinPath, and creates a process using the following ProcessStartInfo:
new ProcessStartInfo()
{
FileName = ExecutablePath + "PerformanceRunner.exe",
WorkingDirectory = ExecutablePath ,
UseShellExecute = true
};
PerformanceRunner.exe then successfully loads several unmanaged DLLs which reside in ExecutablePath (this is verified by looking at the Modules window in VS). It then attempts to load a managed assembly also located in ExecutablePath, but this fails. Here is the fusion log of this - note that BinPath is "G:\TOPSS\TOPSS New\Common\Service\Bin" and the managed assembly is TPSSCDQ.dll. TPSSCDQ resides in ExecutablePath.
* Assembly Binder Log Entry (11/29/2012 # 4:16:11 PM) *
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 G:\TOPSS\TOPSS New\Common\Service\Bin\PerformanceRunner.exe
=== Pre-bind state information ===
LOG: User = CORP\lbhra
LOG: DisplayName = TpssCDQ, Version=1.0.4612.26218, Culture=neutral,
PublicKeyToken=null (Fully-specified)
LOG: Appbase = file:///G:/TOPSS/TOPSS New/Common/Service/Bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = PerformanceRunner.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\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:///G:/TOPSS/TOPSS New/Common/Service/Bin/TpssCDQ.DLL.
LOG: Attempting download of new URL file:///G:/TOPSS/TOPSS New/Common/Service/Bin/TpssCDQ/TpssCDQ.DLL.
LOG: Attempting download of new URL file:///G:/TOPSS/TOPSS
New/Common/Service/Bin/TpssCDQ.EXE.
LOG: Attempting download of new URL file:///G:/TOPSS/TOPSS New/Common/Service/Bin/TpssCDQ/TpssCDQ.EXE.
LOG: All probing URLs attempted and failed.
I don't fully understand what the PrivatePath, Appbase or Dynamicbase is, but shouldn't at least one of these paths be the working directory (ExecutablePath)? I have verified using GetCurrentDirectory that the working directory is set correctly. I'd really appreciate a hand with this, as I am rather confused.
You're right, it should be looking in the root folder where the executable is stored. It won't look in the working directory - but I understand in this instance, those paths are the same. If you look at your error message, APPBASE is set correctly, so I think it's looking in the right place, but not finding it for other reasons.
http://msdn.microsoft.com/en-us/library/yx7xezcf(v=vs.90).aspx
Other things to check:
Do you have any assembly load hints in your app/machine config files?
Is the managed DLL built for the correct platform?
Has the managed DLL been renamed at all - does the filename match the manifest?
Are all the managed DLL's dependencies stored in the same location?
Also, how are you loading this assembly? Is it listed as a reference of the project, or are you calling Assembly.Load (or similar)?

EnterpriseLibrary.Logging.Database assembly linking issue with Workflow

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.

Categories

Resources