Thursday, April 28, 2011

Adding a post-build event to a web site in Visual Studio 2008

I am using a "web site" in visual studio 2008, and i would like to add a post-build event which would append the build time to the web.config file. Is it possible?

From stackoverflow
  • Doesn't seem like it. Is there any specific reason to use a web site instead of a web application?

    Pasha : There's no reason for me not to use the application, a web site seemed like a good idea at a time, and i didn't know the difference between the two.
  • I'm afraid this isn't supported for web sites, you'll need to use a web application project. See this MSDN article for a comparison of the two project types.

    Pasha : Thanks, i'll review the differences, and see if there's a way to switch from a website to a project.
  • One of the major benefits of going the WAP (Web Application Projects) route rather than WSP (Website Projects) is that you get the ability to have Post Build events.

    Therefore, it is not possible out of the box anyway. Here is the detail.

  • http://support.microsoft.com/kb/810230

0 comments:

Post a Comment