Wednesday, September 30, 2015

VS 2013 - “The breakpoint will not currently be hit. The source code is different from the original version.”

If you are getting the next error:


This generally occurs when the dll and the dll source code are different or if the .pdb file information is not matching.

A quick solution is:

  • Delete the /bin folder 
  • Delete the /obj folder
  • Recompile the project

Friday, September 18, 2015

Could not load file or assembly 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

If you are getting the next error when deploying your web application:

Could not load file or assembly 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.


or the next error:

Could not load file or assembly 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.


or this one:

Could not load file or assembly 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.


Or maybe other files, the reason is the .dll is missing in the published site.
To solve the problem in visual studio:

  • Expand the References folder
  • Click on the file missing
  • On the properties section go to the Copy Local option
  • Change the value from False to True

This should fix the problem.

Thursday, September 17, 2015

Uncaught TypeError: $(...).datepicker is not a function

If you get the errior:

          Uncaught TypeError: $(...).datepicker is not a function

The most common reason is a duplicate reference to a JQuery file:

  • Verify you don't have different versions of JQuery in the same page
  • If developing MVC, check your BundleConfig and the web page