GetSelectListItems does not have an implementation

Vote:
 

Hi,

I am setting up our EPiServer CMS 6 R2 web site on my Windows 7 (x64) OS, having copied the code from TFS that was developed on 32 bit Windows 2008 Server, and also switching from VS2010 to VS2012. Compiling the project goes well, but when I try to load the web I get this message:

Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present - inspect with debugger for complete view. Check assemblies [xxx.yyy.Web, Version=1.0.4786.21452, Culture=neutral, PublicKeyToken=null] and/or types [xxx.yyy.Web.ControlAdapters.XFormStatisticsAdapter, xxx.yyy.Web.Core.ClientPersistence.Client, xxx.yyy.Web.Core.ClientPersistence.Client+InvoiceType, xxx.yyy.Web.Core.ClientPersistence.Client+ClientAddress, xxx.yyy.Web.Core.ClientPersistence.Client+AddressType, xxx.yyy.Web.Core.Logging.DbLogger, xxx.yyy.Web.Core.Logging.OrderLogger, xxx.yyy.Web.Core.Order.ProcessOrder, xxx.yyy.Web.Core.Order.HistoricalProduct, xxx.yyy.Web.Core.Order.HistoricalProductList, xxx.yyy.Web.CustomAttributes.PropertyDropDownListSettingsAttribute, xxx.yyy.Web.CustomProperties.ProductMapper, xxx.yyy.Web.CustomProperties.ProductMapper+ProductMapperPropertyType, xxx.yyy.Web.CustomProperties.PropertyCategorySubtree, xxx.yyy.Web.CustomProperties.SettingsUICategorySubtree, xxx.yyy.Web.CustomProperties.CategorySubtreeSettings, xxx.yyy.Web.CustomProperties.PropertySideBarSelector, xxx.yyy.Web.CustomProperties.PropertySideBarSelector+PropertySideBarSelectorPropertyType, xxx.yyy.Web.CustomProperties.SlideshowColorPicker]. Information from LoaderExceptions property [Method 'GetSelectListItems' in type 'xxx.yyy.Web.Personalization.VisitorGroups.BuyThroughProduct.BuyThroughProductSelectionFactory' from assembly 'xxx.yyy.Web, Version=1.0.4786.21452, Culture=neutral, PublicKeyToken=null' does not have an implementation., Method 'GetSelectListItems' in type 'xxx.yyy.Web.Personalization.VisitorGroups.BuyThroughProduct.BuyThroughStatusSelectionFactory' from assembly 'xxx.yyy.Web, Version=1.0.4786.21452, Culture=neutral, PublicKeyToken=null' does not have an implementation., Method 'GetSelectListItems' in type 'xxx.yyy.Web.Personalization.VisitorGroups.CustomerDb.PropertySelectionFactory' from assembly 'xxx.yyy.Web, Version=1.0.4786.21452, Culture=neutral, PublicKeyToken=null' does not have an implementation., Method 'GetSelectListItems' in type 'xxx.yyy.Web.Personalization.VisitorGroups.Product.ProductSelectionFactory' from assembly 'xxx.yyy.Web, Version=1.0.4786.21452, Culture=neutral, PublicKeyToken=null' does not have an implementation., Method 'GetSelectListItems' in type 'xxx.yyy.Web.Personalization.VisitorGroups.QueryString.QueryStringSelectionFactory' from assembly 'xxx.yyy.Web, Version=1.0.4786.21452, Culture=neutral, PublicKeyToken=null' does not have an implementation.].

I found someone having the same problem on the EPiServer forums, where the soultion was to uninstall MVC 3, but that solution does not work for me. I have uninstalled first MVC 3 and then MVC 2, testing between uninstalls.

Any suggestions on how to fix this?

Are there any differences for the x64 architecture or for VS 2012 in the web.config file(s), for instance? I copied those from the old install.

#65768
Feb 08, 2013 7:52
Vote:
 

Ok, so we were able to find a solution. This was not related to EPiServer at all.

The project had a reference to System.Web.Mvc.
When you install VS 2012, MVC 4 is installed in the GAC.
The project was referencing an old version of MVC (v2) that was also in the GAC of the old dev machines.
VS was able to build even if it was resolving the wrong version of MVC, but in runtime it crashed.

The solution was to reference System.Web.Mvc version 2 directly/explicitly, not through GAC.

Hope this info can help someone else. :)

 

#65771
Feb 08, 2013 10:32
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.