PC Review


Reply
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average.

Could not load file or assembly...

 
 
=?Utf-8?B?VmFs?=
Guest
Posts: n/a
 
      10th Oct 2007
Hi,

I am developing a middle tier WCF server called BusinessLogic, using the
Enterprise Library. Although I posted similar question on the EL forums (no
answer yet), it seems to me that the problem is more general .NET related
than WCF or EL specific. The problem shows when EL exception handling block
catches one exception and according to a policy throws different exception:
FaultException<SomeFaultFromBusinessLogic>. When the app. block tries to load
the fault class from BusinessLogic.dll it throws an exception saying that it
cannot find BusinessLogic ver. 1.0.0.2719 but the funny thing is that my
assembly is 1.0.0.1234. No matter what version is the assembly it always
tries to load ver. 1.0.0.2719. Can you please help - this has been haunting
me for weeks now.

Thank you
Val

A first chance exception of type 'Abc.BusinessLogic.FieldNullException'
occurred in BusinessLogic.dll
General Information: 1 : Timestamp: 10/8/2007 8:17:18 AM
Message:
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingException:
Could not load file or assembly 'BusinessLogic, Version=1.0.0.2719,
Culture=neutral, PublicKeyToken=25be6966e7e7a65e' or one of its dependencies.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040) --->
System.IO.FileLoadException: Could not load file or assembly 'BusinessLogic,
Version=1.0.0.2719, Culture=neutral, PublicKeyToken=25be6966e7e7a65e' or one
of its dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'BusinessLogic, Version=1.0.0.2719, Culture=neutral,
PublicKeyToken=25be6966e7e7a65e'
at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean
throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&
stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError,
Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError,
Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName)
at
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.Configuration.FaultContractHandlerAssembler.Assemble(IBuilderContext
context, ExceptionHandlerData objectConfiguration, IConfigurationSource
configurationSource, ConfigurationReflectionCache reflectionCache)
at
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedObjectFactory`2.Create(IBuilderContext
context, TConfiguration objectConfiguration, IConfigurationSource
configurationSource, ConfigurationReflectionCache reflectionCache)
at
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntryCustomFactory.Create(IBuilderContext
context, ExceptionTypeData objectConfiguration, IConfigurationSource
configurationSource, ConfigurationReflectionCache reflectionCache)
at
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyCustomFactory.CreateObject(IBuilderContext
context, String name, IConfigurationSource configurationSource,
ConfigurationReflectionCache reflectionCache)
at
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy.BuildUp(IBuilderContext
context, Type t, Object existing, String id)
at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext
context, Type typeToBuild, Object existing, String idToBuild)
at
Microsoft.Practices.ObjectBuilder.SingletonStrategy.BuildUp(IBuilderContext
context, Type typeToBuild, Object existing, String idToBuild)
at Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext
context, Type typeToBuild, Object existing, String idToBuild)
at
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.BuildUp(IBuilderContext
context, Type t, Object existing, String id)
at
Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator
locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[]
transientPolicies)
at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator
locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[]
transientPolicies)
at
Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUpTTypeToBuild(IReadWriteLocator
locator, String idToBuild, Object existing, PolicyList[] transientPolicies)
at
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUpT(IReadWriteLocator
locator, String id, IConfigurationSource configurationSource)
at
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase`1.Create(String name)
at
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.GetExceptionPolicy(Exception
exception, String policyName, ExceptionPolicyFactory factory)

=== Pre-bind state information ===
LOG: User = VTMELAMED\valo
LOG: DisplayName = BusinessLogic, Version=1.0.0.2719, Culture=neutral,
PublicKeyToken=25be6966e7e7a65e
(Fully-specified)
LOG: Appbase =
file:///C:/Users/valo/Documents/Projects/Abc/Abc.dev/Main/US/BusinessLogic/BusinessLogicExecutable/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly :
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF, Version=3.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\Users\valo\Documents\Projects\Abc\Abc.dev\Main\US\BusinessLogic\BusinessLogicExecutable\bin\Debug\BusinessLogicExecutable.vshost.exe.config
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: BusinessLogic, Version=1.0.0.2719,
Culture=neutral, PublicKeyToken=25be6966e7e7a65e
LOG: Attempting download of new URL
file:///C:/Users/valo/Documents/Projects/Abc/Abc.dev/Main/US/BusinessLogic/BusinessLogicExecutable/bin/Debug/BusinessLogic.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing
terminated.

