Tempory ASP.NET Files Folder. Learn to love it.

Posted Wednesday, November 9, 2005 9:14 AM by C-Dog's .NET Tip of the Day
The Temporary ASP.NET Files folder (located at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\) is effectively an assembly cache for things that you compile.  When using dynamic compilation (or any time you are debugging through Visual Studio), it is here where those temporary assemblies get stored.
 
The problem is after you start compiling a bunch and you make a bunch of changes, you may find that your site was building successfully a few minutes ago and now you are getting some random error mentioning a DLL in the Temporary ASP.NET files folder.  Once you get this error, there is nothing you can do in Visual Studio to fix it.
 
Here is what you have to do.
  1. Close Visual Studio 2005.
  2. Kill the ASP.NET worker process aspnet_wp.exe.
  3. Go to the Temporary ASP.NET Files folder and delete everything inside it.
  4. Restart Visual Studio 2005.
  5. Build the Web Site.

The first two steps are required because usually at least one of those DLLs is in memory and can't be deleted.  Hopefully, this will help you with this issue when it comes up for you.

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=23