When in Doubt Clear Your Bin

This is a reminder to myself, and anyone facing down a weird error message when trying to build their ASP.NET application: you need to try clearing out your Bin folder and rebuilding it. I've 'fixed' probably a dozen build problems so far just by clearing out my Bin and rebuilding the application. To clear your Bin folder:

  1. Find your project file in Visual Studio and left click it.
  2. Go up to the icons in your Solution Explorer and click 'Show All Files'.
  3. Find your Bin folder in your project, and right click it.
  4. Click 'Open File in Windows Explorer'.
  5. Select everything in the folder (Ctrl + A) and delete it.
  6. Rebuild your application.

I've got no idea why there were errors with my applications, or why this fixed them, but its always a good first line of defense. If you've got an error message you can't figure out, clean out your bin.

 
Comments are not allowed for this entry.
Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me on LinkedIn.