--- End of inner exception stack trace ---
at
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.GetExceptionPolicy(Exception
exception, String policyName, ExceptionPolicyFactory factory)
at
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception
exceptionToHandle, String policyName, ExceptionPolicyFactory policyFactory)
at
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception exceptionToHandle, String policyName)
at
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.ExceptionShieldingErrorHandler.ProvideFault(Exception
error, MessageVersion version, Message& fault)
Category: General
Priority: -1
EventId: 1
Severity: Information
Title:
Machine: DOLORES
App Domain: BusinessLogicExecutable.vshost.exe
ProcessId: 5540
Process Name:
C:\Users\valo\Documents\Projects\Abc\Abc.dev\Main\US\BusinessLogic\BusinessLogicExecutable\bin\Debug\BusinessLogicExecutable.vshost.exe
Thread Name:
Win32 ThreadId:7992
Extended Properties: HandlingInstance ID: -
acda3991-9cc1-4674-a467-63cc86bbf574

 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      11th Oct 2007
Start by purging your machine of all the dll's related to that assembly.
Then, perform a clean and then a build. Post back here if you make no
progress.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless Author Plug
OWC Black Book 2nd Edition
Exclusively on www.lulu.com/owc
$24.99


"Val" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I am developing a middle tier WCF server called BusinessLogic, using the
> Enterprise Library. Although I posted similar question on the EL forums
> (no
> answer yet), it seems to me that the problem is more general .NET related
> than WCF or EL specific. The problem shows when EL exception handling
> block
> catches one exception and according to a policy throws different
> exception:
> FaultException<SomeFaultFromBusinessLogic>. When the app. block tries to
> load
> the fault class from BusinessLogic.dll it throws an exception saying that
> it
> cannot find BusinessLogic ver. 1.0.0.2719 but the funny thing is that my
> assembly is 1.0.0.1234. No matter what version is the assembly it always
> tries to load ver. 1.0.0.2719. Can you please help - this has been
> haunting
> me for weeks now.
>
> Thank you
> Val
>
> A first chance exception of type 'Abc.BusinessLogic.FieldNullException'
> occurred in BusinessLogic.dll
> General Information: 1 : Timestamp: 10/8/2007 8:17:18 AM
> Message:
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingException:
> Could not load file or assembly 'BusinessLogic, Version=1.0.0.2719,
> Culture=neutral, PublicKeyToken=25be6966e7e7a65e' or one of its
> dependencies.
> The located assembly's manifest definition does not match the assembly
> reference. (Exception from HRESULT: 0x80131040) --->
> System.IO.FileLoadException: Could not load file or assembly
> 'BusinessLogic,
> Version=1.0.0.2719, Culture=neutral, PublicKeyToken=25be6966e7e7a65e' or
> one
> of its dependencies. The located assembly's manifest definition does not
> match the assembly reference. (Exception from HRESULT: 0x80131040)
> File name: 'BusinessLogic, Version=1.0.0.2719, Culture=neutral,
> PublicKeyToken=25be6966e7e7a65e'
> at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean
> throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&
> stackMark, Boolean loadTypeFromPartialName)
> at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean
> throwOnError,
> Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
> at System.RuntimeType.PrivateGetType(String typeName, Boolean
> throwOnError,
> Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
> at System.Type.GetType(String typeName)
> at
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.Configuration.FaultContractHandlerAssembler.Assemble(IBuilderContext
> context, ExceptionHandlerData objectConfiguration, IConfigurationSource
> configurationSource, ConfigurationReflectionCache reflectionCache)
> at
> Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedObjectFactory`2.Create(IBuilderContext
> context, TConfiguration objectConfiguration, IConfigurationSource
> configurationSource, ConfigurationReflectionCache reflectionCache)
> at
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntryCustomFactory.Create(IBuilderContext
> context, ExceptionTypeData objectConfiguration, IConfigurationSource
> configurationSource, ConfigurationReflectionCache reflectionCache)
> at
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyCustomFactory.CreateObject(IBuilderContext
> context, String name, IConfigurationSource configurationSource,
> ConfigurationReflectionCache reflectionCache)
> at
> Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy.BuildUp(IBuilderContext
> context, Type t, Object existing, String id)
> at
> Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext
> context, Type typeToBuild, Object existing, String idToBuild)
> at
> Microsoft.Practices.ObjectBuilder.SingletonStrategy.BuildUp(IBuilderContext
> context, Type typeToBuild, Object existing, String idToBuild)
> at
> Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(IBuilderContext
> context, Type typeToBuild, Object existing, String idToBuild)
> at
> Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.BuildUp(IBuilderContext
> context, Type t, Object existing, String id)
> at
> Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator
> locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[]
> transientPolicies)
> at
> Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator
> locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[]
> transientPolicies)
> at
> Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUpTTypeToBuild(IReadWriteLocator
> locator, String idToBuild, Object existing, PolicyList[]
> transientPolicies)
> at
> Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUpT(IReadWriteLocator
> locator, String id, IConfigurationSource configurationSource)
> at
> Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.LocatorNameTypeFactoryBase`1.Create(String
> name)
> at
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.GetExceptionPolicy(Exception
> exception, String policyName, ExceptionPolicyFactory factory)
>
> === Pre-bind state information ===
> LOG: User = VTMELAMED\valo
> LOG: DisplayName = BusinessLogic, Version=1.0.0.2719, Culture=neutral,
> PublicKeyToken=25be6966e7e7a65e
> (Fully-specified)
> LOG: Appbase =
> file:///C:/Users/valo/Documents/Projects/Abc/Abc.dev/Main/US/BusinessLogic/BusinessLogicExecutable/bin/Debug/
> LOG: Initial PrivatePath = NULL
> Calling assembly :
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF,
> Version=3.1.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
> ===
> LOG: This bind starts in default load context.
> LOG: Using application configuration file:
> C:\Users\valo\Documents\Projects\Abc\Abc.dev\Main\US\BusinessLogic\BusinessLogicExecutable\bin\Debug\BusinessLogicExecutable.vshost.exe.config
> LOG: Using machine configuration file from
> C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
> LOG: Post-policy reference: BusinessLogic, Version=1.0.0.2719,
> Culture=neutral, PublicKeyToken=25be6966e7e7a65e
> LOG: Attempting download of new URL
> file:///C:/Users/valo/Documents/Projects/Abc/Abc.dev/Main/US/BusinessLogic/BusinessLogicExecutable/bin/Debug/BusinessLogic.DLL.
> WRN: Comparing the assembly name resulted in the mismatch: Revision Number
> ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing
> terminated.
>
> --- End of inner exception stack trace ---
> at
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.GetExceptionPolicy(Exception
> exception, String policyName, ExceptionPolicyFactory factory)
> at
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception
> exceptionToHandle, String policyName, ExceptionPolicyFactory
> policyFactory)
> at
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception
> exceptionToHandle, String policyName)
> at
> Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.ExceptionShieldingErrorHandler.ProvideFault(Exception
> error, MessageVersion version, Message& fault)
> Category: General
> Priority: -1
> EventId: 1
> Severity: Information
> Title:
> Machine: DOLORES
> App Domain: BusinessLogicExecutable.vshost.exe
> ProcessId: 5540
> Process Name:
> C:\Users\valo\Documents\Projects\Abc\Abc.dev\Main\US\BusinessLogic\BusinessLogicExecutable\bin\Debug\BusinessLogicExecutable.vshost.exe
> Thread Name:
> Win32 ThreadId:7992
> Extended Properties: HandlingInstance ID: -
> acda3991-9cc1-4674-a467-63cc86bbf574
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?VmFs?=
Guest
Posts: n/a
 
      14th Oct 2007
