Visual Studio 2008 Intellisense and Telerik.Charting

Posted by: the telerik blogs, on 29 Aug 2008 | View original | Bookmarked: 0 time(s)

By default the RadControls installer adds the Telerik.Charting assembly to the GAC on the machine where the package is installed, as the Telerik.Charting assembly is used by several packages - RadControls for ASP.NET AJAX, RadControls for Winforms, Telerik Reporting. So, let's consider an example -- create a new web site and use at least one control from the suite. When you drag a control from the toolbox Visual Studio will automatically copy Telerik.Web.UI.dll to site's Bin folder. Telerik.Web.UI assembly refers to Telerik.Charting assembly. But as long as Telerik.Charting is in the GAC it will not be copied to the Bin folder. Instead, it will be registered in the web.config file like this:

    <compilation>
      <assemblies>
        <add assembly="Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=D14F3DCC8E3E8763"/>

You are probably guessing the possible issue here -- upon XCOPY deployment there will be no Telerik.Charting.dll on the server, the Telerik.Charting reference is not resolved, so you get this:

Parser Error Message: Could not load file or assembly 'Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified.

At this time a question pops up - "What charting? I do not use any charts!" You can now remove the reference from web.config file or through the web site property pages and the problem is seemingly solved. Seemingly. You may lose the intellisense in the markup if for any reason you end up with no Telerik.Charting available - on the server or locally on your development machine. This issue seems to appear only in VisualStudio 2008. But, how to fix it? The answer is - always make sure that the referred assembly is provided. In our case - either remove the registration from web.config file as described above AND copy Telerik.Charting to the web site Bin folder or install Telerik.Charting to GAC (which might not be always possible). Note, that upgrading RadControls for ASP.NET AJAX to a newer version means that you need to replace both assemblies - Telerik.Web.UI and Telerik.Charting.

Finally, I have some inside info to share. Starting from Q3 2008, Telerik.Charting will be IL merged in Telerik.Web.UI, so you will never suffer such issues again. 

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2772 | Hits: 11

Similar Posts

  • Connecting to SQL Azure with Telerik OpenAccess more
  • Telerik OpenAccess WCF Wizard October CTP more
  • Binding Hierarchical RadGrid for ASP.NET Ajax with Telerik OpenAccess ORM more
  • "ADO.NET Entity data model" or "edmx" or "L2E" debug visualizer more
  • Debugger Visualizers not working in ASP.NET Medium Trust more
  • Telerik and Imaginet Resources Introduce Free Developer Team Management Tools Built with RadControls for WPF more
  • Multi-Targeting Support (VS 2010 and .NET 4 Series) more
  • Coded UI Tests with WebUI Test Studio Q2 2009 more
  • Telerik Introduces Free Web Testing Framework for ASP.NET AJAX and Silverlight more
  • Teleriks Q2 2009 Release Expands All-in-one .NET Offering more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD