CS0234: The type or namespace name 'ExtendedControls' does not exist in the namespace 'CMS' (are you

MyPoint CreditUnion asked on December 17, 2021 05:28

I'm getting the following error after I upgraded from Kentico v9 to v10. What can I do to resolve?

Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0234: The type or namespace name 'ExtendedControls' does not exist in the namespace 'CMS' (are you missing an assembly reference?)

Source Error:

Line 5: using CMS; Line 6: using CMS.Base; Line 7: using CMS.ExtendedControls; Line 8: using CMS.Helpers; Line 9: using CMS.ProjectManagement;

Source File: e:\Website\CMS\App_Code\ProjectManagement\ProjectUniGridExtender.cs Line: 7

Correct Answer

MyPoint CreditUnion answered on December 17, 2021 18:41

I resolved the issue. There were two old v9 DLL files located in the Bin folder. After I deleted them the site came up.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on December 17, 2021 06:38

Hi!

Looking at the source of the error - it is coming from the 'ProjectManagement' - this feature has been already removed in Kentico 9. It looks like, you have recovered it, but in Kentico 10 it cannot be used anymore. So, the solution in this case is to remove the code files related to the Project management feature.

Moreover, the ExtendedControls namespace has been also removed and the controls and all the things were split into different namespaces, please see the API changes documentation. You can also find it in the Kentico 10 release notes in the API table almost at the bottom of the page.

0 votesVote for this answer Mark as a Correct answer

MyPoint CreditUnion answered on December 17, 2021 17:22

After removing the Project management code files I am now receiving a new error

Server Error in '/' Application.


Could not load file or assembly 'CMS.DataEngine, Version=9.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'CMS.DataEngine, Version=9.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 23: Line 24: // Initialize CMS application. This method should not be called from custom code. Line 25: InitApplication(); Line 26: } Line 27:

Source File: e:\Website\CMS\App_Code\Global.asax.cs Line: 25

Assembly Load Trace: The following information can be helpful to determine why the assembly 'CMS.DataEngine, Version=9.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileLoadException: Could not load file or assembly 'CMS.DataEngine, Version=9.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] System.ModuleHandle.ResolveMethod(RuntimeModule module, Int32 methodToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount) +0 System.ModuleHandle.ResolveMethodHandleInternalCore(RuntimeModule module, Int32 methodToken, IntPtr[] typeInstantiationContext, Int32 typeInstCount, IntPtr[] methodInstantiationContext, Int32 methodInstCount) +162 System.ModuleHandle.ResolveMethodHandleInternal(RuntimeModule module, Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +96 System.Reflection.CustomAttributeData..ctor(RuntimeModule scope, CustomAttributeRecord caRecord) +79 System.Reflection.CustomAttributeData.GetCustomAttributes(RuntimeModule module, Int32 tkTarget) +119 System.Reflection.CustomAttributeData.GetCustomAttributesInternal(RuntimeAssembly target) +83 CMS.Core.AssemblyDiscovery.IsAssemblyDiscoverable(Assembly assembly) +19 CMS.Core.AssemblyDiscovery.AddOnlyDiscoverableAssembly(ICollection1 assemblies, Dictionary2 preloadedAssemblies, AssemblyName assemblyName, String filePath) +72 CMS.Core.AssemblyDiscovery.ExecuteGetAssemblies(Boolean onlyDiscoverable) +1115 CMS.Core.AssemblyDiscovery.get_DiscoverableAssemblies() +31 CMS.Core.TypeManager.PreInitializeTypes() +168 CMS.Core.ModuleEntryManager.PreInit() +19 CMS.Core.AppCore.PreInit() +122 CMS.DataEngine.CMSApplication.PreInit() +136 CMS.DataEngine.CMSHttpApplication.InitApplication() +18 Global..cctor() in e:\iPoint\CMS\App_Code\Global.asax.cs:25

[TypeInitializationException: The type initializer for 'Global' threw an exception.] Global..ctor() +0 ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\16ca94ea\a2f4cafe\App_global.asax._qgndjq3.0.cs:0

[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) +82 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +174 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +347

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737

0 votesVote for this answer Mark as a Correct answer

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