stopping app_offline.htm from being created and deleted at each build?

后端 未结 7 706
臣服心动
臣服心动 2021-01-12 07:15

I have a solution with 2 projects in Visual Studio 2008 SP1, .NET Framework 3.5 SP1.

  • a ASP Web site.
  • a Class Library (dll) project.

I h

相关标签:
7条回答
  • 2021-01-12 08:00

    This file does not go into the Recycle Bin for me. Perhaps you have some draconian utilities installed, which do this? Many anti-virus tools and general system utility suites used to do this back in 2000 but I do not have experience with later versions.

    Update: You can use Process monitor to find out which process moves this file to the recycle bin.

    0 讨论(0)
  • 2021-01-12 08:03

    Use Web Application projects, not the Web Site templates, those are for 'dummies'. :)

    0 讨论(0)
  • 2021-01-12 08:03

    I had this problem because I published directly to Azure Web Service from the dev machine.

    The answer here with another possible workaround here.

    0 讨论(0)
  • 2021-01-12 08:08

    I started seeing the same problem shortly after we suffered a VSTS server problem. The VSTS server went down for a day so I had to open the solution in offline mode. After the VSTS server came back online, I had to reopen the solution under source control, and the app_offline.htm files start occurring non-stop every time I recompile my web projects.

    THIS IS REALLY ANNOYING!

    0 讨论(0)
  • 2021-01-12 08:12

    I am not sure how to stop it yet, but I know how to reliably recreate the problem on my environment:

    Windows XP Pro, VS2008, SourceGear (Source Control System).

    Whenever I perform a checkout, the app_offline.htm file is instantly created and deleted in/from the root folder. The source control system is using SQL Enterprise, so I am not sure it is related to some references from posts people are making about SQL Express.

    Again, still don't know how to stop it, but maybe this will help other figure out how/when the file is generated and deleted.

    0 讨论(0)
  • 2021-01-12 08:13

    [Disclaimer: I'm adding an answer firstly because I hope it will get the question seen by more people (I admit it) and secondly because I have no characters limit on an answer, as oposed to a comment.]

    I followed Sander's suggestion and used Process Monitor to track which process moves this file to the Recycle Bin.

    It was indeed devenv.exe.

    There are several events where it makes operations like: QueryDirectory, QueryOpen, CreateFile and CloseFile. And devenv.exe is the only process that has anything to do with app_offline.htm

    Still... How could I make Visual Studio stop filing up my Recycle Bin? (way to go, Dan, putting a question in the 'answer' (: )

    0 讨论(0)
提交回复
热议问题