Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 4.09 KB

common-bc30002-error-telerik-ui-aspnet-ajax.md

File metadata and controls

75 lines (55 loc) · 4.09 KB
title type page_title slug tags res_type ticketid
A guide on fixing the BC30002 The type Global.Telerik.Web.UI.RadGrid is not defined error
troubleshooting
Fix 'Type RadGrid Not Defined' Error in ASP.NET Web Forms Projects
common-bc30002-error-telerik-ui-aspnet-ajax
radgrid
asp.net ajax
error bc30002
migration
visual studio
kb
1659393

Environment

Product Telerik UI for ASP.NET AJAX / RadGrid
Version all

Description

I am getting a compilation error "BC30002: The type 'Global.Telerik.Web.UI.RadGrid' is not defined" in Visual Studio. This issue persists despite removing all references to old DLLs, cleaning, and recompiling the project.

Cause

This error may arise upon migration from RadControls for ASP.NET (Classic) to Telerik UI for ASP.NET AJAX due to improper assembly references, outdated entries in the web.config file, or issues related to the licenses.licx file.

Solution

Follow these steps to resolve the error:

  • Ensure Correct Assembly Reference: Update the Telerik.Web.UI assembly reference in your project. Remove the existing reference and re-add it, ensuring it points to the new DLL file. Reference update instructions can be found here.

  • Web.config Update: Ensure your web.config file's assembly version matches the version of the Telerik UI for ASP.NET AJAX DLLs you're using. Include an assembly binding redirect like the following:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2024.2.513.462" newVersion="2024.2.513.462" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
  • Delete the licenses.licx File Contents: Clear the contents of the licenses.licx file as described in the How To Fix License File Related Errors article.

  • Update Control Registered Directive: If not using the Global Assembly Cache, update or remove fully qualified names from the control registered directive. For global access in all project pages, add the following to your web.config:

<system.web>
  <compilation debug="true" targetFramework="4.8" />
  <httpRuntime targetFramework="4.8" />
  <pages>
    <controls>
      <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
    </controls>
  </pages>
</system.web>

Additionally, check out this forum thread and the official Microsoft article for more information on the error.

If the issue persists after following these steps, please share any additional error messages or project configuration details for further assistance.

See Also