Trouble Compiling & Running Enterprise Library 5.0 Example ExtendedPropertyDatabaseListenerWithExceptionLogging

Topics: Data Access Application Block, Exception Handling Application Block, General discussion, Logging Application Block
Nov 1, 2012 at 5:41 PM
Edited Nov 1, 2012 at 6:16 PM

Greetings;

I've downloaded and copied the Enterprise Library 5.0 Example ExtendedPropertyDatabaseListenerWithExceptionLogging from the Enterprise Library Sample Projects page at 

 

http://entlib.codeplex.com/wikipage?title=Sample%20Projects

 

and cannot get the entire example to build and run in Debug mode.


Using Visual Studio 2010 Version 10.0.40219.1 SP1Rel and Microsoft .NET Framework 4.0.30319 SP1Rel on a PC running Windows XP Professional Version 5.1 (Build 2600.xpsp_sp3_gdr.120821-1629 Service Pack 3), I open the Solution, and perform a Build >> Rebuild Solution, and I receive the following Error Message that prevents the build from completing:

Error 1 The command "copy C:\work\NET\ExtendedPropertyDatabaseListenerWithExceptionLogging\packages\EnterpriseLibrary.Data.5.0.505.0\lib\NET35\Microsoft.Practices.EnterpriseLibrary.Data.dll C:\work\NET\ExtendedPropertyDatabaseListenerWithExceptionLogging\ExtendedPropertiesConsoleApp\bin\Debug\copy C:\work\NET\ExtendedPropertyDatabaseListenerWithExceptionLogging\packages\EnterpriseLibrary.Logging.Database.5.0.505.0\lib\NET35\Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll C:\work\NET\ExtendedPropertyDatabaseListenerWithExceptionLogging\ExtendedPropertiesConsoleApp\bin\Debug\" exited with code 1. ExtendedPropertiesConsoleApp

Please accept my apologies if I'm missing something obvious, but I'm not sure how to resolve this solution build error.  Essentially, I want to run through it fully in Debug mode to get a better insight on how to implement my own Custom Exception Handler.

Thank you in advance for your time, help and patience.

Nov 3, 2012 at 10:37 PM

There are 2 post build commands on the console application to ensure that the Logging.Database and Database assemblies are deployed.

The commands are: 

copy $(SolutionDir)packages\EnterpriseLibrary.Data.5.0.505.0\lib\NET35\Microsoft.Practices.EnterpriseLibrary.Data.dll $(TargetDir)
copy $(SolutionDir)packages\EnterpriseLibrary.Logging.Database.5.0.505.0\lib\NET35\Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll $(TargetDir)

I would try the copy commands from the command prompt and see what error (if any) you get. 

The directory structure should look like:

├───CustomExceptionLoggingHandler
│   ├───bin
│   │   ├───Debug
│   │   └───Release
│   ├───obj
│   │   ├───Debug
│   │   │   └───TempPE
│   │   └───Release
│   │       └───TempPE
│   └───Properties
├───ExtendedPropertiesConsoleApp
│   ├───bin
│   │   ├───Debug
│   │   └───Release
│   ├───obj
│   │   └───x86
│   │       ├───Debug
│   │       │   └───TempPE
│   │       └───Release
│   │           └───TempPE
│   └───Properties
├───ExtendedPropertyDatabaseListener
│   ├───bin
│   │   ├───Debug
│   │   └───Release
│   ├───obj
│   │   ├───Debug
│   │   │   └───TempPE
│   │   └───Release
│   │       └───TempPE
│   └───Properties
├───packages
│   ├───CommonServiceLocator.1.0
│   │   └───lib
│   │       ├───NET35
│   │       └───SL30
│   ├───EnterpriseLibrary.Common.5.0.505.0
│   │   ├───lib
│   │   │   ├───NET35
│   │   │   └───SL40
│   │   └───tools
│   ├───EnterpriseLibrary.Data.5.0.505.0
│   │   ├───lib
│   │   │   └───NET35
│   │   └───tools
│   ├───EnterpriseLibrary.ExceptionHandling.5.0.505.0
│   │   ├───lib
│   │   │   ├───NET35
│   │   │   └───SL40
│   │   └───tools
│   ├───EnterpriseLibrary.ExceptionHandling.Logging.5.0.505.0
│   │   ├───lib
│   │   │   ├───NET35
│   │   │   └───SL40
│   │   └───tools
│   ├───EnterpriseLibrary.Logging.5.0.505.1
│   │   ├───lib
│   │   │   ├───NET35
│   │   │   └───SL40
│   │   └───tools
│   ├───EnterpriseLibrary.Logging.Database.5.0.505.0
│   │   ├───lib
│   │   │   └───NET35
│   │   ├───scripts
│   │   └───tools
│   ├───Unity.2.1.505.0
│   │   ├───lib
│   │   │   ├───NET35
│   │   │   └───SL30
│   │   └───tools
│   └───Unity.Interception.2.1.505.0
│       ├───lib
│       │   ├───NET35
│       │   └───SL40
│       └───tools
└───Scripts

 

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com