Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For anyone using Web Application Projects in VS2010, I managed to get TeamCity to package the deliverables and then Web Deploy the package after successfully building the solution.<br> With a little tweaking, this had the same effect as hitting the 'Publish' button in VS.</p> <p>My solution has a handful of projects, 1 of which is an ASP.NET MVC Web Application project. I build the solution, package the web app project, and msdeploy the package in 3 steps. I haven't figured out a (better|shorter|simpler|more elegant) way to do this.</p> <p>I don't have VS installed on my TeamCity server, so I needed to grab both C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Web and C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Web Applications and put them both in the same spot on the TeamCity server (the second depends on the first). If you're working w/x64 machines, I'd grab them from both Program Files (x86) and Program Files. You also need to have Web Deploy installed on your machine and (I believe) IIS Management Service (i.e., something listening on <a href="https://yourservername:8172/MsDeploy.axd" rel="nofollow">https://yourservername:8172/MsDeploy.axd</a>)</p> <p>There are 3 build steps:</p> <ol> <li><strong>Visusal Studio (sln)</strong>, <strong>Target</strong>=Rebuild, <strong>Configuration</strong>=Debug</li> <li><strong>MSBuild</strong> WebProject.csproj, <strong>Targets</strong>=Package <strong>Commandline</strong>=/p:PackageLocation=%teamcity.build.checkoutDir%\Debug.zip /p:Configuration=Debug</li> <li><strong>Commandline</strong>, <strong>Executable</strong>=%teamcity.build.checkoutDir%\Debug.deploy.cmd, <strong>Parameters</strong>= /Y "-setParam:'IIS Web Application Name'='Default Web Site/PreCreatedAppInIis'"</li> </ol> <p>In that last step, 'IIS Web Application Name' is an actual parameter name, don't change it. It's value can either be something like 'Default Web Site' or whatever you named your website in IIS and/or it can be an IIS application path below it. If the application doesn't exist, you may run into errors about the app pool not being configured correctly to host the application. Rather than investigate it, I just created an application in the appropriate app pool. In my case, I'm targeting ASP.NET 4.0 x64 where the default app pool is ASP.NET 2.0 x64.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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