Arrya Regan
Arrya Regan

Reputation: 1114

Visual Studio Deletes Temporary ASP.NET Files during Build

I deal with a huge solution and a huge web project. Whenever I make a change to the Web project (not any of other library projects), refreshing the page would take sometimes 2 minutes or longer, with sometimes showing a Thread Abort Exception causing me to have to refresh the page again (so I can't even use this time to go to the bathroom or anything).

After some digging a coworker noticed that during our build some files in the Temporary ASP.NET Files folder were being deleted by Visual Studio, which is what caused our entire site to need to be rebuilt instead of just the single page I was working on.

He confirmed that this only happened when he build the Web project and only when there is at least one library project loaded as well.

Upvotes: 1

Views: 682

Answers (1)

Arrya Regan
Arrya Regan

Reputation: 1114

After some digging of my own, I noticed that when I changed to using IIS Express in the Web Settings of the Web Project, the temporary asp.net files folder wasn't being cleared, as we don't really want to use IIS Express to test our code I then changed the radio button to "Custom Web Server" adding in the same domain name as we used in the "Local IIS Web server" option. (See below)

Screenshot

After I did this and rebuilt the project, I noticed that the Temporary ASP.NET files were still not being deleted, and when I then went to the site and refreshed the page, it only took around 8 seconds for the site to come up.

Upvotes: 2

Related Questions