Try our conversational search powered by Generative AI!

PageController<T> issue in migration from CMS 11 to CMS 12

Vote:
 

Hi , 
I have upgraded the CMS 11 to CMS 12  getting below error. Not able to recognized how to fix this issue. 

Error : The type 'PageController<T>' exists in both 'EPiServer.Cms.AspNet, version = 11.17.0.0, culture=neutral, PublicKeyToken=8fe83dea738b45b7' and  'EPiServer.Cms.AspNetCore.Mvc, version = 12.4.0.0, culture=neutral, PublicKeyToken=8fe83dea738b45b7'

 public abstract class PageControllerBase<T> : PageController<T>, IModifyLayout
        where T : SitePage
    {
        public ActionResult GetViewVerifyingAge(T currentPage)
        {
            if (!PageEditing.PageIsInEditMode && !SessionHelper.IsAdult)
            {
                var redirectUrl = ContentHelper.GetAgeVerificationUrl(currentPage.ContentLink);
                if (redirectUrl != null)
                {
                    return new RedirectResult(redirectUrl);
                }
            }

            var model = ViewHelper.CreatePageViewModel(currentPage);
            return View(model);
        }

#293818
Dec 28, 2022 12:11
Vote:
 

Have you tried clearing the bin and obj directories? Try cleaning the solution and make clear you don't have any references to the old assemblies.

#293824
Dec 28, 2022 15:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.