Error: The type or namespace name 'Telerik' could not be found AND The website is already referencing the assembly 'Telerik.Web.UI'

1 Answer 5597 Views
Installer and VS Extensions
Nitin
Top achievements
Rank 1
Nitin asked on 22 Jul 2015, 10:52 AM

Hi,

I have downloaded and installed Trial version UI for ASP.NET AJAX. 

I have an ASP.Net website where I would like to integrate Telerik library.

But when I add reference to Telerik library from project's properties window, I got the error that "the website is already referencing the assembly 'Telerik.Web.UI'".
But I don't notice it anywhere in the installed references as you can verify by having look at attached screen shot.


Also, I am getting following kind of errors while building the website in "Output" Tab.


3>------ Rebuild All started: Project: Reports, Configuration: Release Any CPU ------
3>C:\Program Files\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1819,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Telerik.Reporting, Version=9.1.15.624, Culture=neutral, PublicKeyToken=a9d7983dfcc261be". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
3>C:\Users\TVESA\Documents\Visual Studio 2015\Projects\TISS_Projects\RTBWeb\RTBWebApp\Reports\rptEmptyReport.resx(122,5): error MSB3103: Invalid Resx file. Type Telerik.Reporting.Drawing.Unit, Telerik.Reporting, Version=9.1.15.624, Culture=neutral, PublicKeyToken=a9d7983dfcc261be in the data at line 120, position 4 cannot be located. Line 122, position 5.



Last, I am getting following kind of errors while building the website in "Error List" Tab.

Error    CS0246    The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?)    (See attached screen shot)

I already copied all the required DLL files from C:\Program Files\Telerik\UI for ASP.NET AJAX Q2 2015\Bin35\ to BIN folder of my website.


I am using MS Visual Studio 2015 RC Community Edition with .Net 3.5 and IIS Express 8.0

I am stuck with these errors and warnings so it would be appreciated if you can provide me some solution to get the rid of these errors.

1 Answer, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 22 Jul 2015, 03:49 PM
Hello Nitin,

Did you try to use the Telerik ASP.NET AJAX VS Extensions. To convert your project using the Telerik ASP.NET AJAX VS Extensions follow these steps:
  1. Select your web site project in Visual Studio Solution Explorer.
  2. In the Visual Studio menu select Telerik -> UI for ASP.NET AJAX -> Convert to Telerik Web Site
  3. Use the configuration wizard to convert your web site. You can find more information about Configure wizard options in our documentation at http://docs.telerik.com/devtools/aspnet-ajax/general-information/integration-with-visual-studio/visual-studio-extensions/creation-and-configuration-wizard.
If you still prefer to manually manage the Telerik resources in you project you can take a look at http://docs.telerik.com/devtools/aspnet-ajax/general-information/adding-the-telerik-controls-to-your-project.

Please let us know if this helps.

Regards,
Momchil
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Nitin
Top achievements
Rank 1
commented on 23 Jul 2015, 11:56 AM

Hi Momchil,

I have already taken step mentioned at below URL to make Telerik to work on my project.

http://docs.telerik.com/devtools/aspnet-ajax/general-information/adding-the-telerik-controls-to-your-project#add-a-telerik-control-manually-to-the-form

 

I have already copied all Telerik DLL files from C:\Program Files\Telerik\UI for ASP.NET AJAX Q2 2015\Bin35\ to
BIN folder of my website and referenced it.

 

And added following code to web.config file.

 

<pages><controls><add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" /></controls></pages> ​

 

But unfortunately, those steps did not help me to resolve the issue I am facing.

 

So would be please provide me some alternative solution?

 

Thanks,

Nitin.

Nitin
Top achievements
Rank 1
commented on 27 Jul 2015, 08:52 AM

Hi Momchil,

 

I have resolved all the errors mentioned in my above posts but now when I try to open index.aspx page, I am getting following errors:

 

So will you please assist me to resolve these errors as early as you can?

 

Server Error in '/' Application.

Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.] Telerik.Web.UI.ScriptEntry.GetSerializedAssemblyInfo() +163 Telerik.Web.UI.ScriptEntrySlot.SerializeScriptEntry(ScriptEntry scriptEntry) +45 Telerik.Web.UI.ScriptEntryUrlBuilder.TryAddScriptEntry(ScriptEntry scriptEntry) +30 Telerik.Web.UI.ScriptEntryUrlBuilder.RegisterScriptEntry(ScriptEntry scriptEntry) +167 Telerik.Web.UI.RadScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) +470 System.Web.UI.ScriptManager.RegisterScripts() +191 System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +113 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8790810 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1029
​

 

Below is the code from my web.config file from my project. Let me know if anything is mis-configured.

 

<?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
  </configSections>
  <appSettings>
    <add key="ApplicationADGroupName" value="ABCDEFG"/>
  </appSettings>
  <connectionStrings>
    <add name="connString" connectionString="connectionString will be placed here."/>
  </connectionStrings>
  <system.web>
    <customErrors mode="Off"/>
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Speech, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="Telerik.Reporting, Version=6.2.13.110, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
        <add assembly="Telerik.ReportViewer.WebForms, Version=6.2.13.110, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
        <add assembly="Telerik.Web.Design, Version=2015.2.623.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>
        <add assembly="Telerik.Web.Device.Detection, Version=2015.2.623.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>
        <add assembly="Telerik.Web.UI, Version=2015.2.623.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>
        <add assembly="Telerik.Web.UI.Skins, Version=2015.2.623.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>
      </assemblies>
    </compilation>
    <authentication mode="Windows"/>
    <identity impersonate="true"/>
    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
      </controls>
    </pages>
    <httpHandlers>
      <remove path="*.asmx" verb="*"/>
      <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      <add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler" validate="false"/>
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler" validate="false"/>
      <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler" validate="false"/>
      <add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler" validate="false"/>
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" validate="false"/>
      <add path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.2.13.110, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" validate="true"/>
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </httpModules>
  </system.web>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="WarnAsError" value="false"/>
      </compiler>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="OptionInfer" value="true"/>
        <providerOption name="WarnAsError" value="false"/>
      </compiler>
    </compilers>
  </system.codedom>
  <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
      <remove name="ScriptModule"/>
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated"/>
      <remove name="ScriptHandlerFactory"/>
      <remove name="ScriptHandlerFactoryAppServices"/>
      <remove name="ScriptResource"/>
      <remove name="ChartImage_axd"/>
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
      <remove name="Telerik_Web_UI_DialogHandler_aspx"/>
      <remove name="Telerik_RadUploadProgressHandler_ashx"/>
      <remove name="Telerik_Web_UI_WebResource_axd"/>
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
      <add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.2.13.110, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode"/>
    </handlers>
  </system.webServer>
  <runtime>
    <assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
​

 

Thanks,

Nitin.

Pavlina
Telerik team
commented on 28 Jul 2015, 11:55 AM

Hi,

I'm afraid I cannot reproduce the mentioned error locally. Please find a sample test page the latest dll assemblies included in the Bin folder and the web config declaration you provided. Please test the page and verify that no errors appeared. To be able to investigate the problem you are facing further, please modify the web site so that the issue can be observed and sent it back to us.

Looking forward to hearing from you.

Regards,
Pavlina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Magzhan
Top achievements
Rank 1
commented on 18 May 2016, 05:10 AM

Unknown build error, 'Could not load file or assembly'Telerik.OpenAccess, Version=2015.1.220.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of their dependencies. Can not find the file specified.
Tags
Installer and VS Extensions
Asked by
Nitin
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or