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

Jon in Chicago, July 2008

I'm Jon Hartmann and I'm a C# .Net developer by day, a ColdFusion guru by night, and all around Javascript fanatic. Stay right here to read my technical posts as I grapple with mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web. Learn more about me.

Post a job. Find one. authenticjobs.com

Interested in becoming a sponsor? Contact me.