Alvin,

Thank you for your response. Unfortunately, I have tried that before and
tried it again today and still get the same...

Any other ideas? I'll appreciate it.

Thank you
Val
 
Reply With Quote
 
meetarifmd@gmail.com
Guest
Posts: n/a
 
      2nd Aug 2012
I ran thru the same problem this morning.
After a careful thought, it sounds like both WCF and .Net combination problem.
The server (WCF) was upgraded recently and I was expecting the client to connect to at least some basic services(the first service which lets client to know if it needs to update) and then passes parameters to update. But theWCF service dictates the client to load DLL of the WCF server version, which the client doesn't have. As such exception is throw.

Plans to change the first connecting service, independent of all other DLLs..
Hope this might solve our autoupdate module.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load request form fails: Could not load some objects because they arenot available on this machine Mandyli611@gmail.com Microsoft Outlook 1 5th Aug 2008 10:22 PM
Word could not load the e-mail envelope. This could be caused by a =?Utf-8?B?SGFuayBGcmVlbWFu?= Microsoft Outlook BCM 1 30th May 2005 04:50 PM
load=load=load=load= Janusz Sokolowski Windows XP Help 0 26th Oct 2004 02:29 PM
The action could not be completed. the file .pst could not be accessed Rajashree Microsoft Outlook 0 18th Nov 2003 11:04 AM
xxxxx.exe could not be saved, source file could not be read Brian Smith Windows XP Networking 0 11th Nov 2003 03:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:11 AM.