views:

210

answers:

4

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.

A: 

Check that you have not compiled DLL file and not compiled equal class in a project.

Anton
A: 

Use a pre-build operation on the project to make sure the folder is cleared, it's possibly IIS auto-compiling your app before serving it.

Aren
How do you setup pre-build operations to clean these folders?Thanks
Deepfreezed
A: 

I think it's that you have two class names that are the same: One in your APP_Code and another class as the name of a user control or page.

Kant
This was correct the first time I tried to compile. But then I deleted the conflicting class but the problem did not go away.
Deepfreezed
A: 

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

Sky Sanders
Yep, it is very frustrating.
Deepfreezed