Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I finally managed to get it to work after several days of struggle. It finally boils down to a MSBuild script, installing and configuring web deploy on the staging/test server and setting it up in Team City.</p> <p>It's a lot of steps and all can go wrong. I will investigate further and blog about it but this is my first attempt that works.</p> <p>I'm using this setup:</p> <ul> <li>.NET 4</li> <li>ASP.NET MVC 2</li> <li>TFS 2008</li> <li>Team City</li> <li>IIS7</li> <li>Web Deploy</li> </ul> <p>Here is the MSBuild script:</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;PropertyGroup&gt; &lt;Configuration&gt;Release&lt;/Configuration&gt; &lt;Platform&gt;AnyCPU&lt;/Platform&gt; &lt;/PropertyGroup&gt; &lt;Import Project="Webapplication.csproj" /&gt; &lt;Target Name='Deploy' DependsOnTargets='Build;Package' &gt; &lt;Exec Command='"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -source:contentpath="$(teamcity_build_checkoutDir)\Main\source\Webapplication\obj\Release\Package\PackageTmp\" -dest:contentpath="c:\inetpub\Webapplication\www",includeAcls=false,computername="https://(stagingserver-name):8172/msdeploy.axd?Site=Webapplication",authType=Basic,userName=(staginserver-name)\webdeploy,password=******** -allowUntrusted -verb:sync' /&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre> <p>Key points:</p> <ul> <li>I set up the Web.Release.config to work in the staging environment</li> <li>The build script must be located in the same directory as Webapplication.csproj</li> <li>Web deploy must be installed on the Team City server as well as on the web (staging) server</li> <li>c:\inetpub\Webapplication\www is a directory on the web server</li> <li>The webdeploy username is a local windows account on the web server with full access to c:\inetpub\Webapplication\www</li> </ul> <p>Preparations:</p> <ul> <li>I followed the steps at <a href="http://technet.microsoft.com/en-us/library/dd722796(WS.10).aspx" rel="noreferrer">http://technet.microsoft.com/en-us/library/dd722796(WS.10).aspx</a></li> <li>I followed part 1 at <a href="http://learn.iis.net/page.aspx/516/configure-the-web-deployment-handler/" rel="noreferrer">http://learn.iis.net/page.aspx/516/configure-the-web-deployment-handler/</a></li> <li>and created a contentPath rule for c:\inetpub\Webapplication\www and all users</li> </ul> <p>Team City:</p> <p>I set up a new build configuration using the MSBuild script above and set the target to Deploy</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload