How do I know which assembly is which?

Working with the QuickStarts for the EnterpriseLibrary... I've used an existing project as a jumping off point for my project and want to use the Release version of the logging.dll instead of the debug version that was used by the original project. I've built the release version and have pointed all of my references to the path containing the new version but get this error when at runtime.

            Message      "An error occurred creating the configuration section handler for loggingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I need guidance understanding the relationship between the config information and the project's referenced assemblies. Details on understanding where VS thinks it should find referenced DLLs.
juststeveAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PockyMasterCommented:
Try running the fusion log viewer.. the logging will tell you exactly where it will search for assemblies

Visual studio cmd prompt -> fuslogvw
then enable the log (to screen, or file, what you prefer)

then run your app, and check the fuslog for errors.
1
PockyMasterCommented:
But the error you have could e.g. by caused by not referencing the Microsoft.Practices.EnterpriseLibrary.DataBase when you configure the logging block to use database logging...
0
Sachintana DissanayakeSenior Web DeveloperCommented:
You need to have dll references to,
    Microsoft.Practices.EnterpriseLibrary.Logging.dll
    Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.dll
    Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.Design.dll

Since logging configuration section in the web.config will need all of the above references in the run time.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

juststeveAuthor Commented:
*** Assembly Binder Log Entry  (1/29/2008 @ 3:50:53 AM) ***

The operation failed.
Bind result: hr = 0x80131040. No description available.

Assembly manager loaded from:  c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable  C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\CMSwApp\bin\Debug\CMS_WinForm.vshost.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = CHI01-019-21\Administrator
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio 2008/Projects/CMSwApp/bin/Debug/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\CMSwApp\bin\Debug\CMS_WinForm.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.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio 2008/Projects/CMSwApp/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Logging.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\CMSwApp\bin\Debug\Microsoft.Practices.EnterpriseLibrary.Logging.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
ERR: The assembly reference did not match the assembly definition found.
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.


0
PockyMasterCommented:
You will see the lookup path in the pasted log:
LOG: GAC Lookup was unsuccessful.

so, first GAC
Then application path.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
ERR: The assembly reference did not match the assembly definition found.

Have you tried cleaning your solution and then rebuilding it?
If you linked to the 'source' version of the EL before, that version was not signed as far as I remember.
I believe the 3.1 version came with a signed set of dll's that gets copied into a seperate folder.
You can reference to these dll's instead.


0
Sachintana DissanayakeSenior Web DeveloperCommented:
Install enterprise library, it will install those assemblies to GAC.
http://www.microsoft.com/downloads/details.aspx?FamilyID=4c557c63-708f-4280-8f0c-637481c31718
0
PockyMasterCommented:
@sachintana, that's nice on your dev machine, but you don't want it to install on all your deployment targets like that i suppose
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sachintana DissanayakeSenior Web DeveloperCommented:
You should add these assemblies to GAC or
Add these dll's in to your web project as dll references.
    Microsoft.Practices.EnterpriseLibrary.Logging.dll
    Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.dll
    Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.Design.dll
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.