I’m deploying my website on the server.
My website is done using asp.net c# 4 and EF 4.
I receive this error:
Could not load file or assembly ‘AjaxControlToolkit’ or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Any idea how could I fix it?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
It looks like you’re trying to run it on a version of ASP.NET which is running CLR v2. It’s hard to know exactly what’s going on without more information about how you’ve deployed it, what version of IIS you’re running etc (and to be frank I wouldn’t be very much help at that point anyway, though others would). But basically, check your IIS and ASP.NET set-up, and make sure that everything is running v4. Check your application pool configuration, etc.
Method 2
check below link in which you can download suitable AjaxControlToolkit which suits your .NET version.
http://ajaxcontroltoolkit.codeplex.com/releases/view/43475
AjaxControlToolkit.Binary.NET4.zip – used for .NET 4.0
AjaxControlToolkit.Binary.NET35.zip – used for .NET 3.5
Method 3
Just Add AjaxControlToolkit.dll to your Reference folder.
On your Project Solution, Right Click on Reference Folder > Add Reference > browse AjaxControlToolkit.dll.
Then build.
Method 4
Might sound obvious but do you definitely have AjaxControlToolkit.dll in your bin?
Method 5
If you are working with Source safe then make a new directory and take the latest there, this solved my issue…thanks
Method 6
Right click in Project / Clean
That always works for me
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0