3

I am learning how to use the Ajax Control Toolkit using VB.NET in code-behind in Visual Studio 10.0.40219.1 SP1Rel, .NET 4.0.30319 SP1Rel. I have been to many websites and tried lots of code, using the AnimationExtender. The sample that came with the toolkit works perfectly, but on

http://localhost:1049/

which is different from my "view code in browser" url:

http://localhost:4258/

When I change the url to mine, I get this error:

Could not load file or assembly 'AjaxMin, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies. The system cannot find the file specified.

Nothing in the installation instructions mentions this. I can't run the page I'm using to learn how to use the AnimationExtender. I am at a loss, and I can't find anything like this on Google or here.

Thanks!

pixelmeow
  • 654
  • 1
  • 9
  • 31
  • Are you saying that you created your own project in Visual Studio trying to use the Ajax Control Toolkit and are seeing this error, or when you run the sample download with a different port number, you get this error? I assume you mean the former, correct? – Matt M Aug 20 '13 at 17:46
  • I opened the sample page (Animation.aspx) and selected View in Browser, which worked fine. I then changed the port (and path) to match my existing project. That threw the error. I tried to use bits in my existing page, in my existing project, and that threw the error. So I guess it's sorta both? – pixelmeow Aug 20 '13 at 18:07
  • I should probably say that my pages are using Master pages with two content placeholders each. I'm not using web.config for Ajax. – pixelmeow Aug 20 '13 at 18:14
  • Ok, so it's your project that has the error. The error suggests that your project does not contain the Ajax Control Toolkit dll. – Matt M Aug 20 '13 at 18:19
  • I don't understand how that could happen. I installed according to the instructions and am using the control tab... and what does Ajaxmin have to do with anything? *confused* – pixelmeow Aug 20 '13 at 18:25
  • Did you download the Toolkit via Codeplex, or get it via Nuget? Check the sample project and see if the AjaxMin.dll file is in there. If so, you should be able to simply add a reference from your project to that dll. – Matt M Aug 20 '13 at 18:38
  • AHA! Got the toolkit from CodePlex. Inside AjaxControlToolkit.Binary.NET40.zip is AjaxMin.dll and two other DLLs. Also a ReadMe, which doesn't mention ajaxmin. I unzipped the file into My Documents and had to have an admin move the toolkit dll to the VB bin (because our IT/OPS dept doesn't believe that we developers could possibly have a clue about what we're doing). Do you know of any references I should read about these other DLLs etc? – pixelmeow Aug 20 '13 at 18:46
  • At any rate, THANK YOU. – pixelmeow Aug 20 '13 at 19:20
  • Just glad I could help. You should answer your own question with how you solved your problem and accept it, so that it may help others in the future. – Matt M Aug 20 '13 at 19:30
  • I can't answer for 8 hours yet. But I will. :) – pixelmeow Aug 20 '13 at 19:39

2 Answers2

2

Matty's suggestion to check the sample project sent me back to the directory where I'd unzipped it, then checked the file AjaxControlToolkit.Binary.NET40.zip, which had the AjaxMin.dll file in it. I had admin move the file to C:\Program Files\Microsoft Visual Studio 10.0\VB\Bin (I don't know if that directory matters, it works for me), then in VS added the DLL as a reference to the project. The few errors I've gotten since are nothing to do with ajaxmin.

pixelmeow
  • 654
  • 1
  • 9
  • 31
2

I had the same problem, I had to copy the file AjaxMin.dll from where I extracted the AjaxControlToolkit.Binary.NET40.zip, to my project's bin folder. i.e. C:\Users\MyUserName\Documents\Visual Studio 2010\Projects\MyProject\MyProject\bin Rebuilt the solution and this time worked fine.. Hope that will help you :)

Hamad
  • 5,096
  • 13
  • 37
  • 65