Error when using with WCSF

Sep 11, 2007 at 4:08 AM
Hi

I am getting the following error when I am trying to use repository factory with WCSF, I have added config section to web.config and added generated DAL dll and Microsoft.Practices.Repository to web project,

ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark) +0
System.Reflection.Assembly.GetTypes() +86
Microsoft.Practices.CompositeWeb.Services.ModuleLoaderService.Load(ICompositionContainer compositionContainer, IModuleInfo[] modules) +476
Microsoft.Practices.CompositeWeb.WebClientApplication.LoadModules() +182
Microsoft.Practices.CompositeWeb.WebClientApplication.Application_Start(Object sender, EventArgs e) +126

Can anyone help me?

Thank you,

Surya
Sep 12, 2007 at 8:16 PM
I was rather foolish and installed the latest code drop for Repository factory yesterday, and I am now getting this exact same error.

The source for Repository Factory is using 3.0.0.0 versions of the EntLib dlls. Why?

/sigh
Sep 12, 2007 at 9:17 PM
Edited Sep 12, 2007 at 9:22 PM
Alright, I fixed it by doing the following:
  1. Uninstall the Repository Factory
  2. Repair the July CTP install of GAX (just to be safe, because I saw problems reported about a GAX dll being deleted when you uninstall Repository Factory)
  3. In the Lib folder for the Repository source
    • Replace Microsoft.Practices.EnterpriseLibrary.Common.dll (3.0) with the version that comes with WCSF (3.1)
    • Replace Microsoft.Practices.EnterpriseLibrary.Data.dll (3.0) with the version that comes with WCSF (3.1)
  1. Open and recompile the solution to build the Repository Factory msi installer
  2. Close VS and execute the Repository Factory msi installer
  3. Copy the Microsoft.Practices.Repository.dll from the bin folder of its generating project to the Library folder of my WCSF solution
  4. Open my WCSF solution and redo the reference to Microsoft.Practices.Repository.dll to be a browse reference to the Library folder
All works well now. Well, still need a couple ibuprofen to make my head work right, but... :)
Sep 12, 2007 at 9:19 PM
Edited Sep 12, 2007 at 9:25 PM
Actually, I forgot to mention that I had to rebuild my frakkin solution. After the above errors started happening, trying to close my solution would cause VS to hang at 90% CPU usage.

Started with a blank solution (generated a default WCSF solution, then removed all projects from it), copied that solution file into my WCSF solution folder, opened it, and added all folders and projects to it.
Sep 12, 2007 at 10:02 PM
Thank you, I will try this solution, anyone from Repository factory looking at this post and provide a solution?

Regards,

Surya
Sep 12, 2007 at 10:35 PM
Please grab the current source code checkin rather than the release. All these bugs (entlib versions, uninstalling GAX, etc.) have been fixed.