What is needed to make the extensions work? Problems

Topics: Developer Forum, User Forum
Aug 1, 2008 at 2:16 PM
Hi all,

I have downloaded the extensions project, found all of the correct referenced assembiles and compiled the code.

In my test project, I can reference the BizUnit and Extensions DLL correctly and attempt to write tests.

However, when I run them I am getting many errors in regards to Enterprise Logging.

I downloaded the latest EntLib and installed this. The error persisted. Now I was getting problems with mismatches in DLL versions.

Further, there is no help on how to get my configuration to the standard needed by BizUnit.

Would someone be kind enough to

1) Give the version of Enterprise Library that needs to be installed to make this work
2) Provide brief details of what I need to put into my app.config to make the configurations correct.
3) Is there anything else that is needed for this to work?

Many many thanks to anyone who can help.

Some of the errors I saw whilst trying to make this work were...

Test method ------.DirectorySanity.Test01 threw exception:  System.InvalidCastException: Unable to cast object of type 'Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings' to type 'Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings'..

Test method ------.DirectorySanity.Test01 threw exception:  System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for loggingConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified

Test method ------.DirectorySanity.Test01 threw exception:  System.TypeInitializationException: The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Logging.Logger' threw an exception. --->  System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=73b4774644b1d323' or one of its dependencies. 

Test method ------.DirectorySanity.Test01 threw exception:  System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=73b4774644b1d323' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF
Aug 3, 2008 at 8:20 PM
Hi everyone,

I finally have this working, so to help anyone else, here is what I did.

1) Download and install enterprise library version 2.0 (From 2006). You MUST have this version.
2) Download the bizunit extensions project.
3) Within THAT project tree, create a new project to hold your tests. I used Vs 2008 so used the inbuilt testing tools, as opposed to NUnit. *
4) Add project references to BizUnit and BizUnitExtensions.
5) Add an app.config to this project if one does not exist.
6) Click Start -> Microsoft patterns & practices -> Enterprise Library - January 2006 -> Enterprise Library Configuration
7) File-> Open Application
8) Find the app.config you created.
9) Right Click The new node -> New -> Logging Application Block
10) Make no further changes and save the file. It is now configured to use the Enterprise Library Configuration.
11) Write your tests and per the examples and (or VS2008 style) and they should work.

Fingers crossed and good luck.

* If I referenced the BizUnit and Extensions DLLs from a different project, this refused to work. It seems only project references work.

I hope that goes some way to helping someone else. It was a nightmare to get this working! But now it is... fantastic tool.

TM
Coordinator
Aug 27, 2008 at 9:48 AM
Hi TM,
I am really sorry to hear about the trouble in getting this set up and I apologise for the lack of information regarding setting it up.To be honest, Its been such a long time since we restructured the code and sorted the setup issues, i had completely forgotten that there were any issues (especially with regard to using the entlib version 2.0.0.0. ). I was quite sure it was working for us with v3.1

I will check if this can be updated to work with Entlib 3.1 and put some more instructions on getting this up and working.

Rgds
Benjy

Jun 8, 2009 at 2:13 PM

Hi,

 

I am using Bizunit 3.0 to validate map's output. I am getting the error :

Microsoft.Services.BizTalkApplicationFramework.BizUnit.TestStepExecutionException: BizUnit encountered an error executing a test step --->  System.IO.FileNotFoundException: Could not load file or assembly : Map assembly

The system cannot find the file specified.WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Earlier it was working fine then suddenly it stopped working.

Regards

Sharuti

 

Coordinator
Jun 12, 2009 at 9:56 PM

Hi Sharuti,

I havent actually used the step from the main BizUnit library as I use a similarly named one here in the Extensions library. However, it looks like it might be a problem with the way the map namespaces and assembly name has been specified. Are you using a fully qualified, strong name of the assembly and is it in the GAC? it may be that the step is looking to load it from the GAC.

HTH,

benjy

Jun 13, 2009 at 2:32 PM

I have Gaced and strong named the assemblies. Its not working

 

Thanks

Sharuti