16

Closed

Support Enterprise Library 5.0

description

Hi.
 
Thank you for Enterprise Library Contrib v4.1.
 
I would like EntLibContrib to support Enterprise Library 5.0.
 
See this discussion thread:
http://entlibcontrib.codeplex.com/Thread/View.aspx?ThreadId=214467
 
Thank you.
Closed Oct 29, 2011 at 10:55 AM by jbourgault
The main features of EntLibContrib now support Enterprise Library 5.0.Find the binaries and source under the Downloads section or download them through NuGet.

comments

WaldiMen wrote Oct 26, 2010 at 6:55 AM

I am also very interested in EntLibContrib support for Enterprise Library 5.0.

Thanks

icnocop wrote Oct 30, 2010 at 2:51 AM

Here is an example exception when trying to use EntLibContrib.Data.MySql in a web application where the web application already uses Enterprise Library v5.0:

Server Error in '/mywebapp' Application.
Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, 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)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, 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)

Source Error:

Line 20: public MyDataClass()
Line 21: {
Line 22: cache = CacheFactory.GetCacheManager("Cache Manager");
Line 23: dataProvider = new DataProvider();
Line 24: }


Source File: C:\MyWebApp\MyDataClass.cs Line: 22

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/MyWebApp/
LOG: Initial PrivatePath = C:\MyWebApp\bin

Calling assembly : EntLibContrib.Data.MySql, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null.

LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\MyWebApp\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.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.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/mywebapp/8bf39411/a5a4855/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/mywebapp/8bf39411/a5a4855/Microsoft.Practices.EnterpriseLibrary.Data/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
LOG: Attempting download of new URL file:///C:/MyWebApp/bin/Microsoft.Practices.EnterpriseLibrary.Data.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.


Stack Trace:

[FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, 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)]
System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +64
System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58
System.Type.GetType(String typeName, Boolean throwOnError) +59
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.AssemblyQualifiedTypeNameConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +114
System.ComponentModel.TypeConverter.ConvertFrom(Object value) +48
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DbProviderMapping.get_DatabaseType() +55
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDatabaseData(ConnectionStringSettings connectionString, DatabaseSettings databaseSettings) +85
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.<get_Databases>d__0.MoveNext() +393
System.Collections.Generic.List1..ctor(IEnumerable1 collection) +7667396
System.Linq.Enumerable.ToList(IEnumerable1 source) +61
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.<DoGetRegistrations>d__10.MoveNext() +195
System.Linq.WhereSelectEnumerableIterator
2.MoveNext() +96
System.Collections.Generic.List1..ctor(IEnumerable1 collection) +7667396
System.Linq.Enumerable.ToList(IEnumerable1 source) +61
Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetRegistrations(IConfigurationSource configurationSource) +207
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.<GetRegistrations>b__0(ITypeRegistrationsProvider p, IConfigurationSource cs) +37
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.GetRegistrationsInternal(IConfigurationSource configurationSource, Func
3 registrationAccessor) +137
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.GetRegistrations(IConfigurationSource configurationSource) +136
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.CompositeTypeRegistrationsProviderLocator.<GetRegistrations>b__0(ITypeRegistrationsProvider l, IConfigurationSource cs) +37
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.<>c__DisplayClass5.<GetRegistrationsInternal>b__4(ITypeRegistrationsProvider l) +54
System.Linq.<SelectManyIterator>d__14`2.MoveNext() +205
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.Unity.UnityContainerConfigurator.RegisterAllCore(IConfigurationSource configurationSource, ITypeRegistrationsProvider rootProvider) +143
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.ChangeTrackingContainerConfigurator.RegisterAll(IConfigurationSource configurationSource, ITypeRegistrationsProvider rootProvider) +39
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.ConfigureContainer(ITypeRegistrationsProvider locator, IContainerConfigurator configurator, IConfigurationSource configSource) +92
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.ConfigureContainer(IContainerConfigurator configurator, IConfigurationSource configSource) +122
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.CreateDefaultContainer(IConfigurationSource configurationSource) +103
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.CreateDefaultContainer() +37
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.SetCurrentContainerIfNotSet() +84
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.get_Current() +22
Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.InnerGetCacheManager(String cacheManagerName) +60
Microsoft.Practices.EnterpriseLibrary.Caching.CacheFactory.GetCacheManager(String cacheManagerName) +105
MyWebApp.MyDataClass..ctor() in C:\MyWebApp\MyDataClass.cs:22
MyWebApp.Global.Application_Start(Object sender, EventArgs e) in C:\MyWebApp\Global.asax.cs:37


Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955

icnocop wrote Nov 1, 2010 at 8:26 PM

A possible "work-around" is to modify the application configuration file to use the codeBase tag.
See http://support.microsoft.com/kb/821626 for an example.

icnocop wrote Apr 7, 2011 at 11:33 PM

The "Microsoft Enterprise Library 5.0 Migration Guide" (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=7B8F9EDD-7496-4232-9CBC-CE9476414956) indicates the breaking change:
"Caching handler: This handler is no longer included in Enterprise Library. You must download it from Enterprise Library Contrib Project if you need to use it in your application."
With a hyperlink to http://www.codeplex.com/Wikipage?ProjectName=entlibcontrib.

jbourgault wrote Jun 21, 2011 at 4:01 PM

To everyone that vote for this (even if it's been a long time ago),

as you can see if you're looking at the last changesets, the project is getting some love again! Some of the blocks are now compatible with EntLib5 : Common, VAB, EHAB, Logging and PIAB (...Query is next, then Data, then Resource). Please find the new code under the "Source Code" section. An official package will be made available for download when the entire stack will be ported.

Regards,

Jeremi

wrote Oct 5, 2011 at 12:47 AM

Associated with changeset 63344.

wrote Oct 5, 2011 at 12:59 AM

Resolved with changeset 63345.

jbourgault wrote Oct 5, 2011 at 1:03 AM

** Closed by jbourgault 2011-10-04 17:59

jbourgault wrote Oct 5, 2011 at 1:03 AM

Closed accidently after associating a changeset to it.

wrote Oct 5, 2011 at 1:03 AM

Associated with changeset 63346.

wrote Oct 5, 2011 at 1:29 AM

Associated with changeset 63347.

wrote Oct 5, 2011 at 6:34 AM

Associated with changeset 63348.

wrote Oct 5, 2011 at 6:42 AM

Associated with changeset 63349.

wrote Oct 19, 2011 at 2:47 AM

Associated with changeset 63497.

wrote Oct 19, 2011 at 2:57 AM

Associated with changeset 63499.

wrote Oct 19, 2011 at 5:29 AM

Associated with changeset 63500.

wrote Oct 19, 2011 at 5:33 AM

Associated with changeset 63501.

wrote Oct 23, 2011 at 4:01 AM

Associated with changeset 63536.