Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clean conflicting class files from Temporary ASP.NET Files

Class file Conflicts in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ is preventing me from building the solution. Even though I try emptying out the folder, each time Visual Studio starts the build process, it brings in the class file in to the temp folder with the same folder name. If I restart the machine or leave it overnight, project build without error. Is there anyway to tell Visual studio to delete/ignore/clean any lingering class files that could be in the temp folder?

Clean solution option in VS doesn't work either. Class file in conflict are from the App_Code folder.

like image 953
Deepfreezed Avatar asked Apr 21 '10 21:04

Deepfreezed


People also ask

Is it safe to delete temporary ASP.NET files?

The temporary files generated by Visual Studio after creating and running an ASP.NET application reside in: %SYSTEMROOT%\Microsoft.NET\Framework[64]\<vernum>\Temporary ASP.NET Files folder. The folders and files under this folder can be removed with no harm to your development computer.


2 Answers

Adding this as an answer here directly: move the temp location for easier cleaning or a pre-build event

<system.web>

   <compilation tempDirectory="d:\TempASP.NETFiles\">

      ...

   </compilation>

</system.web>

Source was the SO answer, which lead to this: http://blog.cwa.me.uk/2007/10/15/relocating-temporary-aspnet-files/

like image 147
Maslow Avatar answered Sep 30 '22 06:09

Maslow


Clean, Close all instance of VS, delete the temp files, empty recycle bin, throw pinch of salt over left shoulder. start VS and rebuild all.

works for me at the odd times this happens

like image 33
Sky Sanders Avatar answered Sep 30 '22 07:09

Sky Sanders