Getting could not load file error after installing Kentico AMP nuget package into my solution

Navya Charitha asked on May 13, 2020 14:36

Hi, I have installed Kentico.AcceleratedMobilePages -Version 12 in Kentico 12 MVC 5 project. After rebuilding the solution I am getting the below error:

Could not load file or assembly 'CMS.Base.Web.UI, Version=12.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The system cannot find the file specified.

Stack Trace

[FileNotFoundException: Could not load file or assembly 'CMS.Base.Web.UI, Version=12.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The system cannot find the file specified.] System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) +0 System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs) +49 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +874 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +149 CMS.Core.TypeManager.PreInitializeTypes(Assembly assembly) +292 CMS.Core.TypeManager.PreInitializeTypes() +241 CMS.Core.ModuleEntryManager.PreInit() +26 CMS.Core.AppCore.PreInit() +133 CMS.DataEngine.CMSApplication.PreInit() in D:\CMS\MAIN\CMSSolution\DataEngine\Application\CMSApplication.cs:197 Kentico.Web.Mvc.ApplicationBootstrapper.Run() +57

[InvalidOperationException: The pre-application start initialization method Run on type Kentico.Web.Mvc.ApplicationBootstrapper threw an exception with the following error message: Could not load file or assembly 'CMS.Base.Web.UI, Version=12.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The system cannot find the file specified..] System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection1 methods, Func1 setHostingEnvironmentCultures) +890 System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +167 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +133 System.Web.Compilation.BuildManager.ExecutePreAppStart() +178 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +746

[HttpException (0x80004005): The pre-application start initialization method Run on type Kentico.Web.Mvc.ApplicationBootstrapper threw an exception with the following error message: Could not load file or assembly 'CMS.Base.Web.UI, Version=12.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The system cannot find the file specified..] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +

Please Help me with this.

Recent Answers


Brian McKeiver answered on May 16, 2020 18:11

If you are referring to this package https://www.nuget.org/packages/Kentico.AcceleratedMobilePages/ I believe it it only intended for Portal Engine (web forms) projects and not MVC projects. Especially since the GitHub project page mentions web forms as well. I have only used it on Portal projects as well.

0 votesVote for this answer Mark as a Correct answer

Navya Charitha answered on May 19, 2020 10:40

Is there no package available for MVC?

0 votesVote for this answer Mark as a Correct answer

Brian McKeiver answered on May 26, 2020 23:10

There is not.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.