Could not load file or assembly

S

Sehboo

OK, let me try one more time before I give up...

We have an application for .net 1.1 framework. Now I am converting it
to .net 2.0. All our assemblies are strongly named. We are using the
same public keys in .net 2.0 as we did in .net 1.1.

We are using application block but since we have modified code we have
to use the older verion and can't upgrade application block.

I have compiled all the code in VS2005, but when I try to run
Enterprise Library Configuration tool, and load web.config file, I get
an exception. I copying all the information from the exception here.

Any help will be appreciated...

The assembly with display name
'Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers'
failed to load in the 'LoadFrom' binding context of the AppDomain with
ID 1. The cause of the failure was: System.IO.FileNotFoundException:
Could not load file or assembly
'Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers,
Version=1.1.0.1, Culture=neutral, PublicKeyToken=c49a29b54781acac' or
one of its dependencies. The system cannot find the file specified.
File name:
'Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers,
Version=1.1.0.1, Culture=neutral, PublicKeyToken=c49a29b54781acac'

=== Pre-bind state information ===
LOG: User = 09ook\usr348
LOG: DisplayName =
Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers,
Version=1.1.0.1, Culture=neutral, PublicKeyToken=c49a29b54781acac,
processorArchitecture=MSIL
(Fully-specified)
LOG: Appbase = file:///c:/app/application blocks/tools/
configurationconsole/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\ic2\solutions
\ic2application\application blocks\tools\configurationconsole\bin\Debug
\EntLibConfig.vshost.exe.Config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET
\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference:
Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers,
Version=1.1.0.1, Culture=neutral, PublicKeyToken=c49a29b54781acac,
processorArchitecture=MSIL
LOG: Attempting download of new URL file:///c:/app/application blocks/
tools/configurationconsole/bin/Debug/
Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///c:/app/application blocks/
tools/configurationconsole/bin/Debug/
Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers/
Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///c:/app/application blocks/
tools/configurationconsole/bin/Debug/
Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///c:/app/application blocks/
tools/configurationconsole/bin/Debug/
Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers/
Microsoft.Practices.EnterpriseLibrary.Configuration.XmlSerializers.EXE.
 
A

Alvin Bruney [MVP]

We are using the same public keys in .net 2.0 as we did in .net 1.1.
Bad idea. You aren't gaurding against 1.1 compromises this way.

There's a El support group that you should be posting this to. But I'll take
a stab here. I think this is a version mismatch issue. I'm going out on a
limb here meaning I may be wrong but here goes: The El 1.1 (which is what I
think you are running) isn't forward compatible with .NET 2.0 hence the file
not found exception.

One way to fix this is to get the source code for the EL 1.1 and recompile
it under VS 2005 which will cause it to target 2.0. Then you can sign these
assemblies, deploy in the GAC and it should open correctly. If you are
prepared to do this manually, the better way is simply to use EL 2.0 - I
didn't get why you couldn't use this in the first place.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top