views:

613

answers:

1

After a week of struggling I just got the msdeploy handler up on IIS7 (cursing the back-ass documentation thereof). So know I have a simple sync "working" but I'd like to move as much of the -sync parameters in a manifest rather than burying it in my MSBUILD task. Here is the deploy command line:

msdeploy.exe -verb:sync 
    -source:package="D:\Projects\Packaged.zip"
    -dest:iisApp="beta.mysite.com",
  wmsvc=ops.mysite.com,
  username=deployUser,
  password=secret,
  skipAppCreation=true 
    -allowUntrusted=true

I have found alot of examples of manifests that contain the iisApp path, but they usually move the other bits to a parameters file for (i'm guessing) user entry. Is there anything simple like this:

<!-- Pseudo-code manifest -->
<msdeploy.iisApp>
  <iisApp path="beta.mysite.com">
    <param key="wmsvc" value="ops.mysite.com"/>
    <param key="SkipAppCreation" value="true"/> 
    <param key="username" value="deployUser"/> 
    <param key="password" value="secret"/> 
  </iisApp> 
</msdeploy.iisApp>
+1  A: 

Not exactly the same scenario but might give some idea.
This is what we did trying to update our database with msdeploy.
First we created a manifest.xml where we tell msdeploy dbFullSql provider where to look for our sql scripts:

<sitemanifest>
  <dbfullsql path="test1.sql"/>
  <dbfullsql path="test2.sql"/>
  <dbfullsql path="test3.sql"/>
</sitemanifest>  

Then you need parameter.xml where you specify database connection string:

<parameters>
  <parameter
     name="ConnectionString"
     value="Data Source=localhost;uid=user;password=pass;multipleactiveresultsets=false;Initial Catalog=Db_name">
  <parameterEntry type="ProviderPath" scope="dbFullSql"/>
 </parameter>

Now we are ready to create a package with our manifest:

msdeploy.exe -verb:sync -source:manifest="manifest.xml" -dest:package="package.zip"

And finally deploy it:

msdeploy.exe -verb:sync -source:package="package.zip" -dest:auto -setParamFile="parameter.xml"

So you can see how you can keep your parameters in a separate file. Magic!

Liutauras
Thanks! I really appreciate your assistance! 8)