Know if a Visual Studio Website project is recompiling itself in the background?
A开发者_StackOverflow社区 number of team members update a central ASP.NET dev Website project, not a Web application type). Some kinds of changes cause a recompile/rebuild in it. The large website takes a while to recompile and we've noticed it will still seemingly serve out dynamic pages before everything is internally updated.
During the site's "gestation" period, our mileage varies while hitting it. Sometimes we get a correct page, sometimes an compilation error page that will eventually be served up without a compilation error, and at other times an unexpected hybrid.
Is it possible to query an ASP.NET website application to see if it's currently compiling or rebuilding itself? If so I would write a status page that the team could reference when they're getting weird behaviour, so they would know to wait.
Update: Our team often edit files manually on the dev server. For production we'd make pre-compiled pushes. The dev environment is a little more malleable and ever-changing so I'm looking for a solution to reducing the "confusion" there.
I would recommend you to look into continuous integration for testing, there are several frameworks to do this depending on your SCM.
As for recompiling the application: It's well known that ASP.NET will recompile for changes to the following files:
web.config
global.asax
This counts also for the files that contain the classes that include the Global.asax inheritance class. In my case "App Code\Global.cs".
It recompiles the whole application by which files have changed, .aspx don't get recompiled the same as .cs or .vb, unless you have inline script. A change to a single partial will cause all files containing the class to be recompiled. This is another reason why it's a good idea to keep individual files limited to individual classes, and to use partials where appropriate.
Hope this helps.
精彩评论