Error using EntLib 3.0

May 2, 2007 at 9:56 PM
I've copied all the EntLib 3.0 assemblies to the Library folder and updated my web.config references to point to the 3.0.0.0 versions with the b03f5f7f11d50a3a public key token. I can open my web.config in the config tool with no issues. However, when I run my app I get the following error. I've updated my references in my shell module to point to the EL 3.0 assemblies. I have validated that all of the EL assemblies that are in the web site bin directory are EL 3.0. Is there something I have to do to get the CWAB to load the EL 3.0 assemblies?

Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Security, Version=2.0.1.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.Security, Version=2.0.1.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 44: protected virtual void AddGlobalServices(IServiceCollection globalServices)
Line 45: {
Line 46: globalServices.AddNew<EnterpriseLibraryAuthorizationService, IAuthorizationService>();
Line 47: _siteMapBuilderService = globalServices.AddNew<SiteMapBuilderService, ISiteMapBuilderService>();
Line 48: }





May 3, 2007 at 3:19 AM
Read this thread for more information: http://www.codeplex.com/websf/Thread/View.aspx?ThreadId=8931

WCSF v1.1 will support Ent Lib 3.0 as well as contain bug fixes. An actual release date hasn't been announced yet, however.

Best Regards,

Dave

____________________________

David Hayden
Microsoft MVP C#
May 3, 2007 at 3:52 AM
Thanks Dave. This got me thinking about whether or not I want to reference the strongly typed EL 3.0 assemblies or build my own via the EL source. At first I was thinking that I would just use the strongly typed assemblies becuase I doubt very much that I would go in and tweak the source, but I think this incident provides strong support for not using the strongly typed assemblies so if I had to build my own in the future for something similar to this I could do so without having to change all my public key references in my web.config.
May 4, 2007 at 12:55 AM
Hey Dave,

Do you happen to have a build that uses the EL 3.0 libraries that aren't strongly types?

Thanks,

Roy
May 4, 2007 at 7:45 AM
OK, I poked around with the WCSF source and built a version against EL 3.0 non-signed assemblies.

Now, if I could just get the templates to work ...