Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Could not load file or assembly...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Val - 10 Oct 2007 20:16 GMT
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
Alvin Bruney [MVP] - 11 Oct 2007 02:29 GMT
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.

Signature

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

> Hi,
>
[quoted text clipped - 154 lines]
> Extended Properties: HandlingInstance ID: -
> acda3991-9cc1-4674-a467-63cc86bbf574
Val - 14 Oct 2007 05:11 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.