This is a migrated thread and some comments may be shown as answers.

Could not load file or assembly Telerik.Windows.Controls

2 Answers 821 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 23 Nov 2018, 08:22 PM

I'm getting this error in my code and I'm beyond frustrated

Could not load file or assembly 'Telerik.Windows.Controls, Culture=neutral' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

 

It started with a problem in my project where it wasn't running the same version of the code that I had, no idea why but at some point the project stopped building.  If I tried to place a breakpoint it wouldn't reach it saying code doesn't match.  My first step was to delete the bin\debug folder and rebuild: nothing, folder remains empty.  Research, try to figure out why.  Finally go into my project and see that my main project doesn't have a check next to the build column.  I check that and build and get a ton of errors because now it can't find the RadGlyph.  I do more research and most of the comments are about cleaning and rebuilding but that doesn't work.

 

I decide to unreference all my telerik DLLs and add in only the ones I need and make sure they are all the same version.  I finally get it to build and now my bin folder is filled with files.  I try to run my program and get the above issue.  I've checked all the forums, I've done a clean and rebuild multiple times, I checked my cproj file, here are my telerik versions

 

<Reference Include="Telerik.Windows.Controls, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Controls.Data, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Controls.GridView, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Controls.Input, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Data, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Themes.Office2013, Version=2018.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
      <HintPath>..\packages\Telerik.Windows.Themes.Office2013.for.Wpf.2018.3.1016\lib\net45\Telerik.Windows.Themes.Office2013.dll</HintPath>
    </Reference>

 

I even commented out the Office2013 theme, I figured the difference in version is because it's a theme but just in case I tried it with no luck. 

I'm at the end of my rope.  Any help would be appreciated.

2 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 26 Nov 2018, 06:56 PM
I'm able to get my project running by commenting out all my Telerik controls and removing all my telerik references so it is definitely Telerik that is causing this issue.  Since I've gotten no reply with ideas I guess I'll just start a new project to see if that fixes things.  I could probably get by without Telerik for the most part but I really need the Autocomplete box for my project.  I'll post back if a new project fixes this.
0
Martin Ivanov
Telerik team
answered on 28 Nov 2018, 10:39 AM
Hello Daniel,

It seems that the error is caused by difference in the version of the Telerik dlls. From the code snippet shown in your first reply (with the HintPaths) it seems that theme dll (Telerik.Windows.Themes.Office2013.dll) has a different version than the other dlls. Can you please make sure all the Telerik dlls are of the same version - for example 2018.3.911.45 - and see if the issue still persist?

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Daniel
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or