Friday, April 15, 2011

publish a website using msbuild

How can I publish a web app using msbuild through the command line or insdie a batchfile??

From stackoverflow
  • What you're talking about is called a Web Deployment and you can find information about how to do that here:

    http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx

  • I wonder what exactly you're trying to do. Is it just xcopying your files over to the deployment server or does it also include setting up IIS?

    MSBuild has built in tasks for Copy and Building, but does not include IIS tasks. For that I would recommend finding a tasks library like the MSBuild extension pack or the MSBuild community tasks.

    http://www.codeplex.com/MSBuildExtensionPack/

    http://msbuildtasks.tigris.org/

    Gavin Miller : +1 - msbuildtasks is a great library and easy to use
  • If this is a web application project all you need to to is build the sln/project and then copy the published web site files to wherever

    If it is a web site then you can use the ASPNetCompiler task

    <AspNetCompiler
          Clean="true"
          Debug="true"
          VirtualPath="/"
          PhysicalPath="$(BuildDir)\"
          TargetPath="$(BuildDir)\Publish\"
          Updateable="true"
          FixedNames="true"
          Force="true" />
    
    salvationishere : Dean, how do I add a web app project to a website where web app is on same server as website and I'm not trying to do an automated deployment? Just a simple web hosting using IIS6 on a Windows XP system?

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.