Clear conflicting class files from temporary ASP.NET files

Conflicts class file in C: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET files \ prevent me from creating a solution. Despite the fact that I try to unload the folder, every time Visual Studio starts the build process, it brings the class file to a temporary folder with the same folder name. If I reboot the machine or leave it overnight, create a project without errors. Is there anyway to tell Visual Studio to delete / ignore / clear any lingering class files that might be in the temporary folder?

The clean solution in VS also does not work. The class file in conflict is located in the App_Code folder.

+4
source share
6 answers

Adding this as an answer here: move the temporary space location for easier cleaning or pre-build event

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

The source was the SO response, which leads to the following: http://blog.cwa.me.uk/2007/10/15/relocating-temporary-aspnet-files/

+10
source

Clean, close all instances of VS, delete temporary files, empty trash, throw a pinch of salt on the left shoulder. run VS and rebuild everything.

works for me in odd moments when this happens

+5
source

Make sure that you did not compile the DLL file and did not compile an equal class in the project.

0
source

Use the pre-build operation in the project to make sure the folder is clean, perhaps IIS will automatically compile your application before serving it.

0
source

I think you have two class names that are the same: one in your APP_Code and the other as the name of a user control or page.

0
source

I encountered a similar problem in my project. The files came up against facts related to files with the same name from the current project and with another project. I resolved this by deleting the files from my project bin directory, which I do not need. (However, if the problem persists, delete the unnecessary files and temporary files from the Debug and Release folders.). This worked 100% in my case.

0
source

Source: https://habr.com/ru/post/1307598/


All Articles