1
Vote

Upgrading from EntLib 5 to 6

description

Hi, I am trying to upgrade the enterprise lib from version 5 to 6. I have removed all references from my projects that reference the Enterprise Lib 5.0 install dlls (Enterprise Library 5.0.msi + Enterprise Library 5.0 Optional Update 1.msi) all versions 5.0.505.0

Microsoft.Practices.EnterpriseLibrary.Common
Microsoft.Practices.EnterpriseLibrary.Data
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging
Microsoft.Practices.EnterpriseLibrary.Logging
Microsoft.Practices.EnterpriseLibrary.Logging.Database
Microsoft.Practices.ServiceLocation
Microsoft.Practices.Unity
Microsoft.Practices.Unity.Configuration
Microsoft.Practices.Unity.Interception
Microsoft.Practices..Unity.Interception.Configuration


and added the following nuget packages:

Enterprise Library - Common Infrastructure
Enterprise Library - Data Access Application Block
Enterprise Library - Exception Handling Application Block
Enterprise Library - Logging Application Block Database Provider
Enterprise Library - Logging Application Block
Enterprise Library - Policy Injection Application Block
Unity Interception Extension
Unity



I have created my own TraceListenerData class as follows:
[AddSateliteProviderCommand("connectionStrings", typeof(DatabaseSettings), "DefaultDatabase", "DatabaseInstanceName")]
public class IForceFormattedDatabaseTraceListenerData : TraceListenerData
{
  ...........
  ...........
    protected override Expression<Func<TraceListener>> GetCreationExpression()
    {
        return () =>
               new IForceFormattedDatabaseTraceListener(
                   Container.Resolved<Microsoft.Practices.EnterpriseLibrary.Data.Database>(DatabaseInstanceName),
                   WriteLogStoredProcName,
                   AddCategoryStoredProcName,
                   Container.ResolvedIfNotNull<ILogFormatter>(Formatter));
    }
}


But when I build my project I get the following error:

Error 1 The type or namespace name 'ContainerModel' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary.Common.Configuration' (are you missing an assembly reference?)

comments