Correctly deploying Application with Telerik components

I have following project structure:

  • ClassLibrary
    • References Telerik Controls
  • Host Application
    • References ClassLibrary

The class library is having several usercontrols which has telerik components in it. And I have a host application, which hosts these user controls from Class Library.

Now the problem is, despite of reference to telerik dlls in library, I still have to reference telerik dlls in my host application. Or else it throws XamlParseException during runtime. It compiles without error though.

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

Additional information: Could not load file or assembly 'Telerik.Windows.Controls.GridView, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.

Why is this happening ? Why is there need of duplicating the dlls.

I am using Telerik dll with version 2015.2.623.45


To reproduce this issue: We can just create a library with one usercontrol

<UserControl>
       <Grid>
          <telerik:RadGridView></telerik:RadGridView>  
       </Grid>
 </UserControl>

And then create another project which references this class library

<Window>
    <Grid>
        <wpfApplication1:UserControl1/>
    </Grid>
</Window>

And try to run it.

(I have omitted xmlns definitions for brevity)



Read more here: https://stackoverflow.com/questions/33376573/correctly-deploying-application-with-telerik-components

Content Attribution

This content was originally published by Marshal at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: