Dear Kentico supports,
I'm using Kentico version 12 for my project with default .Net framework 4.6.1.
Now, I tried to change to .Net framework 4.7 or higher because the 4.5.2, 4.6, 4.6.1 will reach End of Support on April 26, 2022.
Following the release note of Kentico 12 and solution from this article, I have success retarget to new framework version but I got this error when running CMS app. Images.
Log:
[InvalidOperationException: Additional assemblies have to be registered before application pre-initialization.]
CMS.Core.AssemblyDiscoveryHelper.RegisterAdditionalAssemblies(Assembly[] assemblies) +236
CMS.DataEngine.CMSHttpApplication.InitApplication(Assembly webProjectAssembly) +53
Global..cctor() +56
[TypeInitializationException: The type initializer for 'Global' threw an exception.]
Global..ctor() +0
ASP.global_asax..ctor() +42
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +142
System.Activator.CreateInstance(Type type, Boolean nonPublic) +107
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1476
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +80
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +182
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724
And on the presentation URL, all the scripts and css files cannot loading. Image.
I have checked in packages.config and web.config files and the target is already changed. Did I miss something?
Please help me as soon as available.
Best regards,
Chan Tran