<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Sayed Ibrahim Hashimi - MSBuild, Web Deploy (MSDeploy), ASP.NET - web</title>
    <link>http://sedodream.com/</link>
    <description>MSBuild, C#, Visual Studio and more</description>
    <language>en-us</language>
    <copyright>Sayed Ibrahim Hashimi</copyright>
    <lastBuildDate>Thu, 09 May 2013 05:33:20 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>sayed.hashimi@gmail.com</managingEditor>
    <webMaster>sayed.hashimi@gmail.com</webMaster>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=19245c5f-8119-45bf-be6e-acc60ea53ed8</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,19245c5f-8119-45bf-be6e-acc60ea53ed8.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,19245c5f-8119-45bf-be6e-acc60ea53ed8.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=19245c5f-8119-45bf-be6e-acc60ea53ed8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m happy to say that my <a href="http://www.amazon.com/gp/product/0735678162/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0735678162&amp;linkCode=as2&amp;tag=sedodream-20">Supplement
to Inside the Microsoft Build Engine</a> book (<em>co-author </em><a href="https://twitter.com/wbarthol"><em>William
Bartholomew</em></a>) has now been published. In fact it’s already in stock and ready
to be shipped by <a href="http://www.amazon.com/gp/product/0735678162/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0735678162&amp;linkCode=as2&amp;tag=sedodream-20">Amazon.com</a>. 
</p>
        <p>
This book is a small addition (<em>118 pages</em>) to the previous book, <a href="http://www.amazon.com/gp/product/0735645248/ref=as_li_ss_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0735645248&amp;linkCode=as2&amp;tag=sedodream-20">Inside
the Microsoft Build Engine 2nd edition</a>. It has a small price too, MSRP is $12.99
but it’s selling on Amazon.com for $8.99! In this book we cover the updates to MSBuild,
Team Build and Web Publishing in Visual Studio 2012. The foreword was written by <a href="http://www.hanselman.com/">Scott
Hanselman</a>, and you can <a href="http://blogs.msdn.com/b/microsoft_press/archive/2013/05/02/scott-hanselman-ah-the-thankless-life-of-the-build-master.aspx">read
the entire foreword online</a>. 
</p>
        <p>
Check out how thin the supplement is in comparison to the 2<sup>nd</sup> edition <em>#ThinIsIn</em>.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/Book-publ_137D2/945231_10103483509401051_968543011_n_2.jpg">
            <img title="945231_10103483509401051_968543011_n" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="945231_10103483509401051_968543011_n" src="http://sedodream.com/content/binary/Windows-Live-Writer/Book-publ_137D2/945231_10103483509401051_968543011_n_thumb.jpg" width="274" height="484" />
          </a>
        </p>
        <p>
 
</p>
        <p>
If you already own the 2<sup>nd</sup> edition then you’ll love this update.
</p>
        <p>
 
</p>
        <h3>Table of Contents
</h3>
        <p>
Chapter 1: What's new in MSBuild
</p>
        <ol>
          <li>
Visual Studio project compatibility between 2010 and 2012 
</li>
          <li>
Out of Process Tasks 
</li>
          <li>
NuGet 
</li>
          <li>
XML Updates with SlowCheetah 
</li>
          <li>
Cookbook</li>
        </ol>
        <h5>Chapter 2: What's new in Team Build 2012
</h5>
        <ol>
          <li>
Installation 
</li>
          <li>
Team Foundation Service 
</li>
          <li>
User interface (UI) enhancements 
</li>
          <li>
Visual Studio Test Runner 
</li>
          <li>
Pausing build definitions 
</li>
          <li>
Batching 
</li>
          <li>
Logging 
</li>
          <li>
Windows Workflow Foundation 4.5 
</li>
          <li>
Cookbook</li>
        </ol>
        <h5>Chapter 3: What's new in Web Publishing
</h5>
        <ol>
          <li>
Overview of the new Publish Web Dialog 
</li>
          <li>
Building web packages 
</li>
          <li>
Publish profiles 
</li>
          <li>
Database publishing support 
</li>
          <li>
Profile-specific web.config transforms 
</li>
          <li>
Cookbook</li>
        </ol>
        <p>
 
</p>
        <p>
The book has been available in e-book form for a few weeks. Just long enough for us
to get our first review. It was 5 stars :).
</p>
        <p>
          <a href="http://www.amazon.com/review/RVXCZ4FAXMVE5/?_encoding=UTF8&amp;ASIN=B00CDXOWJW&amp;camp=1789&amp;creative=390957&amp;linkCode=ur2&amp;nodeID=&amp;tag=sedodream-20">
            <img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/Book-publ_137D2/image_3.png" width="644" height="254" />
          </a>
        </p>
        <p>
 
</p>
        <p>
Please let us know what you think of this book! 
</p>
        <p>
 
</p>
        <p>
You can download all the samples and learn more at <a href="http://msbuildbook.com/">msbuildbook.com</a>.
</p>
        <p>
 
</p>
        <p>
Sayed Ibrahim Hashimi | <a href="http://msbuildbook.com">http://msbuildbook.com</a> | <a href="https://twitter.com/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>Book published and now in stock!</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,19245c5f-8119-45bf-be6e-acc60ea53ed8.aspx</guid>
      <link>http://sedodream.com/2013/05/09/BookPublishedAndNowInStock.aspx</link>
      <pubDate>Thu, 09 May 2013 05:33:20 GMT</pubDate>
      <description>&lt;p&gt;
I’m happy to say that my &lt;a href="http://www.amazon.com/gp/product/0735678162/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0735678162&amp;amp;linkCode=as2&amp;amp;tag=sedodream-20"&gt;Supplement
to Inside the Microsoft Build Engine&lt;/a&gt; book (&lt;em&gt;co-author &lt;/em&gt;&lt;a href="https://twitter.com/wbarthol"&gt;&lt;em&gt;William
Bartholomew&lt;/em&gt;&lt;/a&gt;) has now been published. In fact it’s already in stock and ready
to be shipped by &lt;a href="http://www.amazon.com/gp/product/0735678162/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0735678162&amp;amp;linkCode=as2&amp;amp;tag=sedodream-20"&gt;Amazon.com&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
This book is a small addition (&lt;em&gt;118 pages&lt;/em&gt;) to the previous book, &lt;a href="http://www.amazon.com/gp/product/0735645248/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0735645248&amp;amp;linkCode=as2&amp;amp;tag=sedodream-20"&gt;Inside
the Microsoft Build Engine 2nd edition&lt;/a&gt;. It has a small price too, MSRP is $12.99
but it’s selling on Amazon.com for $8.99! In this book we cover the updates to MSBuild,
Team Build and Web Publishing in Visual Studio 2012. The foreword was written by &lt;a href="http://www.hanselman.com/"&gt;Scott
Hanselman&lt;/a&gt;, and you can &lt;a href="http://blogs.msdn.com/b/microsoft_press/archive/2013/05/02/scott-hanselman-ah-the-thankless-life-of-the-build-master.aspx"&gt;read
the entire foreword online&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
Check out how thin the supplement is in comparison to the 2&lt;sup&gt;nd&lt;/sup&gt; edition &lt;em&gt;#ThinIsIn&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/Book-publ_137D2/945231_10103483509401051_968543011_n_2.jpg"&gt;&lt;img title="945231_10103483509401051_968543011_n" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="945231_10103483509401051_968543011_n" src="http://sedodream.com/content/binary/Windows-Live-Writer/Book-publ_137D2/945231_10103483509401051_968543011_n_thumb.jpg" width="274" height="484"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
If you already own the 2&lt;sup&gt;nd&lt;/sup&gt; edition then you’ll love this update.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;h3&gt;Table of Contents
&lt;/h3&gt;
&lt;p&gt;
Chapter 1: What's new in MSBuild
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Visual Studio project compatibility between 2010 and 2012 
&lt;li&gt;
Out of Process Tasks 
&lt;li&gt;
NuGet 
&lt;li&gt;
XML Updates with SlowCheetah 
&lt;li&gt;
Cookbook&lt;/li&gt;
&lt;/ol&gt;
&lt;h5&gt;Chapter 2: What's new in Team Build 2012
&lt;/h5&gt;
&lt;ol&gt;
&lt;li&gt;
Installation 
&lt;li&gt;
Team Foundation Service 
&lt;li&gt;
User interface (UI) enhancements 
&lt;li&gt;
Visual Studio Test Runner 
&lt;li&gt;
Pausing build definitions 
&lt;li&gt;
Batching 
&lt;li&gt;
Logging 
&lt;li&gt;
Windows Workflow Foundation 4.5 
&lt;li&gt;
Cookbook&lt;/li&gt;
&lt;/ol&gt;
&lt;h5&gt;Chapter 3: What's new in Web Publishing
&lt;/h5&gt;
&lt;ol&gt;
&lt;li&gt;
Overview of the new Publish Web Dialog 
&lt;li&gt;
Building web packages 
&lt;li&gt;
Publish profiles 
&lt;li&gt;
Database publishing support 
&lt;li&gt;
Profile-specific web.config transforms 
&lt;li&gt;
Cookbook&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
The book has been available in e-book form for a few weeks. Just long enough for us
to get our first review. It was 5 stars :).
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.amazon.com/review/RVXCZ4FAXMVE5/?_encoding=UTF8&amp;amp;ASIN=B00CDXOWJW&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;linkCode=ur2&amp;amp;nodeID=&amp;amp;tag=sedodream-20"&gt;&lt;img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/Book-publ_137D2/image_3.png" width="644" height="254"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Please let us know what you think of this book! 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
You can download all the samples and learn more at &lt;a href="http://msbuildbook.com/"&gt;msbuildbook.com&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi | &lt;a href="http://msbuildbook.com"&gt;http://msbuildbook.com&lt;/a&gt; | &lt;a href="https://twitter.com/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,19245c5f-8119-45bf-be6e-acc60ea53ed8.aspx</comments>
      <category>MSBuild</category>
      <category>MSDeploy</category>
      <category>Team Build</category>
      <category>web</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=7d187729-cc9c-4654-8d15-a4bc4372f91d</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,7d187729-cc9c-4654-8d15-a4bc4372f91d.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,7d187729-cc9c-4654-8d15-a4bc4372f91d.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7d187729-cc9c-4654-8d15-a4bc4372f91d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today on twitter <a href="https://twitter.com/nunofcosta">@nunofcosta</a> asked me
roughly the question “<em>How do I publish one web project from a solution that contains
many?</em>”
</p>
        <p>
The issue that he is running into is that he is building from the command line and
passing the following properties to msbuild.exe.
</p>
        <pre class="brush: xml;">    /p:DeployOnBuild=true
    /p:PublishProfile='siteone - Web Deploy'
    /p:Password=%password%
</pre>
        <p>
You can read more about how to automate publishing at <a title="http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx" href="http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx">http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx</a>.
</p>
        <p>
When you pass these properties to msbuild.exe they are known as global properties.
These properties are difficult to override and are passed to every project that is
built. Because of this if you have a solution with multiple web projects, when each
web project is built it is passed in the same set of properties. Because of this when
each project is built the publish process for that project will start and it will
expect to find a file named <strong>siteone – Web Deploy.pubxml</strong> in the folder
Properties\PublishProfiles\. If the file doesn’t exist the operation may fail.
</p>
        <blockquote>
          <p>
            <em>Note: If you are interested in using this technique for an orchestrated publish
see my comments at </em>
            <a title="http://stackoverflow.com/a/14231729/105999" href="http://stackoverflow.com/a/14231729/105999">
              <em>http://stackoverflow.com/a/14231729/105999</em>
            </a>
            <em> before
doing so.</em>
          </p>
        </blockquote>
        <p>
So how can we resolve this? 
</p>
        <p>
Let’s take a look at a sample (see links below). I have a solution, <strong>PublishOnlyOne</strong>,
with the following projects.
</p>
        <ol>
          <li>
ProjA 
</li>
          <li>
ProjB</li>
        </ol>
        <p>
ProjA has a publish profile named ‘<strong>siteone – Web Deploy</strong>’, ProjB does
not. When trying to publish this you may try the following command line.
</p>
        <pre class="brush: xml;">    msbuild.exe PublishOnlyOne.sln /p:DeployOnBuild=true /p:PublishProfile=’siteone – Web Deploy’ /p:Password=%password%
</pre>
        <p>
          <em>See publish-sln.cmd in the samples.</em>
        </p>
        <p>
If you do this, when its time for ProjB to build it will fail because there’s no <strong>siteone
– Web Deploy</strong> profile for that project. Because of this, we cannot pass DeployOnBuild.
Instead here is what we need to do.
</p>
        <ol>
          <li>
Edit ProjA.csproj to define another property which will conditionally set DeployOnBuild 
</li>
          <li>
From the command line pass in that property</li>
        </ol>
        <p>
 
</p>
        <p>
I edited ProjA and added the following property group before the Import statements
in the .csproj file.
</p>
        <pre class="brush: xml;">&lt;PropertyGroup&gt;
  &lt;DeployOnBuild Condition=" '$(DeployProjA)'!='' "&gt;$(DeployProjA)&lt;/DeployOnBuild&gt;
&lt;/PropertyGroup&gt;
</pre>
        <p>
 
</p>
        <p>
Here you can see that DeployOnBuild is set to whatever value DeployProjA is as long
as it’s not empty. Now the revised command is:
</p>
        <pre class="brush: xml;">    msbuild.exe PublishOnlyOne.sln /p:DeployProjA=true /p:PublishProfile=’siteone – Web Deploy’ /p:Password=%password%
</pre>
        <p>
Here instead of passing DeployOnBuild, I pass in DeployProjA which will then set DeployOnBuild.
Since DeployOnBuild wasn’t passed to ProjB it will not attempt to publish.
</p>
        <p>
 
</p>
        <p>
You can find the complete sample at <a title="https://github.com/sayedihashimi/sayed-samples/tree/master/PublishOnlyOne" href="https://github.com/sayedihashimi/sayed-samples/tree/master/PublishOnlyOne">https://github.com/sayedihashimi/sayed-samples/tree/master/PublishOnlyOne</a>. 
</p>
        <p>
 
</p>
        <p>
Sayed Ibrahim Hashimi | <a href="https://twitter.com/sayedihashimi">@SayedIHashimi</a> | <a href="http://msbuildbook.com/">http://msbuildbook.com/</a></p>
      </body>
      <title>How to publish one web project from a solution</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,7d187729-cc9c-4654-8d15-a4bc4372f91d.aspx</guid>
      <link>http://sedodream.com/2013/03/06/HowToPublishOneWebProjectFromASolution.aspx</link>
      <pubDate>Wed, 06 Mar 2013 02:48:41 GMT</pubDate>
      <description>&lt;p&gt;
Today on twitter &lt;a href="https://twitter.com/nunofcosta"&gt;@nunofcosta&lt;/a&gt; asked me
roughly the question “&lt;em&gt;How do I publish one web project from a solution that contains
many?&lt;/em&gt;”
&lt;/p&gt;
&lt;p&gt;
The issue that he is running into is that he is building from the command line and
passing the following properties to msbuild.exe.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;    /p:DeployOnBuild=true
    /p:PublishProfile='siteone - Web Deploy'
    /p:Password=%password%
&lt;/pre&gt;
&lt;p&gt;
You can read more about how to automate publishing at &lt;a title="http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx" href="http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx"&gt;http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
When you pass these properties to msbuild.exe they are known as global properties.
These properties are difficult to override and are passed to every project that is
built. Because of this if you have a solution with multiple web projects, when each
web project is built it is passed in the same set of properties. Because of this when
each project is built the publish process for that project will start and it will
expect to find a file named &lt;strong&gt;siteone – Web Deploy.pubxml&lt;/strong&gt; in the folder
Properties\PublishProfiles\. If the file doesn’t exist the operation may fail.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;em&gt;Note: If you are interested in using this technique for an orchestrated publish
see my comments at &lt;/em&gt;&lt;a title="http://stackoverflow.com/a/14231729/105999" href="http://stackoverflow.com/a/14231729/105999"&gt;&lt;em&gt;http://stackoverflow.com/a/14231729/105999&lt;/em&gt;&lt;/a&gt;&lt;em&gt; before
doing so.&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
So how can we resolve this? 
&lt;/p&gt;
&lt;p&gt;
Let’s take a look at a sample (see links below). I have a solution, &lt;strong&gt;PublishOnlyOne&lt;/strong&gt;,
with the following projects.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
ProjA 
&lt;li&gt;
ProjB&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
ProjA has a publish profile named ‘&lt;strong&gt;siteone – Web Deploy&lt;/strong&gt;’, ProjB does
not. When trying to publish this you may try the following command line.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;    msbuild.exe PublishOnlyOne.sln /p:DeployOnBuild=true /p:PublishProfile=’siteone – Web Deploy’ /p:Password=%password%
&lt;/pre&gt;
&lt;p&gt;
&lt;em&gt;See publish-sln.cmd in the samples.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
If you do this, when its time for ProjB to build it will fail because there’s no &lt;strong&gt;siteone
– Web Deploy&lt;/strong&gt; profile for that project. Because of this, we cannot pass DeployOnBuild.
Instead here is what we need to do.
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Edit ProjA.csproj to define another property which will conditionally set DeployOnBuild 
&lt;li&gt;
From the command line pass in that property&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
I edited ProjA and added the following property group before the Import statements
in the .csproj file.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;PropertyGroup&amp;gt;
  &amp;lt;DeployOnBuild Condition=" '$(DeployProjA)'!='' "&amp;gt;$(DeployProjA)&amp;lt;/DeployOnBuild&amp;gt;
&amp;lt;/PropertyGroup&amp;gt;
&lt;/pre&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Here you can see that DeployOnBuild is set to whatever value DeployProjA is as long
as it’s not empty. Now the revised command is:
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;    msbuild.exe PublishOnlyOne.sln /p:DeployProjA=true /p:PublishProfile=’siteone – Web Deploy’ /p:Password=%password%
&lt;/pre&gt;
&lt;p&gt;
Here instead of passing DeployOnBuild, I pass in DeployProjA which will then set DeployOnBuild.
Since DeployOnBuild wasn’t passed to ProjB it will not attempt to publish.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
You can find the complete sample at &lt;a title="https://github.com/sayedihashimi/sayed-samples/tree/master/PublishOnlyOne" href="https://github.com/sayedihashimi/sayed-samples/tree/master/PublishOnlyOne"&gt;https://github.com/sayedihashimi/sayed-samples/tree/master/PublishOnlyOne&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi | &lt;a href="https://twitter.com/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt; | &lt;a href="http://msbuildbook.com/"&gt;http://msbuildbook.com/&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,7d187729-cc9c-4654-8d15-a4bc4372f91d.aspx</comments>
      <category>MSDeploy</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
      <category>Web Development</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=0ead210a-209b-4f45-9fac-3c55162b2e53</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,0ead210a-209b-4f45-9fac-3c55162b2e53.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,0ead210a-209b-4f45-9fac-3c55162b2e53.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0ead210a-209b-4f45-9fac-3c55162b2e53</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
With the release of VS2012 we have improved the command line publish experience. We’ve
also made all the web publish related features available for VS2010 users in the <a href="http://www.windowsazure.com/en-us/develop/net/">Azure
SDK</a>.
</p>
        <p>
The easies way to publish a project from the command line is to create a publish profile
in VS and then use that. To create a publish profile in Visual Studio right click
on the web project and select Publish. After that it will walk you though creating
a publish profile. VS Web publish profile support the following publish methods.
</p>
        <ul>
          <li>
            <strong>Web Deploy</strong> – The preferred method. You can publish to any host/server
which has <a href="http://www.iis.net/downloads/microsoft/web-deploy">Web Deploy</a> configured 
</li>
          <li>
            <strong>Web Deploy Package</strong>  - Used to create a package which can be
published offline at a later time 
</li>
          <li>
            <strong>File system</strong>  - Used to publish to a local/network folder 
</li>
          <li>
            <strong>FTP</strong>  - Used to publish to any FTP server 
</li>
          <li>
            <strong>FPSE</strong> – Used to publish to a server using Front Page Server Extensions</li>
        </ul>
        <p>
Command line publishing is only supported for Web Deploy, Web Deploy Package, and
File System. If you think we should support command line scenarios for other publish
methods the best thing to do would be to create a suggestion at <a title="http://aspnet.uservoice.com" href="http://aspnet.uservoice.com">http://aspnet.uservoice.com</a>.
If there is enough interest we may work on that support.
</p>
        <p>
Let’s first take a look at how you can publish a simple Web project from the command
line. I have created a simple Web Forms project and want to publish that. I’ve created
a profile named SayedProfile. In order to publish this project I will execute the
following command.
</p>
        <p>
msbuild MyProject.csproj /p:DeployOnBuild=true /p:PublishProfile=&lt;profile-name&gt;
/p:Password=&lt;insert-password&gt; /p:VisualStudioVersion=11.0
</p>
        <p>
In this command you can see that I have passed in these properties; 
</p>
        <ul>
          <li>
            <strong>DeployOnBuild</strong> – when true the build process will be extended to perform
a publish as well 
</li>
          <li>
            <strong>PublishProfile</strong>  - name of the publish profile (<em>you can also
provide a full path to a .pubxml file</em>) 
</li>
          <li>
            <strong>Password</strong> – Password value 
</li>
          <li>
            <strong>VisualStudioVersion</strong> – Special property see comments below</li>
        </ul>
        <p>
You may not have expected the VisualStudioVersion property here. This is a new property
which was introduced with VS 2012. It is related to how VS 2010 and VS 2012 are able
to share the same projects. Take a look at my previous blog post at <a title="http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx" href="http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx">http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx</a>. <strong><u>If
you are building the project file, instead of the solution file then you should always
set this property.</u></strong></p>
        <p>
If you are publishing using the .sln file you can omit the VisualStudioVersion property.
That property will be derived from the version of the solution file itself. Note that
there is one big difference when publishing using the project or solution file. When
you build an individual project the properties you pass in are given to that project
alone. When you build from the command line using the solution file, the properties
you have specified are passed to all the projects. So if you have multiple web projects
in the same solution it would attempt to publish each of the web projects.
</p>
        <p>
FYI in case you haven’t already heard I’m working on an update to my book. More info
at <a href="msbuildbook.com">msbuildbook.com</a></p>
        <p>
Sayed Ibrahim Hashimi | <a href="https://twitter.com/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>Command line web project publishing</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,0ead210a-209b-4f45-9fac-3c55162b2e53.aspx</guid>
      <link>http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx</link>
      <pubDate>Sun, 06 Jan 2013 02:56:37 GMT</pubDate>
      <description>&lt;p&gt;
With the release of VS2012 we have improved the command line publish experience. We’ve
also made all the web publish related features available for VS2010 users in the &lt;a href="http://www.windowsazure.com/en-us/develop/net/"&gt;Azure
SDK&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The easies way to publish a project from the command line is to create a publish profile
in VS and then use that. To create a publish profile in Visual Studio right click
on the web project and select Publish. After that it will walk you though creating
a publish profile. VS Web publish profile support the following publish methods.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web Deploy&lt;/strong&gt; – The preferred method. You can publish to any host/server
which has &lt;a href="http://www.iis.net/downloads/microsoft/web-deploy"&gt;Web Deploy&lt;/a&gt; configured 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Deploy Package&lt;/strong&gt;&amp;#160; - Used to create a package which can be
published offline at a later time 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File system&lt;/strong&gt;&amp;#160; - Used to publish to a local/network folder 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FTP&lt;/strong&gt;&amp;#160; - Used to publish to any FTP server 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FPSE&lt;/strong&gt; – Used to publish to a server using Front Page Server Extensions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Command line publishing is only supported for Web Deploy, Web Deploy Package, and
File System. If you think we should support command line scenarios for other publish
methods the best thing to do would be to create a suggestion at &lt;a title="http://aspnet.uservoice.com" href="http://aspnet.uservoice.com"&gt;http://aspnet.uservoice.com&lt;/a&gt;.
If there is enough interest we may work on that support.
&lt;/p&gt;
&lt;p&gt;
Let’s first take a look at how you can publish a simple Web project from the command
line. I have created a simple Web Forms project and want to publish that. I’ve created
a profile named SayedProfile. In order to publish this project I will execute the
following command.
&lt;/p&gt;
&lt;p&gt;
msbuild MyProject.csproj /p:DeployOnBuild=true /p:PublishProfile=&amp;lt;profile-name&amp;gt;
/p:Password=&amp;lt;insert-password&amp;gt; /p:VisualStudioVersion=11.0
&lt;/p&gt;
&lt;p&gt;
In this command you can see that I have passed in these properties; 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DeployOnBuild&lt;/strong&gt; – when true the build process will be extended to perform
a publish as well 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PublishProfile&lt;/strong&gt;&amp;#160; - name of the publish profile (&lt;em&gt;you can also
provide a full path to a .pubxml file&lt;/em&gt;) 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password&lt;/strong&gt; – Password value 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VisualStudioVersion&lt;/strong&gt; – Special property see comments below&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
You may not have expected the VisualStudioVersion property here. This is a new property
which was introduced with VS 2012. It is related to how VS 2010 and VS 2012 are able
to share the same projects. Take a look at my previous blog post at &lt;a title="http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx" href="http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx"&gt;http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx&lt;/a&gt;. &lt;strong&gt;&lt;u&gt;If
you are building the project file, instead of the solution file then you should always
set this property.&lt;/u&gt;&lt;/strong&gt; 
&lt;/p&gt;
&lt;p&gt;
If you are publishing using the .sln file you can omit the VisualStudioVersion property.
That property will be derived from the version of the solution file itself. Note that
there is one big difference when publishing using the project or solution file. When
you build an individual project the properties you pass in are given to that project
alone. When you build from the command line using the solution file, the properties
you have specified are passed to all the projects. So if you have multiple web projects
in the same solution it would attempt to publish each of the web projects.
&lt;/p&gt;
&lt;p&gt;
FYI in case you haven’t already heard I’m working on an update to my book. More info
at &lt;a href="msbuildbook.com"&gt;msbuildbook.com&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi | &lt;a href="https://twitter.com/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,0ead210a-209b-4f45-9fac-3c55162b2e53.aspx</comments>
      <category>MSBuild</category>
      <category>MSBuild 4.0</category>
      <category>MSDeploy</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=d611171d-d017-4d14-a131-9230df2d899a</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,d611171d-d017-4d14-a131-9230df2d899a.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,d611171d-d017-4d14-a131-9230df2d899a.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d611171d-d017-4d14-a131-9230df2d899a</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I saw the following question on StackOverflow <a href="http://stackoverflow.com/q/11885454/105999" target="_blank">MSDeploy
- Deploying Contents of a Folder to a Remote IIS Server</a> and decided to write this
post to answer the question.
</p>
        <p>
Web Deploy (aka MSDeploy) uses a provider model and there are a <a href="http://technet.microsoft.com/en-us/library/dd569040(v=ws.10)" target="_blank">good
number of providers</a> available out of the box. To give you an example of some of
the providers; when syncing an IIS web application you will use iisApp, for an MSDeploy
package you will use package, for a web server webServer, etc. If you want to sync
a local folder to a remote IIS path then you can use the <a href="http://technet.microsoft.com/en-us/library/dd569034(v=ws.10)" target="_blank">contentPath</a> provider.
You can also use this provider to sync a folder from one website to another website.
</p>
        <p>
The general idea of what we want to do in this case is to sync a folder from your
PC to your IIS website. Calls to msdeploy.exe can be a bit verbose so let’s construct
the command one step at at time. We will use the template below.
</p>
        <pre class="brush: xml;">msdeploy.exe -verb:sync -source:contentPath="" -dest:contentPath=""</pre>
        <p>
We use the sync verb to describe what we are trying to do, and then use the contentPath
provider for both the source and the dest. Now let’s fill in what those values should
be. For the source value you will need to pass in the full path to the folder that
you want to sync. In my case the files are at <em>C:\temp\files-to-pub</em>. For the
dest value you will give the path to the folder as an IIS path. In my case the website
that I’m syncing to is named <em>sayedupdemo</em> so the IIS path that I want to sync
is ‘sayedupdemo/files-to-pub’. Now that give us.
</p>
        <pre class="brush: xml;">msdeploy.exe –verb:sync -source:contentPath="C:\temp\files-to-pub" -dest:contentPath='sayedupdemo/files-to-pub'</pre>
        <p>
For the dest value we have not given any parameters indicating what server those command
are supposed to be sent to. We will need to add those parameters. The parameters which
typically need to be passed in are.
</p>
        <ul>
          <li>
ComputerName – this is the URL or computer name which will handle the publish operation 
</li>
          <li>
Username – the username 
</li>
          <li>
Password – the password 
</li>
          <li>
AuthType – the <a href="http://technet.microsoft.com/en-us/library/dd569001(v=WS.10).aspx" target="_blank">authType</a> to
be used. Either NTLM or Basic. For WMSvc this is typically Basic, for Remote Agent
Service this is NTLM</li>
        </ul>
        <p>
In my case I’m publishing to a <a href="https://www.windowsazure.com/en-us/home/features/web-sites/?WT.mc_id=cmp_pst001_blg_post0171web" target="_blank">Windows
Azure Web Site</a>. So the values that I will use are:
</p>
        <ul>
          <li>
ComputerName: <a title="https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo" href="https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo">https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo</a></li>
          <li>
Username: $sayedupdemo 
</li>
          <li>
Password: thisIsNotMyRealPassword 
</li>
          <li>
AuthType: Basic<!--EndFragment--></li>
        </ul>
        <p>
All of these values can be found in the .publishSettings file (<em>can be downloaded
from Web Site dashboard from WindowsAzure.com</em>). For the ComputerName value you
will need to append the name of your site to get the full URL. In the example above
I manually added <strong>?site=sayedupdemo</strong>, this is the same name as shown
in the Azure portal. So now the command which we have is.
</p>
        <pre class="brush: xml;">msdeploy.exe 
    –verb:sync 
    -source:contentPath="C:\temp\files-to-pub" 
    -dest:contentPath='sayedupdemo/files-to-pub'
            ,ComputerName="https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo"
            ,UserName='$sayedupdemo'
            ,Password='thisIsNotMyRealPassword'
            ,AuthType='Basic' </pre>
        <p>
OK we are almost there! In my case I want to make sure that I do not delete any files
from the server during this process. So I will also add <strong>–enableRule:DoNotDeleteRule</strong>.
So our command is now.
</p>
        <pre class="brush: xml;">msdeploy.exe 
    –verb:sync 
    -source:contentPath="C:\temp\files-to-pub" 
    -dest:contentPath='sayedupdemo/files-to-pub'
            ,ComputerName="https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo"
            ,UserName='$sayedupdemo'
            ,Password='thisIsNotMyRealPassword'
            ,AuthType='Basic' 
    -enableRule:DoNotDeleteRule </pre>
        <p>
At this point before I execute this command I’ll first execute it passing <strong>–whatif</strong>.
This will give me a summary of what operations will be without actually causing any
changes. When I do this the result is shown in the image below.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/MSDeploy-how-to-sync-a-folder_11057/SNAGHTML204f5cd.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML204f5cd" border="0" alt="SNAGHTML204f5cd" src="http://sedodream.com/content/binary/Windows-Live-Writer/MSDeploy-how-to-sync-a-folder_11057/SNAGHTML204f5cd_thumb.png" width="644" height="379" />
          </a>
        </p>
        <p>
After I verified that the changes are all intentional, I removed the <strong>–whatif</strong> and
executed the command. After that the local files were published to the remote server.
Now that I have synced the files each publish after this will be result in only changed
files being published. 
</p>
        <p>
If you want to learn how to snyc an individual file you can see my previous blog post <a href="http://sedodream.com/2012/01/08/HowToTakeYourWebAppOfflineDuringPublishing.aspx" target="_blank">How
to take your web app offline during publishing</a>.
</p>
        <h3>dest:auto
</h3>
        <p>
In the case of the question it was asked with dest:auto, you can use that but you
will have to pass in the IIS app name as a parameter and it will replace the path
to the folder. Below is the command. 
<br /></p>
        <pre class="brush: xml;">msdeploy.exe 
    -verb:sync
    -source:contentPath="C:\temp\files-to-pub" 
    -dest:auto
        ,ComputerName="https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo"
        ,UserName='$sayedupdemo'
        ,Password='thisIsNotMyRealPassword'
        ,AuthType='Basic' 
-enableRule:DoNotDeleteRule 
-setParam:value='sayedupdemo',kind=ProviderPath,scope=contentPath,match='^C:\\temp\\files-to-pub$'</pre>
        <p>
Thanks, 
<br />
Sayed Ibrahim Hashimi <a href="https://twitter.com/sayedihashimi" target="_blank">@SayedIHashimi</a></p>
      </body>
      <title>Web Deploy (MSDeploy) how to sync a folder</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,d611171d-d017-4d14-a131-9230df2d899a.aspx</guid>
      <link>http://sedodream.com/2012/08/20/WebDeployMSDeployHowToSyncAFolder.aspx</link>
      <pubDate>Mon, 20 Aug 2012 03:08:11 GMT</pubDate>
      <description>&lt;p&gt;
Today I saw the following question on StackOverflow &lt;a href="http://stackoverflow.com/q/11885454/105999" target="_blank"&gt;MSDeploy
- Deploying Contents of a Folder to a Remote IIS Server&lt;/a&gt; and decided to write this
post to answer the question.
&lt;/p&gt;
&lt;p&gt;
Web Deploy (aka MSDeploy) uses a provider model and there are a &lt;a href="http://technet.microsoft.com/en-us/library/dd569040(v=ws.10)" target="_blank"&gt;good
number of providers&lt;/a&gt; available out of the box. To give you an example of some of
the providers; when syncing an IIS web application you will use iisApp, for an MSDeploy
package you will use package, for a web server webServer, etc. If you want to sync
a local folder to a remote IIS path then you can use the &lt;a href="http://technet.microsoft.com/en-us/library/dd569034(v=ws.10)" target="_blank"&gt;contentPath&lt;/a&gt; provider.
You can also use this provider to sync a folder from one website to another website.
&lt;/p&gt;
&lt;p&gt;
The general idea of what we want to do in this case is to sync a folder from your
PC to your IIS website. Calls to msdeploy.exe can be a bit verbose so let’s construct
the command one step at at time. We will use the template below.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;msdeploy.exe -verb:sync -source:contentPath=&amp;quot;&amp;quot; -dest:contentPath=&amp;quot;&amp;quot;&lt;/pre&gt;
&lt;p&gt;
We use the sync verb to describe what we are trying to do, and then use the contentPath
provider for both the source and the dest. Now let’s fill in what those values should
be. For the source value you will need to pass in the full path to the folder that
you want to sync. In my case the files are at &lt;em&gt;C:\temp\files-to-pub&lt;/em&gt;. For the
dest value you will give the path to the folder as an IIS path. In my case the website
that I’m syncing to is named &lt;em&gt;sayedupdemo&lt;/em&gt; so the IIS path that I want to sync
is ‘sayedupdemo/files-to-pub’. Now that give us.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;msdeploy.exe –verb:sync -source:contentPath=&amp;quot;C:\temp\files-to-pub&amp;quot; -dest:contentPath='sayedupdemo/files-to-pub'&lt;/pre&gt;
&lt;p&gt;
For the dest value we have not given any parameters indicating what server those command
are supposed to be sent to. We will need to add those parameters. The parameters which
typically need to be passed in are.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
ComputerName – this is the URL or computer name which will handle the publish operation 
&lt;/li&gt;
&lt;li&gt;
Username – the username 
&lt;/li&gt;
&lt;li&gt;
Password – the password 
&lt;/li&gt;
&lt;li&gt;
AuthType – the &lt;a href="http://technet.microsoft.com/en-us/library/dd569001(v=WS.10).aspx" target="_blank"&gt;authType&lt;/a&gt; to
be used. Either NTLM or Basic. For WMSvc this is typically Basic, for Remote Agent
Service this is NTLM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In my case I’m publishing to a &lt;a href="https://www.windowsazure.com/en-us/home/features/web-sites/?WT.mc_id=cmp_pst001_blg_post0171web" target="_blank"&gt;Windows
Azure Web Site&lt;/a&gt;. So the values that I will use are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
ComputerName: &lt;a title="https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo" href="https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo"&gt;https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Username: $sayedupdemo 
&lt;/li&gt;
&lt;li&gt;
Password: thisIsNotMyRealPassword 
&lt;/li&gt;
&lt;li&gt;
AuthType: Basic&lt;!--EndFragment--&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
All of these values can be found in the .publishSettings file (&lt;em&gt;can be downloaded
from Web Site dashboard from WindowsAzure.com&lt;/em&gt;). For the ComputerName value you
will need to append the name of your site to get the full URL. In the example above
I manually added &lt;strong&gt;?site=sayedupdemo&lt;/strong&gt;, this is the same name as shown
in the Azure portal. So now the command which we have is.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;msdeploy.exe 
    –verb:sync 
    -source:contentPath=&amp;quot;C:\temp\files-to-pub&amp;quot; 
    -dest:contentPath='sayedupdemo/files-to-pub'
            ,ComputerName=&amp;quot;https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo&amp;quot;
            ,UserName='$sayedupdemo'
            ,Password='thisIsNotMyRealPassword'
            ,AuthType='Basic' &lt;/pre&gt;
&lt;p&gt;
OK we are almost there! In my case I want to make sure that I do not delete any files
from the server during this process. So I will also add &lt;strong&gt;–enableRule:DoNotDeleteRule&lt;/strong&gt;.
So our command is now.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;msdeploy.exe 
    –verb:sync 
    -source:contentPath=&amp;quot;C:\temp\files-to-pub&amp;quot; 
    -dest:contentPath='sayedupdemo/files-to-pub'
            ,ComputerName=&amp;quot;https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo&amp;quot;
            ,UserName='$sayedupdemo'
            ,Password='thisIsNotMyRealPassword'
            ,AuthType='Basic' 
    -enableRule:DoNotDeleteRule &lt;/pre&gt;
&lt;p&gt;
At this point before I execute this command I’ll first execute it passing &lt;strong&gt;–whatif&lt;/strong&gt;.
This will give me a summary of what operations will be without actually causing any
changes. When I do this the result is shown in the image below.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/MSDeploy-how-to-sync-a-folder_11057/SNAGHTML204f5cd.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML204f5cd" border="0" alt="SNAGHTML204f5cd" src="http://sedodream.com/content/binary/Windows-Live-Writer/MSDeploy-how-to-sync-a-folder_11057/SNAGHTML204f5cd_thumb.png" width="644" height="379" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
After I verified that the changes are all intentional, I removed the &lt;strong&gt;–whatif&lt;/strong&gt; and
executed the command. After that the local files were published to the remote server.
Now that I have synced the files each publish after this will be result in only changed
files being published. 
&lt;/p&gt;
&lt;p&gt;
If you want to learn how to snyc an individual file you can see my previous blog post &lt;a href="http://sedodream.com/2012/01/08/HowToTakeYourWebAppOfflineDuringPublishing.aspx" target="_blank"&gt;How
to take your web app offline during publishing&lt;/a&gt;.
&lt;/p&gt;
&lt;h3&gt;dest:auto
&lt;/h3&gt;
&lt;p&gt;
In the case of the question it was asked with dest:auto, you can use that but you
will have to pass in the IIS app name as a parameter and it will replace the path
to the folder. Below is the command. 
&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;msdeploy.exe 
    -verb:sync
    -source:contentPath=&amp;quot;C:\temp\files-to-pub&amp;quot; 
    -dest:auto
        ,ComputerName=&amp;quot;https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd?site=sayedupdemo&amp;quot;
        ,UserName='$sayedupdemo'
        ,Password='thisIsNotMyRealPassword'
        ,AuthType='Basic' 
-enableRule:DoNotDeleteRule 
-setParam:value='sayedupdemo',kind=ProviderPath,scope=contentPath,match='^C:\\temp\\files-to-pub$'&lt;/pre&gt;
&gt;
&lt;p&gt;
Thanks, 
&lt;br /&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/sayedihashimi" target="_blank"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,d611171d-d017-4d14-a131-9230df2d899a.aspx</comments>
      <category>MSDeploy</category>
      <category>Visual Studio</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=a5894bad-f2a1-441a-a5b2-74f16c6cf8aa</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,a5894bad-f2a1-441a-a5b2-74f16c6cf8aa.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,a5894bad-f2a1-441a-a5b2-74f16c6cf8aa.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a5894bad-f2a1-441a-a5b2-74f16c6cf8aa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the most requested features of Visual Studio 2012 was the ability to open projects
in both VS 2012 as well as VS 2010 (<em>requires VS 2010 SP1</em>). In case you haven’t
heard we did implement that feature. You may be wondering how we were able to do this
and how this may impact you.
</p>
        <p>
If you open the .csproj/.vbproj for a Web Project created in VS2010 you will see the
following import statement.
</p>
        <pre class="brush: xml;">&lt;Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\<br />
v10.0\WebApplications\Microsoft.WebApplication.targets" /&gt;</pre>
        <p>
When you open this project in VS 2012 there are a few changes made to your project
file to ensure that it can be opened in both VS 2010 SP1 and VS 2012. One of the changes
made to the project when it is first loaded in VS 2012 is to add the following to
replace that import statement.
</p>
        <pre class="brush: xml;">&lt;PropertyGroup&gt;
  &lt;VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''"&gt;10.0&lt;/VisualStudioVersion&gt;
  &lt;VSToolsPath Condition="'$(VSToolsPath)' == ''"&gt;
    $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)&lt;/VSToolsPath&gt;
&lt;/PropertyGroup&gt;
&lt;Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /&gt;</pre>
        <p>
We removed the hard-coded 10.0 and instead used the property <em>VisualStudioVersion</em>.
When building in Visual Studio 2012 this value will always be 11.0, but for VS 2010
it doesn’t exist. That is why we defaulted it to 10.0 above.
</p>
        <p>
There are some scenarios where building from the command line will require to set
this property explicitly. Before we get there let me explain how this property gets
set (<em>in this order</em>)
</p>
        <ol>
          <li>
If VisualStudioVersion is defined as an environment variable/global MSBuild property,
that is used.</li>
        </ol>
        <ul>
          <li>
            <em>This is how VS and the VS developer command prompt set this value</em>
          </li>
        </ul>
        <li>
Based on the file format version of the .sln file (toolset used is sln file format
–1)</li>
        <ul>
          <li>
            <em>To simplify this statement, the .sln file will build with specifying VisualStudioVersion
to the value of the version of VS which created the .sln file.</em>
          </li>
        </ul>
        <li>
Choose default</li>
        <ul>
          <li>
10.0 if VS 2010 is installed</li>
          <li>
Highest-versioned sub-toolset version installed</li>
        </ul>
        <p>
For #2 when you are building a .sln file the value of VisulStudioVersion will be –1
of the Format Version found in the .sln file. The important thing to note here is
that if you build a .sln file it will build with the value of VisulStudioVersion corresponding
to the version of VS which created the .sln file. So if you create a .sln file in
VS2012 and you always build that .sln file the value for VisualStudioVersion will
be 11.0. In many cases if you build the .sln file you are good. 
</p>
        <p>
If you are building .csproj/.vbproj files w/o going through a .sln file? If you build
a web project from the command line (<em>not the developer prompt</em>) then the value
for VisualStudioVersion used will be 10.0. That is an artifact of the properties which
I showed above. In this case you should pass this in as an MSBuild property. For example
</p>
        <pre class="brush: xml;">msbuild.exe MyAwesomeWeb.csproj /p:VisualStudioVersion=11.0</pre>
        <p>
In this case I’m passing in the property explicitly. This will always override any
other mechanism to determine the value for VisualStudioVersion. If you are using the <a href="http://msdn.microsoft.com/en-us/library/z7f65y0d.aspx">MSBuild
task</a> in a build script, then you can specify the property either in the Properties
attribute or the AdditionalProperties attribute. <em>See my previous </em><a href="http://sedodream.com/2009/04/29/MSBuildPropertiesAndAdditionalPropertiesKnownMetadata.aspx"><em>blog
post on the difference between Properties and AdditionalProperties</em></a><em>.</em></p>
        <p>
If you encounter any funny behavior when building/publishing and you notice that the
wrong .targets files are being imported then you may need to specify this property.
</p>
        <p>
Sayed Ibrahim Hashimi | <a href="https://twitter.com/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>Visual Studio project compatability and VisualStudioVersion</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,a5894bad-f2a1-441a-a5b2-74f16c6cf8aa.aspx</guid>
      <link>http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx</link>
      <pubDate>Sun, 19 Aug 2012 21:06:56 GMT</pubDate>
      <description>&lt;p&gt;
One of the most requested features of Visual Studio 2012 was the ability to open projects
in both VS 2012 as well as VS 2010 (&lt;em&gt;requires VS 2010 SP1&lt;/em&gt;). In case you haven’t
heard we did implement that feature. You may be wondering how we were able to do this
and how this may impact you.
&lt;/p&gt;
&lt;p&gt;
If you open the .csproj/.vbproj for a Web Project created in VS2010 you will see the
following import statement.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;Import Project=&amp;quot;$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\&lt;br /&gt;
v10.0\WebApplications\Microsoft.WebApplication.targets&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;
When you open this project in VS 2012 there are a few changes made to your project
file to ensure that it can be opened in both VS 2010 SP1 and VS 2012. One of the changes
made to the project when it is first loaded in VS 2012 is to add the following to
replace that import statement.
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;PropertyGroup&amp;gt;
  &amp;lt;VisualStudioVersion Condition=&amp;quot;'$(VisualStudioVersion)' == ''&amp;quot;&amp;gt;10.0&amp;lt;/VisualStudioVersion&amp;gt;
  &amp;lt;VSToolsPath Condition=&amp;quot;'$(VSToolsPath)' == ''&amp;quot;&amp;gt;
    $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)&amp;lt;/VSToolsPath&amp;gt;
&amp;lt;/PropertyGroup&amp;gt;
&amp;lt;Import Project=&amp;quot;$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets&amp;quot; Condition=&amp;quot;'$(VSToolsPath)' != ''&amp;quot; /&amp;gt;&lt;/pre&gt;
&lt;p&gt;
We removed the hard-coded 10.0 and instead used the property &lt;em&gt;VisualStudioVersion&lt;/em&gt;.
When building in Visual Studio 2012 this value will always be 11.0, but for VS 2010
it doesn’t exist. That is why we defaulted it to 10.0 above.
&lt;/p&gt;
&lt;p&gt;
There are some scenarios where building from the command line will require to set
this property explicitly. Before we get there let me explain how this property gets
set (&lt;em&gt;in this order&lt;/em&gt;)
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
If VisualStudioVersion is defined as an environment variable/global MSBuild property,
that is used.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;This is how VS and the VS developer command prompt set this value&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Based on the file format version of the .sln file (toolset used is sln file format
–1)&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;To simplify this statement, the .sln file will build with specifying VisualStudioVersion
to the value of the version of VS which created the .sln file.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
Choose default&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
10.0 if VS 2010 is installed&lt;/li&gt;
&lt;li&gt;
Highest-versioned sub-toolset version installed&lt;/li&gt;
&lt;/ul&gt;
&gt;
&lt;p&gt;
For #2 when you are building a .sln file the value of VisulStudioVersion will be –1
of the Format Version found in the .sln file. The important thing to note here is
that if you build a .sln file it will build with the value of VisulStudioVersion corresponding
to the version of VS which created the .sln file. So if you create a .sln file in
VS2012 and you always build that .sln file the value for VisualStudioVersion will
be 11.0. In many cases if you build the .sln file you are good. 
&lt;/p&gt;
&lt;p&gt;
If you are building .csproj/.vbproj files w/o going through a .sln file? If you build
a web project from the command line (&lt;em&gt;not the developer prompt&lt;/em&gt;) then the value
for VisualStudioVersion used will be 10.0. That is an artifact of the properties which
I showed above. In this case you should pass this in as an MSBuild property. For example
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;msbuild.exe MyAwesomeWeb.csproj /p:VisualStudioVersion=11.0&lt;/pre&gt;
&lt;p&gt;
In this case I’m passing in the property explicitly. This will always override any
other mechanism to determine the value for VisualStudioVersion. If you are using the &lt;a href="http://msdn.microsoft.com/en-us/library/z7f65y0d.aspx"&gt;MSBuild
task&lt;/a&gt; in a build script, then you can specify the property either in the Properties
attribute or the AdditionalProperties attribute. &lt;em&gt;See my previous &lt;/em&gt;&lt;a href="http://sedodream.com/2009/04/29/MSBuildPropertiesAndAdditionalPropertiesKnownMetadata.aspx"&gt;&lt;em&gt;blog
post on the difference between Properties and AdditionalProperties&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; 
&lt;/p&gt;
&lt;p&gt;
If you encounter any funny behavior when building/publishing and you notice that the
wrong .targets files are being imported then you may need to specify this property.
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi | &lt;a href="https://twitter.com/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,a5894bad-f2a1-441a-a5b2-74f16c6cf8aa.aspx</comments>
      <category>MSBuild</category>
      <category>Visual Studio</category>
      <category>Visual Studio 11</category>
      <category>Visual Studio 2010</category>
      <category>Visual Studio 2012</category>
      <category>web</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=055c7ccf-e6a9-41e7-bcb8-db3bc65194f2</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,055c7ccf-e6a9-41e7-bcb8-db3bc65194f2.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,055c7ccf-e6a9-41e7-bcb8-db3bc65194f2.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=055c7ccf-e6a9-41e7-bcb8-db3bc65194f2</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have written a few posts recently describing out updated web publish experience.
These new experience is available for both Visual Studio 2010 as well as Visual Studio
2012 RC. You can use the links below to download these updates in the Azure SDK download.
Below are links for both versions.
</p>
        <ul>
          <li>
            <a href="http://go.microsoft.com/fwlink/?LinkID=254269&amp;clcid=0x409">Windows Azure
SDK for Visual Studio 2010</a>
          </li>
          <li>
            <a href="http://go.microsoft.com/fwlink/?LinkId=254364&amp;clcid=0x409">Windows Azure
SDK for Visual Studio 2012 RC</a>
          </li>
        </ul>
        <p>
The Web Publish experience is chained into VS 2012 RC so if you have installed VS
2012 RC with the Web features then you already have these features.
</p>
        <p>
Thanks, 
<br />
Sayed Ibrahim Hashimi <a href="https://twitter.com/#!/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>Downloading the Visual Studio Web Publish Updates</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,055c7ccf-e6a9-41e7-bcb8-db3bc65194f2.aspx</guid>
      <link>http://sedodream.com/2012/06/15/DownloadingTheVisualStudioWebPublishUpdates.aspx</link>
      <pubDate>Fri, 15 Jun 2012 19:30:40 GMT</pubDate>
      <description>&lt;p&gt;
I have written a few posts recently describing out updated web publish experience.
These new experience is available for both Visual Studio 2010 as well as Visual Studio
2012 RC. You can use the links below to download these updates in the Azure SDK download.
Below are links for both versions.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://go.microsoft.com/fwlink/?LinkID=254269&amp;amp;clcid=0x409"&gt;Windows Azure
SDK for Visual Studio 2010&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://go.microsoft.com/fwlink/?LinkId=254364&amp;amp;clcid=0x409"&gt;Windows Azure
SDK for Visual Studio 2012 RC&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The Web Publish experience is chained into VS 2012 RC so if you have installed VS
2012 RC with the Web features then you already have these features.
&lt;/p&gt;
&lt;p&gt;
Thanks, 
&lt;br /&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/#!/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,055c7ccf-e6a9-41e7-bcb8-db3bc65194f2.aspx</comments>
      <category>asp.net</category>
      <category>Deployment</category>
      <category>Visual Studio</category>
      <category>Visual Studio 11</category>
      <category>Visual Studio 2010</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=bfa8b339-0bf2-4d9c-995b-beaef0ce39ba</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,bfa8b339-0bf2-4d9c-995b-beaef0ce39ba.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,bfa8b339-0bf2-4d9c-995b-beaef0ce39ba.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bfa8b339-0bf2-4d9c-995b-beaef0ce39ba</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week we rolled out some updates for our Visual Studio 2010 Web Publishing Experience.
This post will give you an overview of the new features which we released. In the
coming weeks there will be more posts getting into more details regarding individual
features. 
</p>
        <p>
You can get these updates in the <a href="http://go.microsoft.com/fwlink/?LinkID=254269&amp;clcid=0x409">Windows
Azure SDK for Visual Studio 2010</a>. When you download that package there you will
also get the latest tools for Azure development.
</p>
        <p>
The new high level features include the following.
</p>
        <ul>
          <li>
Updated Web Publish dialog 
</li>
          <li>
Support to import publish profiles (<em>.publishSettings files</em>) 
</li>
          <li>
Support to configure EF Code First migrations during publish 
</li>
          <li>
Support to create web packages in the publish dialog 
</li>
          <li>
Publish profiles now a part of the project and stored in version control by default 
</li>
          <li>
Publish profiles are now MSBuild files 
</li>
          <li>
Profile specific web.config transforms 
</li>
        </ul>
        <h1>Overview
</h1>
        <p>
When you right click on your Web Application Project (WAP) you will now see the new
publish dialog.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_4.png">
            <img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_1.png" width="724" height="564" />
          </a>
        </p>
        <p>
On this tab you can import a .publishSettngs file, which many web hosts provide, and
you can also manage your publish profiles. If you are hosting your site on Windows
Azure Web Sites then you can download the publish profile on the dashboard of the
site using the <em>Download publish profile</em> link. After you import this publish
profile you will be brought to the Connection tab automatically.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_8.png">
            <img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_3.png" width="724" height="564" />
          </a>
        </p>
        <p>
On this tab you can see all the server configuration values which are needed for your
client machine to connect to the server. Typically you don’t have to worry about the
details of these values. Next you’ll go to the Settings tab.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_10.png">
            <img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_4.png" width="724" height="564" />
          </a>
        </p>
        <p>
On the Settings tab you can set the build configuration which should be used for the
publish process, the default value here is Release. There is also a checkbox to enable
you to delete any files on the server which do not exist in the project.
</p>
        <p>
Below that checkbox you will see a section for databases. The sample project shown
has an <a href="http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application">Entity
Framework</a> Code First model, named ContactsContext, and it uses <a href="http://msdn.microsoft.com/en-us/library/hh770484">Code
First Migrations</a> to manage the database schema. If you have any non-EF Code First
connection strings in web.config then those databases will show up as well but the
support for incrementally publishing the schema for those has not yet been finalized.
We are currently working on that. You can visit <a href="http://sedodream.com/2012/06/07/VSPublishDialogUpdateDatabaseDialogDisabled.aspx">my
previous blog entry</a> for more info on that.
</p>
        <p>
If you imported a .publishSettings file with a connection string then that connection
string would automatically be inserted in the textbox/dropdown for the connection
string. If you did not then you can use the … button to create a connection string
with the Connection String Builder dialog or you can simply type/paste in a connection
string. For the EF Code First contexts you will see the <em>Execute Code Frist Migrations</em> checkbox.
When you check this when your site is published the web.config will be transformed
to enable the Code First migrations to be executed the first time that the context
is accessed. Now you can move to the Preview tab.
</p>
        <p>
When you first come to the Preview tab you will see a Start Preview button. Once you
click this button you will see the file operations which would be performed once you
publish. Since this site has never been published all the file operations are Add,
as you can see in the image below. The other Action values include; Update and Delete.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_14.png">
            <img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_6.png" width="724" height="564" />
          </a>
        </p>
        <p>
Once you are ready to publish you can click the Publish button. You can monitor the
progress of the publish process using the Output Window. If your publish profile had
a value for the Destination URL then the site will automatically be opened in the
default browser after the publish has successfully completed.
</p>
        <h1>Publish Profiles
</h1>
        <p>
One of the other changes in the publish experience is that publish profiles are now
stored as a part of your project. They are stored under the folder Properties\PublishProfiles
(<em>for VB projects its My Project\PublishProfiles</em>) and the extension is .pubxml.
You can see this in the image below.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_18.png">
            <img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_8.png" width="330" height="475" />
          </a>
        </p>
        <p>
These .pubxml files are MSBuild files and you can modify these files in order to customize
the publish process. If you do not want the publish profile to be checked into version
control you can simply exclude it from the project. The publish dialog will look at
the files in the PublishProfiles folder so you will still be able to publish using
that profile. You can also leverage these publish profiles to simply publishing from
the command line. For example you can use the following syntax to publish from the
command line.
</p>
        <p>
msbuild.exe WebApplication2.csproj /p:DeployOnBuild=true;PublishProfile="pubdemo
- Web Deploy";Password={INSERT-PASSWORD}
</p>
        <p>
 
</p>
        <h1>Resources
</h1>
        <ul>
          <li>
            <a href="http://go.microsoft.com/fwlink/?LinkID=254269&amp;clcid=0x409">Windows Azure
SDK for Visual Studio 2010</a> (<em>this contains the new Web Publish experience</em>) 
</li>
          <li>
Tutorial: <a href="https://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/">Deploying
an ASP.NET Web Application to a Windows Azure Web Site and SQL Database</a></li>
          <li>
            <a href="http://blogs.msdn.com/b/aspnetue/archive/2012/06/12/visual-studio-2012-rc-deployment-documentation-published.aspx">Visual
Studio 2012 RC Deployment Documentation Published</a> (<em>the publish experience
in VS2012 RC is nearly identical to the VS 2010 Web Publish updates</em>) 
</li>
          <li>
            <a href="http://sedodream.com/">Sayed’s blog</a>
          </li>
        </ul>
        <p>
If you have any questions please feel free to directly reach out to me at sayedha(at){MicrosoftDOTCom}.
</p>
        <p>
Sayed Ibrahim Hashimi <a href="https://twitter.com/#!/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>Visual Studio 2010 Web Publish Updates</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,bfa8b339-0bf2-4d9c-995b-beaef0ce39ba.aspx</guid>
      <link>http://sedodream.com/2012/06/15/VisualStudio2010WebPublishUpdates.aspx</link>
      <pubDate>Fri, 15 Jun 2012 19:07:30 GMT</pubDate>
      <description>&lt;p&gt;
Last week we rolled out some updates for our Visual Studio 2010 Web Publishing Experience.
This post will give you an overview of the new features which we released. In the
coming weeks there will be more posts getting into more details regarding individual
features. 
&lt;/p&gt;
&lt;p&gt;
You can get these updates in the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=254269&amp;amp;clcid=0x409"&gt;Windows
Azure SDK for Visual Studio 2010&lt;/a&gt;. When you download that package there you will
also get the latest tools for Azure development.
&lt;/p&gt;
&lt;p&gt;
The new high level features include the following.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Updated Web Publish dialog 
&lt;/li&gt;
&lt;li&gt;
Support to import publish profiles (&lt;em&gt;.publishSettings files&lt;/em&gt;) 
&lt;/li&gt;
&lt;li&gt;
Support to configure EF Code First migrations during publish 
&lt;/li&gt;
&lt;li&gt;
Support to create web packages in the publish dialog 
&lt;/li&gt;
&lt;li&gt;
Publish profiles now a part of the project and stored in version control by default 
&lt;/li&gt;
&lt;li&gt;
Publish profiles are now MSBuild files 
&lt;/li&gt;
&lt;li&gt;
Profile specific web.config transforms 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Overview
&lt;/h1&gt;
&lt;p&gt;
When you right click on your Web Application Project (WAP) you will now see the new
publish dialog.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_4.png"&gt;&lt;img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_1.png" width="724" height="564" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
On this tab you can import a .publishSettngs file, which many web hosts provide, and
you can also manage your publish profiles. If you are hosting your site on Windows
Azure Web Sites then you can download the publish profile on the dashboard of the
site using the &lt;em&gt;Download publish profile&lt;/em&gt; link. After you import this publish
profile you will be brought to the Connection tab automatically.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_8.png"&gt;&lt;img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_3.png" width="724" height="564" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
On this tab you can see all the server configuration values which are needed for your
client machine to connect to the server. Typically you don’t have to worry about the
details of these values. Next you’ll go to the Settings tab.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_10.png"&gt;&lt;img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_4.png" width="724" height="564" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
On the Settings tab you can set the build configuration which should be used for the
publish process, the default value here is Release. There is also a checkbox to enable
you to delete any files on the server which do not exist in the project.
&lt;/p&gt;
&lt;p&gt;
Below that checkbox you will see a section for databases. The sample project shown
has an &lt;a href="http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application"&gt;Entity
Framework&lt;/a&gt; Code First model, named ContactsContext, and it uses &lt;a href="http://msdn.microsoft.com/en-us/library/hh770484"&gt;Code
First Migrations&lt;/a&gt; to manage the database schema. If you have any non-EF Code First
connection strings in web.config then those databases will show up as well but the
support for incrementally publishing the schema for those has not yet been finalized.
We are currently working on that. You can visit &lt;a href="http://sedodream.com/2012/06/07/VSPublishDialogUpdateDatabaseDialogDisabled.aspx"&gt;my
previous blog entry&lt;/a&gt; for more info on that.
&lt;/p&gt;
&lt;p&gt;
If you imported a .publishSettings file with a connection string then that connection
string would automatically be inserted in the textbox/dropdown for the connection
string. If you did not then you can use the … button to create a connection string
with the Connection String Builder dialog or you can simply type/paste in a connection
string. For the EF Code First contexts you will see the &lt;em&gt;Execute Code Frist Migrations&lt;/em&gt; checkbox.
When you check this when your site is published the web.config will be transformed
to enable the Code First migrations to be executed the first time that the context
is accessed. Now you can move to the Preview tab.
&lt;/p&gt;
&lt;p&gt;
When you first come to the Preview tab you will see a Start Preview button. Once you
click this button you will see the file operations which would be performed once you
publish. Since this site has never been published all the file operations are Add,
as you can see in the image below. The other Action values include; Update and Delete.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_14.png"&gt;&lt;img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_6.png" width="724" height="564" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Once you are ready to publish you can click the Publish button. You can monitor the
progress of the publish process using the Output Window. If your publish profile had
a value for the Destination URL then the site will automatically be opened in the
default browser after the publish has successfully completed.
&lt;/p&gt;
&lt;h1&gt;Publish Profiles
&lt;/h1&gt;
&lt;p&gt;
One of the other changes in the publish experience is that publish profiles are now
stored as a part of your project. They are stored under the folder Properties\PublishProfiles
(&lt;em&gt;for VB projects its My Project\PublishProfiles&lt;/em&gt;) and the extension is .pubxml.
You can see this in the image below.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_18.png"&gt;&lt;img style="background-image: none; display: inline" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/da1ea8decc68_BC52/image_thumb_8.png" width="330" height="475" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
These .pubxml files are MSBuild files and you can modify these files in order to customize
the publish process. If you do not want the publish profile to be checked into version
control you can simply exclude it from the project. The publish dialog will look at
the files in the PublishProfiles folder so you will still be able to publish using
that profile. You can also leverage these publish profiles to simply publishing from
the command line. For example you can use the following syntax to publish from the
command line.
&lt;/p&gt;
&lt;p&gt;
msbuild.exe WebApplication2.csproj /p:DeployOnBuild=true;PublishProfile=&amp;quot;pubdemo
- Web Deploy&amp;quot;;Password={INSERT-PASSWORD}
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;h1&gt;Resources
&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://go.microsoft.com/fwlink/?LinkID=254269&amp;amp;clcid=0x409"&gt;Windows Azure
SDK for Visual Studio 2010&lt;/a&gt; (&lt;em&gt;this contains the new Web Publish experience&lt;/em&gt;) 
&lt;/li&gt;
&lt;li&gt;
Tutorial: &lt;a href="https://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/"&gt;Deploying
an ASP.NET Web Application to a Windows Azure Web Site and SQL Database&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://blogs.msdn.com/b/aspnetue/archive/2012/06/12/visual-studio-2012-rc-deployment-documentation-published.aspx"&gt;Visual
Studio 2012 RC Deployment Documentation Published&lt;/a&gt; (&lt;em&gt;the publish experience
in VS2012 RC is nearly identical to the VS 2010 Web Publish updates&lt;/em&gt;) 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://sedodream.com/"&gt;Sayed’s blog&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If you have any questions please feel free to directly reach out to me at sayedha(at){MicrosoftDOTCom}.
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/#!/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,bfa8b339-0bf2-4d9c-995b-beaef0ce39ba.aspx</comments>
      <category>asp.net</category>
      <category>Microsoft</category>
      <category>MSDeploy</category>
      <category>Visual Studio 2010</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=2329c457-215a-4cab-949c-a4c614786128</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,2329c457-215a-4cab-949c-a4c614786128.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,2329c457-215a-4cab-949c-a4c614786128.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=2329c457-215a-4cab-949c-a4c614786128</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We have two sets of ASP.NET providers which currently exist; the <a href="http://msdn.microsoft.com/en-us/library/aa478948.aspx">ASP.NET
SQL providers</a>, and the <a href="http://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNETUniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCompactAndSQLAzure.aspx">ASP.NET
Universal Providers</a>. In VS 2010 the SQL providers were in only providers used
for our project templates. In VS 2012 we have switched to using the Universal Providers.
One of the drawbacks of the SQL providers is that it leverages DB objects of SQL server
which are not available in SQL Azure.
</p>
        <p>
In our updated web publish experience we have an Update Database checkbox which can
be used to incrementally publish the database to the destination database. In this
case if the source connection string is used by the ASP.NET SQL providers and you
are publishing to SQL Azure then you will see the following message on the dialog.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/7a4d3a6c7aa1_10431/SNAGHTML48cbb8.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML48cbb8" border="0" alt="SNAGHTML48cbb8" src="http://sedodream.com/content/binary/Windows-Live-Writer/7a4d3a6c7aa1_10431/SNAGHTML48cbb8_thumb.png" width="724" height="564" />
          </a>
        </p>
        <p>
          <em>Note: you may see the Update Database checkbox disabled, please visit </em>
          <a href="http://sedodream.com/2012/06/07/VSPublishDialogUpdateDatabaseDialogDisabled.aspx">
            <em>http://sedodream.com/2012/06/07/VSPublishDialogUpdateDatabaseDialogDisabled.aspx</em>
          </a>
          <em> for
more info on why.</em>
        </p>
        <p>
The publish dialog is letting you know that the SQL providers are not compatible with
SQL Azure and helps you convert to using the Universal Providers. After you install
the Universal Providers the web.config entry will be commented out and new entries
will be inserted for the Universal Providers. Your existing database will not be impacted,
we’ll create a new connection string pointing to a new database. If you had any data
in the SQL Providers database you will have to re-create those objects in the new
database.
</p>
        <p>
If you have any questions please feel free to directly reach out to me at sayedha(at){MicrosoftDOTCom}.
</p>
        <p>
Sayed Ibrahim Hashimi <a href="https://twitter.com/#!/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>ASP.NET providers and SQL Azure</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,2329c457-215a-4cab-949c-a4c614786128.aspx</guid>
      <link>http://sedodream.com/2012/06/07/ASPNETProvidersAndSQLAzure.aspx</link>
      <pubDate>Thu, 07 Jun 2012 22:41:46 GMT</pubDate>
      <description>&lt;p&gt;
We have two sets of ASP.NET providers which currently exist; the &lt;a href="http://msdn.microsoft.com/en-us/library/aa478948.aspx"&gt;ASP.NET
SQL providers&lt;/a&gt;, and the &lt;a href="http://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNETUniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCompactAndSQLAzure.aspx"&gt;ASP.NET
Universal Providers&lt;/a&gt;. In VS 2010 the SQL providers were in only providers used
for our project templates. In VS 2012 we have switched to using the Universal Providers.
One of the drawbacks of the SQL providers is that it leverages DB objects of SQL server
which are not available in SQL Azure.
&lt;/p&gt;
&lt;p&gt;
In our updated web publish experience we have an Update Database checkbox which can
be used to incrementally publish the database to the destination database. In this
case if the source connection string is used by the ASP.NET SQL providers and you
are publishing to SQL Azure then you will see the following message on the dialog.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/7a4d3a6c7aa1_10431/SNAGHTML48cbb8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML48cbb8" border="0" alt="SNAGHTML48cbb8" src="http://sedodream.com/content/binary/Windows-Live-Writer/7a4d3a6c7aa1_10431/SNAGHTML48cbb8_thumb.png" width="724" height="564" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Note: you may see the Update Database checkbox disabled, please visit &lt;/em&gt;&lt;a href="http://sedodream.com/2012/06/07/VSPublishDialogUpdateDatabaseDialogDisabled.aspx"&gt;&lt;em&gt;http://sedodream.com/2012/06/07/VSPublishDialogUpdateDatabaseDialogDisabled.aspx&lt;/em&gt;&lt;/a&gt;&lt;em&gt; for
more info on why.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
The publish dialog is letting you know that the SQL providers are not compatible with
SQL Azure and helps you convert to using the Universal Providers. After you install
the Universal Providers the web.config entry will be commented out and new entries
will be inserted for the Universal Providers. Your existing database will not be impacted,
we’ll create a new connection string pointing to a new database. If you had any data
in the SQL Providers database you will have to re-create those objects in the new
database.
&lt;/p&gt;
&lt;p&gt;
If you have any questions please feel free to directly reach out to me at sayedha(at){MicrosoftDOTCom}.
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/#!/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,2329c457-215a-4cab-949c-a4c614786128.aspx</comments>
      <category>Visual Studio</category>
      <category>Visual Studio 11</category>
      <category>Visual Studio 2010</category>
      <category>web</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=44479d58-f995-4a20-9e1a-fd36971ad0f9</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,44479d58-f995-4a20-9e1a-fd36971ad0f9.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,44479d58-f995-4a20-9e1a-fd36971ad0f9.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=44479d58-f995-4a20-9e1a-fd36971ad0f9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you have tried out our new Web Publish experience in Visual Studio you may have
noticed that the Update Database checkbox is disabled. See the image below.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/2be80936fb60_F50D/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/2be80936fb60_F50D/image_thumb.png" width="720" height="562" />
          </a>
        </p>
        <p>
The intended behavior of this checkbox is to enable you to <strong>incrementally publish</strong> your
database schema from the source (the connection string in web.config) to the destination
(<em>whatever connection string is in the text box</em>). The difference between an
incremental publish and a typical publish is that for incremental publishes only changes
are transferred from source to destination. With a full publish the first time that
you publish your DB schema everything is created, and the next time that you try to
publish you will receive an error because it tries to re-create existing DB objects.
</p>
        <p>
The functionality of the <strong>Update database</strong> checkbox leverages an MSDeploy
provider. We were hoping to complete that provider and give it to hosters in time
for the release but we were unable to do so. We are working on completing the provider
and partnering with hosters to install these in time for the launch of Visual Studio
2012 RTM.
</p>
        <p>
In the mean time if you need to publish your DB schema you can use the Package/Publish
SQL tab (<strong>caution: the DB publishing here is not incremental</strong>). If
you are going to use the PP/Sql tab to publish to SQL Azure then there are some special
consideraions that you will need to take. You can learn more about those by visiting <a title="http://msdn.microsoft.com/en-us/library/dd465343.aspx" href="http://msdn.microsoft.com/en-us/library/dd465343.aspx">http://msdn.microsoft.com/en-us/library/dd465343.aspx</a> and
searching for “Azure” on that page.
</p>
        <p>
If you have any questions please feel free to directly reach out to me at sayedha(at){MicrosoftDOTCom}.
</p>
        <p>
          <br />
Thanks, 
<br />
Sayed Ibrahim Hashimi <a href="https://twitter.com/#!/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>VS Publish dialog Update Database dialog disabled</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,44479d58-f995-4a20-9e1a-fd36971ad0f9.aspx</guid>
      <link>http://sedodream.com/2012/06/07/VSPublishDialogUpdateDatabaseDialogDisabled.aspx</link>
      <pubDate>Thu, 07 Jun 2012 21:44:26 GMT</pubDate>
      <description>&lt;p&gt;
If you have tried out our new Web Publish experience in Visual Studio you may have
noticed that the Update Database checkbox is disabled. See the image below.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/2be80936fb60_F50D/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/2be80936fb60_F50D/image_thumb.png" width="720" height="562" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The intended behavior of this checkbox is to enable you to &lt;strong&gt;incrementally publish&lt;/strong&gt; your
database schema from the source (the connection string in web.config) to the destination
(&lt;em&gt;whatever connection string is in the text box&lt;/em&gt;). The difference between an
incremental publish and a typical publish is that for incremental publishes only changes
are transferred from source to destination. With a full publish the first time that
you publish your DB schema everything is created, and the next time that you try to
publish you will receive an error because it tries to re-create existing DB objects.
&lt;/p&gt;
&lt;p&gt;
The functionality of the &lt;strong&gt;Update database&lt;/strong&gt; checkbox leverages an MSDeploy
provider. We were hoping to complete that provider and give it to hosters in time
for the release but we were unable to do so. We are working on completing the provider
and partnering with hosters to install these in time for the launch of Visual Studio
2012 RTM.
&lt;/p&gt;
&lt;p&gt;
In the mean time if you need to publish your DB schema you can use the Package/Publish
SQL tab (&lt;strong&gt;caution: the DB publishing here is not incremental&lt;/strong&gt;). If
you are going to use the PP/Sql tab to publish to SQL Azure then there are some special
consideraions that you will need to take. You can learn more about those by visiting &lt;a title="http://msdn.microsoft.com/en-us/library/dd465343.aspx" href="http://msdn.microsoft.com/en-us/library/dd465343.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd465343.aspx&lt;/a&gt; and
searching for “Azure” on that page.
&lt;/p&gt;
&lt;p&gt;
If you have any questions please feel free to directly reach out to me at sayedha(at){MicrosoftDOTCom}.
&lt;/p&gt;
&lt;p&gt;
&lt;br /&gt;
Thanks, 
&lt;br /&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/#!/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,44479d58-f995-4a20-9e1a-fd36971ad0f9.aspx</comments>
      <category>Visual Studio</category>
      <category>Visual Studio 11</category>
      <category>Visual Studio 2010</category>
      <category>web</category>
      <category>Web Development</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=639ccf51-43f4-4638-be23-1201c654171a</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,639ccf51-43f4-4638-be23-1201c654171a.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,639ccf51-43f4-4638-be23-1201c654171a.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=639ccf51-43f4-4638-be23-1201c654171a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
\I receive a lot of questions regarding <a href="http://msdn.microsoft.com/en-us/library/dd465326.aspx">web.config
transforms</a>, which have existed in Visual Studio since 2010, and wanted to clear
up the support that we have in this area. These transforms show up in the solution
explorer underneath web.config as shown in the image below.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/web.config-transforms_10FB5/image_2.png">
            <img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/web.config-transforms_10FB5/image_thumb.png" width="291" height="329" />
          </a>
        </p>
        <p>
Since the names of these transforms include the build configuration many people expect
that web.config will be transformed when they start debugging (F5) or run the app
(CTRL+F5) in Visual Studio. But sadly this is not the case. <strong>These transforms
are kicked in only when the web is packaged or published</strong>. I totally agree
that this would be awesome, and I even blogged about how to enable it at <a href="http://sedodream.com/2010/10/21/ASPNETWebProjectsWebdebugconfigWebreleaseconfig.aspx">http://sedodream.com/2010/10/21/ASPNETWebProjectsWebdebugconfigWebreleaseconfig.aspx</a>.
It may seem like it would be really easy for us to include this support in the box,
but unfortunately that is not the case. The reason why we are not able to implement
this feature at this time is because a lot of our tooling (<em>and many partners</em>)
relies on web.config directly. For example when you drag and drop a database object
onto a web form, it will generate a connection string into the web.config. There are
a lot of features are like this. It is a significant investment for us to make a change
of this level. We were not able to get this done for Visual Studio 11, but it is on
our radar and we are looking to see what we can do in this area in the future.
</p>
        <p>
Sayed Ibrahim Hashimi <a href="https://twitter.com/#!/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>web.config transforms, they are invoked on package and publish not F5</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,639ccf51-43f4-4638-be23-1201c654171a.aspx</guid>
      <link>http://sedodream.com/2012/05/12/webconfigTransformsTheyAreInvokedOnPackageAndPublishNotF5.aspx</link>
      <pubDate>Sat, 12 May 2012 02:29:15 GMT</pubDate>
      <description>&lt;p&gt;
\I receive a lot of questions regarding &lt;a href="http://msdn.microsoft.com/en-us/library/dd465326.aspx"&gt;web.config
transforms&lt;/a&gt;, which have existed in Visual Studio since 2010, and wanted to clear
up the support that we have in this area. These transforms show up in the solution
explorer underneath web.config as shown in the image below.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/web.config-transforms_10FB5/image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/web.config-transforms_10FB5/image_thumb.png" width="291" height="329" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Since the names of these transforms include the build configuration many people expect
that web.config will be transformed when they start debugging (F5) or run the app
(CTRL+F5) in Visual Studio. But sadly this is not the case. &lt;strong&gt;These transforms
are kicked in only when the web is packaged or published&lt;/strong&gt;. I totally agree
that this would be awesome, and I even blogged about how to enable it at &lt;a href="http://sedodream.com/2010/10/21/ASPNETWebProjectsWebdebugconfigWebreleaseconfig.aspx"&gt;http://sedodream.com/2010/10/21/ASPNETWebProjectsWebdebugconfigWebreleaseconfig.aspx&lt;/a&gt;.
It may seem like it would be really easy for us to include this support in the box,
but unfortunately that is not the case. The reason why we are not able to implement
this feature at this time is because a lot of our tooling (&lt;em&gt;and many partners&lt;/em&gt;)
relies on web.config directly. For example when you drag and drop a database object
onto a web form, it will generate a connection string into the web.config. There are
a lot of features are like this. It is a significant investment for us to make a change
of this level. We were not able to get this done for Visual Studio 11, but it is on
our radar and we are looking to see what we can do in this area in the future.
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/#!/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,639ccf51-43f4-4638-be23-1201c654171a.aspx</comments>
      <category>Visual Studio 2010</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=f623d885-ebb6-45c8-b0a3-f2d91e400d26</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,f623d885-ebb6-45c8-b0a3-f2d91e400d26.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,f623d885-ebb6-45c8-b0a3-f2d91e400d26.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f623d885-ebb6-45c8-b0a3-f2d91e400d26</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A couple months ago I <a href="http://sedodream.com/2011/12/24/PackageOncePublishAnywhere.aspx" target="_blank">blogged
about a Package-Web</a> which is a NuGet package that extends the web packaging process
in Visual Studio to enable you to create a single package which can be published to
multiple environments (<em>it captures all of your web.config transforms and has the
ability to transform on non-dev machines</em>). Since that release I have updated
the project and tonight I created a video which shows the features a bit you can <a href="http://youtu.be/-LvUJFI8CzM" target="_blank">check
it out on Youtube</a>. It’s embedded below.
</p>
        <iframe height="315" src="http://www.youtube.com/embed/-LvUJFI8CzM" frameborder="0" width="560" allowfullscreen="allowfullscreen">
        </iframe>
        <p>
          <strong>
            <font size="3">You can install this via NuGet, the package name is PackageWeb.</font>
          </strong>
        </p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/Package-web-updated-and-video-below_1440C/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/Package-web-updated-and-video-below_1440C/image_thumb.png" width="745" height="71" />
          </a>
        </p>
        <p>
Package-Web is an open source project and you can find it on my github account at <a href="https://github.com/sayedihashimi/package-web">https://github.com/sayedihashimi/package-web</a>.
</p>
        <p>
Thanks, 
<br />
Sayed Ibrahim Hashimi <a href="https://twitter.com/#!/sayedihashimi" target="_blank">@SayedIHashimi</a></p>
      </body>
      <title>Package web updated and video below</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,f623d885-ebb6-45c8-b0a3-f2d91e400d26.aspx</guid>
      <link>http://sedodream.com/2012/03/14/PackageWebUpdatedAndVideoBelow.aspx</link>
      <pubDate>Wed, 14 Mar 2012 06:08:57 GMT</pubDate>
      <description>&lt;p&gt;
A couple months ago I &lt;a href="http://sedodream.com/2011/12/24/PackageOncePublishAnywhere.aspx" target="_blank"&gt;blogged
about a Package-Web&lt;/a&gt; which is a NuGet package that extends the web packaging process
in Visual Studio to enable you to create a single package which can be published to
multiple environments (&lt;em&gt;it captures all of your web.config transforms and has the
ability to transform on non-dev machines&lt;/em&gt;). Since that release I have updated
the project and tonight I created a video which shows the features a bit you can &lt;a href="http://youtu.be/-LvUJFI8CzM" target="_blank"&gt;check
it out on Youtube&lt;/a&gt;. It’s embedded below.
&lt;/p&gt;
&lt;iframe height="315" src="http://www.youtube.com/embed/-LvUJFI8CzM" frameborder="0" width="560" allowfullscreen="allowfullscreen"&gt;
&lt;/iframe&gt;
&lt;p&gt;
&lt;strong&gt;&lt;font size="3"&gt;You can install this via NuGet, the package name is PackageWeb.&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/Package-web-updated-and-video-below_1440C/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/Package-web-updated-and-video-below_1440C/image_thumb.png" width="745" height="71" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Package-Web is an open source project and you can find it on my github account at &lt;a href="https://github.com/sayedihashimi/package-web"&gt;https://github.com/sayedihashimi/package-web&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Thanks, 
&lt;br /&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/#!/sayedihashimi" target="_blank"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,f623d885-ebb6-45c8-b0a3-f2d91e400d26.aspx</comments>
      <category>MSBuild</category>
      <category>MSDeploy</category>
      <category>Visual Studio</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
      <category>Web Development</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=d9d1333e-0ff0-4fb4-b92a-72631e92442f</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,d9d1333e-0ff0-4fb4-b92a-72631e92442f.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,d9d1333e-0ff0-4fb4-b92a-72631e92442f.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d9d1333e-0ff0-4fb4-b92a-72631e92442f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The other day I saw a question on StackOverflow (link in resources below) asking How
you can create a Web Deploy (AKA MSDeploy) package when publishing a ClickOnce project.
The easiest way to do this is to use the Web Deploy command line utility, msdeploy.exe.
With the command line you can easily create an MSDeploy package from a folder with
a command like the following:
</p>
        <pre class="brush: csharp;">    %msdeploy% 
      -verb:sync 
      -source:contentPath="C:\Temp\_NET\WebPackageWithClickOnce\WebPackageWithClickOnce\bin\Debug\app.publish" 
      -dest:package="C:\Temp\_NET\WebPackageWithClickOnce\WebPackageWithClickOnce\bin\Debug\co-pkg.zip"</pre>
        <p>
 
</p>
        <p>
Here you can see that I’m using the sync verb, along with a contentPath provider (<em>which
points to a folder</em>) as the source and the destination is using the package provider,
this point to where I want the package to be stored.
</p>
        <p>
Now that we understand how to create an MSDeploy package from a folder we need to
extend the ClickOnce publish process to create a package. I’m not a ClickOnce expert,
but the ClickOnce publish process is captured in MSBuild so after investigating for
a bit I found the following relevant details.
</p>
        <ul>
          <li>
The ClickOnce publish process is contained in the Microsoft.Common.targets file</li>
          <li>
The ClickOnce publish process is tied together through the <strong>Publish</strong> target</li>
          <li>
ClickOnce prepares the files to be published in a folder under bin named app.publish
which is governed by the MSBuild property <strong>PublishDir</strong></li>
        </ul>
        <p>
Now that we know what target to extend as well as what property we can use to refer
to the folder which has the content we can complete sample. We need to edit the project
file. Below is the full contents which I have placed at the bottom of the project
file (right above &lt;/Project&gt;).
</p>
        <pre class="brush: xml;">  &lt;PropertyGroup&gt;
    &lt;WebDeployPackageName Condition=" '$(WebDeployPackageName)'=='' "&gt;$(MSBuildProjectName).zip&lt;/WebDeployPackageName&gt;
    &lt;!--Unless specified otherwise, the tools will go to HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1 to get the installpath for msdeploy.exe.--&gt;
    &lt;MSDeployPath Condition="'$(MSDeployPath)'==''"&gt;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3@InstallPath)&lt;/MSDeployPath&gt;
    &lt;MSDeployPath Condition="'$(MSDeployPath)'==''"&gt;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2@InstallPath)&lt;/MSDeployPath&gt;
    &lt;MSDeployPath Condition="'$(MSDeployPath)'==''"&gt;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1@InstallPath)&lt;/MSDeployPath&gt;
    &lt;MSDeployExe Condition=" '$(MSDeployExe)'=='' "&gt;$(MSDeployPath)msdeploy.exe&lt;/MSDeployExe&gt;
  &lt;/PropertyGroup&gt;
  &lt;Target Name="CreateWebDeployPackage" AfterTargets="Publish" DependsOnTargets="Publish"&gt;
    &lt;!--
    %msdeploy% 
      -verb:sync 
      -source:contentPath="C:\Temp\_NET\WebPackageWithClickOnce\WebPackageWithClickOnce\bin\Debug\app.publish" 
      -dest:package="C:\Temp\_NET\WebPackageWithClickOnce\WebPackageWithClickOnce\bin\Debug\co-pkg.zip"
      --&gt;
    &lt;PropertyGroup&gt;
      &lt;Cmd&gt;"$(MSDeployExe)" -verb:sync -source:contentPath="$(MSBuildProjectDirectory)\$(PublishDir)" -dest:package="$(OutDir)$(WebDeployPackageName)"&lt;/Cmd&gt;
    &lt;/PropertyGroup&gt;
    &lt;Message Text="Creating web deploy package with command: $(Cmd)" /&gt;
    &lt;Exec Command="$(Cmd)" /&gt;
  &lt;/Target&gt;</pre>
        <p>
Here I’ve created a couple properties as well as a new target, CreateWebDeployPackage.
I have declared the property WebDeployPackageName which will be the name (excluding
path) of the Web Deploy package which gets created. This defaults to the name of the
project, but you can override it if you want. Next I define the property, MSDeployPath,
which points to msdeploy.exe. It will pick the latest version.
</p>
        <p>
The CreateWebDeployPackage target just constructs the full command line call which
needs to be executed and invokes it using the Exec MSBuild task. There are a couple
subtle details on the target itself though which are worth pointing out. The target
has declared <strong>AfterTargets=”Publish”</strong> which means that it will be invoked
after the Publish target. It also declares <strong>DependsOnTargets=”Publish”</strong>.
Which means that whenever the target gets invoked that Publish will need to be executed
before <strong>CreateWebDeployPackage</strong>. 
</p>
        <p>
Now that we have defined these updates when you publish your ClickOnce project (wither
through Visual Studio or the command line/build servers) a Web Deploy package will
be generated in the output folder which you can use to incrementally publish your
ClickOnce app to your web server. You can find the latest version of this sample on
my <a href="https://github.com/sayedihashimi/sayed-samples/tree/master/ClickOnceCreateWebPackage">github
repository</a>.
</p>
        <p>
Sayed Ibrahim Hashimi <a href="https://twitter.com/#!/sayedihashimi">@SayedIHashimi</a></p>
        <p>
Resources
</p>
        <ul>
          <li>
StackOverflow question: <a href="http://stackoverflow.com/q/9292986/105999">Create
a clickonce webdeploy package</a></li>
          <li>
            <a href="http://technet.microsoft.com/en-us/library/dd569106(WS.10).aspx">MSDeploy.exe
verb</a>
          </li>
          <li>
            <a href="http://technet.microsoft.com/en-us/library/dd569034(WS.10).aspx">MSDeploy
contentPath provider</a>
          </li>
          <li>
            <a href="http://technet.microsoft.com/en-us/library/dd569019(WS.10).aspx">MSDeploy
package provider</a>
          </li>
          <li>
            <a href="http://msdn.microsoft.com/en-us/library/x8zx72cd.aspx">MSBuild Exec task</a>
          </li>
        </ul>
      </body>
      <title>How to create a Web Deploy package when publishing a ClickOnce project</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,d9d1333e-0ff0-4fb4-b92a-72631e92442f.aspx</guid>
      <link>http://sedodream.com/2012/02/18/HowToCreateAWebDeployPackageWhenPublishingAClickOnceProject.aspx</link>
      <pubDate>Sat, 18 Feb 2012 18:47:30 GMT</pubDate>
      <description>&lt;p&gt;
The other day I saw a question on StackOverflow (link in resources below) asking How
you can create a Web Deploy (AKA MSDeploy) package when publishing a ClickOnce project.
The easiest way to do this is to use the Web Deploy command line utility, msdeploy.exe.
With the command line you can easily create an MSDeploy package from a folder with
a command like the following:
&lt;/p&gt;
&lt;pre class="brush: csharp;"&gt;    %msdeploy% 
      -verb:sync 
      -source:contentPath=&amp;quot;C:\Temp\_NET\WebPackageWithClickOnce\WebPackageWithClickOnce\bin\Debug\app.publish&amp;quot; 
      -dest:package=&amp;quot;C:\Temp\_NET\WebPackageWithClickOnce\WebPackageWithClickOnce\bin\Debug\co-pkg.zip&amp;quot;&lt;/pre&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Here you can see that I’m using the sync verb, along with a contentPath provider (&lt;em&gt;which
points to a folder&lt;/em&gt;) as the source and the destination is using the package provider,
this point to where I want the package to be stored.
&lt;/p&gt;
&lt;p&gt;
Now that we understand how to create an MSDeploy package from a folder we need to
extend the ClickOnce publish process to create a package. I’m not a ClickOnce expert,
but the ClickOnce publish process is captured in MSBuild so after investigating for
a bit I found the following relevant details.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
The ClickOnce publish process is contained in the Microsoft.Common.targets file&lt;/li&gt;
&lt;li&gt;
The ClickOnce publish process is tied together through the &lt;strong&gt;Publish&lt;/strong&gt; target&lt;/li&gt;
&lt;li&gt;
ClickOnce prepares the files to be published in a folder under bin named app.publish
which is governed by the MSBuild property &lt;strong&gt;PublishDir&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Now that we know what target to extend as well as what property we can use to refer
to the folder which has the content we can complete sample. We need to edit the project
file. Below is the full contents which I have placed at the bottom of the project
file (right above &amp;lt;/Project&amp;gt;).
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;  &amp;lt;PropertyGroup&amp;gt;
    &amp;lt;WebDeployPackageName Condition=&amp;quot; '$(WebDeployPackageName)'=='' &amp;quot;&amp;gt;$(MSBuildProjectName).zip&amp;lt;/WebDeployPackageName&amp;gt;
    &amp;lt;!--Unless specified otherwise, the tools will go to HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1 to get the installpath for msdeploy.exe.--&amp;gt;
    &amp;lt;MSDeployPath Condition=&amp;quot;'$(MSDeployPath)'==''&amp;quot;&amp;gt;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3@InstallPath)&amp;lt;/MSDeployPath&amp;gt;
    &amp;lt;MSDeployPath Condition=&amp;quot;'$(MSDeployPath)'==''&amp;quot;&amp;gt;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2@InstallPath)&amp;lt;/MSDeployPath&amp;gt;
    &amp;lt;MSDeployPath Condition=&amp;quot;'$(MSDeployPath)'==''&amp;quot;&amp;gt;$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1@InstallPath)&amp;lt;/MSDeployPath&amp;gt;
    &amp;lt;MSDeployExe Condition=&amp;quot; '$(MSDeployExe)'=='' &amp;quot;&amp;gt;$(MSDeployPath)msdeploy.exe&amp;lt;/MSDeployExe&amp;gt;
  &amp;lt;/PropertyGroup&amp;gt;
  &amp;lt;Target Name=&amp;quot;CreateWebDeployPackage&amp;quot; AfterTargets=&amp;quot;Publish&amp;quot; DependsOnTargets=&amp;quot;Publish&amp;quot;&amp;gt;
    &amp;lt;!--
    %msdeploy% 
      -verb:sync 
      -source:contentPath=&amp;quot;C:\Temp\_NET\WebPackageWithClickOnce\WebPackageWithClickOnce\bin\Debug\app.publish&amp;quot; 
      -dest:package=&amp;quot;C:\Temp\_NET\WebPackageWithClickOnce\WebPackageWithClickOnce\bin\Debug\co-pkg.zip&amp;quot;
      --&amp;gt;
    &amp;lt;PropertyGroup&amp;gt;
      &amp;lt;Cmd&amp;gt;&amp;quot;$(MSDeployExe)&amp;quot; -verb:sync -source:contentPath=&amp;quot;$(MSBuildProjectDirectory)\$(PublishDir)&amp;quot; -dest:package=&amp;quot;$(OutDir)$(WebDeployPackageName)&amp;quot;&amp;lt;/Cmd&amp;gt;
    &amp;lt;/PropertyGroup&amp;gt;
    &amp;lt;Message Text=&amp;quot;Creating web deploy package with command: $(Cmd)&amp;quot; /&amp;gt;
    &amp;lt;Exec Command=&amp;quot;$(Cmd)&amp;quot; /&amp;gt;
  &amp;lt;/Target&amp;gt;&lt;/pre&gt;
&lt;p&gt;
Here I’ve created a couple properties as well as a new target, CreateWebDeployPackage.
I have declared the property WebDeployPackageName which will be the name (excluding
path) of the Web Deploy package which gets created. This defaults to the name of the
project, but you can override it if you want. Next I define the property, MSDeployPath,
which points to msdeploy.exe. It will pick the latest version.
&lt;/p&gt;
&lt;p&gt;
The CreateWebDeployPackage target just constructs the full command line call which
needs to be executed and invokes it using the Exec MSBuild task. There are a couple
subtle details on the target itself though which are worth pointing out. The target
has declared &lt;strong&gt;AfterTargets=”Publish”&lt;/strong&gt; which means that it will be invoked
after the Publish target. It also declares &lt;strong&gt;DependsOnTargets=”Publish”&lt;/strong&gt;.
Which means that whenever the target gets invoked that Publish will need to be executed
before &lt;strong&gt;CreateWebDeployPackage&lt;/strong&gt;. 
&lt;/p&gt;
&lt;p&gt;
Now that we have defined these updates when you publish your ClickOnce project (wither
through Visual Studio or the command line/build servers) a Web Deploy package will
be generated in the output folder which you can use to incrementally publish your
ClickOnce app to your web server. You can find the latest version of this sample on
my &lt;a href="https://github.com/sayedihashimi/sayed-samples/tree/master/ClickOnceCreateWebPackage"&gt;github
repository&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/#!/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Resources
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
StackOverflow question: &lt;a href="http://stackoverflow.com/q/9292986/105999"&gt;Create
a clickonce webdeploy package&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://technet.microsoft.com/en-us/library/dd569106(WS.10).aspx"&gt;MSDeploy.exe
verb&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://technet.microsoft.com/en-us/library/dd569034(WS.10).aspx"&gt;MSDeploy
contentPath provider&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://technet.microsoft.com/en-us/library/dd569019(WS.10).aspx"&gt;MSDeploy
package provider&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/x8zx72cd.aspx"&gt;MSBuild Exec task&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,d9d1333e-0ff0-4fb4-b92a-72631e92442f.aspx</comments>
      <category>ClickOnce</category>
      <category>IIS</category>
      <category>Microsoft</category>
      <category>MSBuild</category>
      <category>MSDeploy</category>
      <category>web</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=c3aa839b-d7dd-4847-b7ad-af347e1e86fc</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,c3aa839b-d7dd-4847-b7ad-af347e1e86fc.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,c3aa839b-d7dd-4847-b7ad-af347e1e86fc.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=c3aa839b-d7dd-4847-b7ad-af347e1e86fc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The other day I saw a question posted on StackOverflow (<em>link to question below
in resources section</em>) asking if it was possible to update web.config using MSDeploy.
I actually used a technique where I updated a single file in one of my previous posts
at <a href="http://sedodream.com/2012/01/08/HowToTakeYourWebAppOfflineDuringPublishing.aspx">How
to take your web app offline during publishing</a> but it wasn’t called out too much.
In any case I’ll show you how you can update a single file (in this case web.config)
using MSDeploy.
</p>
        <p>
You can use the <a href="http://technet.microsoft.com/en-us/library/dd569034(WS.10).aspx">contentPath
provider</a> to facilitate updating a single file. Using contentPath you can sync
either a single file or an entire folder. You can also use IIS app paths to resolve
where the file/folder resides. For example if I have a web.config file in a local
folder named “C:\Data\Personal\My Repo\sayed-samples\UpdateWebConfig” and I want to
update my IIS site <strong>UpdateWebCfg </strong>running in the <strong>Default Web
Site </strong>on my folder I would use the command shown below.
</p>
        <pre class="brush: csharp;">%msdeploy% -verb:sync -source:contentPath="C:\Data\Personal\My Repo\sayed-samples\UpdateWebConfig\web.config" -dest:contentPath="Default Web Site/UpdateWebCfg/web.config"</pre>
        <p>
From the command above you can see that I set the source content path to the local
file and the dest content path using the IIS path <strong>{SiteName}/{AppName}/{file-path}</strong>.
In this case I am updating a site running in IIS on my local machine. In order to
update one that is running on a remote machine you will have to add ComputerName and
possibly some other values to the –dest argument.
</p>
        <p>
You can view the latest sources for this sample at my github repo, link is below.
</p>
        <p>
 
</p>
        <p>
Hope that helps!
</p>
        <p>
Sayed Ibrahim Hashimi – <a href="https://twitter.com/#!/sayedihashimi">@SayedIHashimi</a></p>
        <p>
Resources:
</p>
        <ul>
          <li>
            <a href="http://stackoverflow.com/questions/8803688/is-it-possible-to-modify-web-config-of-existing-site-using-msdeploy">StackOverflow
question – How to update web.config</a>
          </li>
          <li>
            <a href="https://github.com/sayedihashimi/sayed-samples/tree/master/UpdateWebConfig">Latest
sources for this sample on my github account</a>
          </li>
        </ul>
      </body>
      <title>How to update a single file using Web Deploy (MSDeploy)</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,c3aa839b-d7dd-4847-b7ad-af347e1e86fc.aspx</guid>
      <link>http://sedodream.com/2012/02/14/HowToUpdateASingleFileUsingWebDeployMSDeploy.aspx</link>
      <pubDate>Tue, 14 Feb 2012 19:17:30 GMT</pubDate>
      <description>&lt;p&gt;
The other day I saw a question posted on StackOverflow (&lt;em&gt;link to question below
in resources section&lt;/em&gt;) asking if it was possible to update web.config using MSDeploy.
I actually used a technique where I updated a single file in one of my previous posts
at &lt;a href="http://sedodream.com/2012/01/08/HowToTakeYourWebAppOfflineDuringPublishing.aspx"&gt;How
to take your web app offline during publishing&lt;/a&gt; but it wasn’t called out too much.
In any case I’ll show you how you can update a single file (in this case web.config)
using MSDeploy.
&lt;/p&gt;
&lt;p&gt;
You can use the &lt;a href="http://technet.microsoft.com/en-us/library/dd569034(WS.10).aspx"&gt;contentPath
provider&lt;/a&gt; to facilitate updating a single file. Using contentPath you can sync
either a single file or an entire folder. You can also use IIS app paths to resolve
where the file/folder resides. For example if I have a web.config file in a local
folder named “C:\Data\Personal\My Repo\sayed-samples\UpdateWebConfig” and I want to
update my IIS site &lt;strong&gt;UpdateWebCfg &lt;/strong&gt;running in the &lt;strong&gt;Default Web
Site &lt;/strong&gt;on my folder I would use the command shown below.
&lt;/p&gt;
&lt;pre class="brush: csharp;"&gt;%msdeploy% -verb:sync -source:contentPath=&amp;quot;C:\Data\Personal\My Repo\sayed-samples\UpdateWebConfig\web.config&amp;quot; -dest:contentPath=&amp;quot;Default Web Site/UpdateWebCfg/web.config&amp;quot;&lt;/pre&gt;
&lt;p&gt;
From the command above you can see that I set the source content path to the local
file and the dest content path using the IIS path &lt;strong&gt;{SiteName}/{AppName}/{file-path}&lt;/strong&gt;.
In this case I am updating a site running in IIS on my local machine. In order to
update one that is running on a remote machine you will have to add ComputerName and
possibly some other values to the –dest argument.
&lt;/p&gt;
&lt;p&gt;
You can view the latest sources for this sample at my github repo, link is below.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Hope that helps!
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi – &lt;a href="https://twitter.com/#!/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Resources:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://stackoverflow.com/questions/8803688/is-it-possible-to-modify-web-config-of-existing-site-using-msdeploy"&gt;StackOverflow
question – How to update web.config&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/sayedihashimi/sayed-samples/tree/master/UpdateWebConfig"&gt;Latest
sources for this sample on my github account&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,c3aa839b-d7dd-4847-b7ad-af347e1e86fc.aspx</comments>
      <category>IIS</category>
      <category>MSDeploy</category>
      <category>web</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=bc2ced18-9064-4f51-9167-05ec5595291c</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,bc2ced18-9064-4f51-9167-05ec5595291c.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,bc2ced18-9064-4f51-9167-05ec5595291c.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bc2ced18-9064-4f51-9167-05ec5595291c</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I received a customer email asking how they can take their web application/site offline
for the entire duration that a publish is happening from Visual Studio. An easy way
to take your site offline is to drop an app_offline.htm file in the sites root directory.
For more info on that you can read ScottGu’s post, link in below in resources section.
Unfortunately Web Deploy itself doesn’t support this <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://sedodream.com/content/binary/Windows-Live-Writer/c7d918859eb1_A669/wlEmoticon-sadsmile_2.png" />.
If you want Web Deploy (aka MSDeploy) to natively support this feature please vote
on it at <a href="http://aspnet.uservoice.com/forums/41199-general/suggestions/2499911-take-my-site-app-offline-during-publishing">http://aspnet.uservoice.com/forums/41199-general/suggestions/2499911-take-my-site-app-offline-during-publishing</a>. 
</p>
        <p>
Since Web Deploy doesn’t support this it’s going to be a bit more difficult and it
requires us to perform the following steps:
</p>
        <ol>
          <li>
Publish app_offline.htm</li>
          <li>
Publish the app, and ensure that app_offline.htm is contained inside the payload being
published</li>
          <li>
Delete app_offline.htm</li>
        </ol>
        <p>
#1 will take the app offline before the publish process  begins. 
<br />
#2 will ensure that when we publish that app_offline.htm is not deleted (and therefore
keep the app offline) 
<br />
#3 will delete the app_offline.htm and bring the site back online
</p>
        <p>
Now that we know what needs to be done let’s look at the implementation. First for
the easy part. Create a file in your Web Application Project (WAP) named app_offline-template.htm.
This will be the file which will end up being the app_offline.htm file on your target
server. If you leave it blank your users will get a generic message stating that the
app is offline, but it would be better for you to place <strong>static HTML</strong> (<em>no
ASP.NET markup</em>) inside of that file letting users know that the site will come
back up and whatever other info you think is relevant to your users. When you add
this file you should change the Build Action to None in the Properties grid. This
will make sure that this file itself is not published/packaged. Since the file ends
in .htm it will by default be published. See the image below.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/c7d918859eb1_A669/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/c7d918859eb1_A669/image_thumb.png" width="288" height="380" />
          </a>
        </p>
        <p>
Now for the hard part. For Web Application Projects we have a hook into the publish/package
process which we refer to as “wpp.targets”. If you want to extend your publish/package
process you can create a file named {ProjectName}.wpp.targets in the same folder as
the project file itself. Here is the file which I created you can copy and paste the
content into your wpp.targets file. I will explain the significant parts but wanted
to post the entire file for your convince. <em>Note: you can grab my latest version
of this file from my github repo, the link is in the resource section below.</em></p>
        <pre class="brush: xml;">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  &lt;Target Name="InitalizeAppOffline"&gt;
    &lt;!-- 
    This property needs to be declared inside of target because this is imported before
    the MSDeployPath property is defined as well as others --&gt;
    &lt;PropertyGroup&gt;
      &lt;MSDeployExe Condition=" '$(MSDeployExe)'=='' "&gt;$(MSDeployPath)msdeploy.exe&lt;/MSDeployExe&gt;
    &lt;/PropertyGroup&gt;    
  &lt;/Target&gt;

  &lt;PropertyGroup&gt;
    &lt;PublishAppOfflineToDest&gt;
      InitalizeAppOffline;
    &lt;/PublishAppOfflineToDest&gt;
  &lt;/PropertyGroup&gt;

  &lt;!--
    %msdeploy% 
      -verb:sync 
      -source:contentPath="C:\path\to\app_offline-template.htm" 
      -dest:contentPath="Default Web Site/AppOfflineDemo/app_offline.htm"
  --&gt;

  &lt;!--***********************************************************************
  Make sure app_offline-template.htm gets published as app_offline.htm
  ***************************************************************************--&gt;
  &lt;Target Name="PublishAppOfflineToDest" 
          BeforeTargets="MSDeployPublish" 
          DependsOnTargets="$(PublishAppOfflineToDest)"&gt;
    &lt;ItemGroup&gt;
      &lt;_AoPubAppOfflineSourceProviderSetting Include="contentPath"&gt;
        &lt;Path&gt;$(MSBuildProjectDirectory)\app_offline-template.htm&lt;/Path&gt;
        &lt;EncryptPassword&gt;$(DeployEncryptKey)&lt;/EncryptPassword&gt;
        &lt;WebServerAppHostConfigDirectory&gt;$(_MSDeploySourceWebServerAppHostConfigDirectory)&lt;/WebServerAppHostConfigDirectory&gt;
        &lt;WebServerManifest&gt;$(_MSDeploySourceWebServerManifest)&lt;/WebServerManifest&gt;
        &lt;WebServerDirectory&gt;$(_MSDeploySourceWebServerDirectory)&lt;/WebServerDirectory&gt;
      &lt;/_AoPubAppOfflineSourceProviderSetting&gt;

      &lt;_AoPubAppOfflineDestProviderSetting Include="contentPath"&gt;
        &lt;Path&gt;"$(DeployIisAppPath)/app_offline.htm"&lt;/Path&gt;
        &lt;ComputerName&gt;$(_PublishMsDeployServiceUrl)&lt;/ComputerName&gt;
        &lt;UserName&gt;$(UserName)&lt;/UserName&gt;
        &lt;Password&gt;$(Password)&lt;/Password&gt;
        &lt;EncryptPassword&gt;$(DeployEncryptKey)&lt;/EncryptPassword&gt;
        &lt;IncludeAcls&gt;False&lt;/IncludeAcls&gt;
        &lt;AuthType&gt;$(AuthType)&lt;/AuthType&gt;
        &lt;WebServerAppHostConfigDirectory&gt;$(_MSDeployDestinationWebServerAppHostConfigDirectory)&lt;/WebServerAppHostConfigDirectory&gt;
        &lt;WebServerManifest&gt;$(_MSDeployDestinationWebServerManifest)&lt;/WebServerManifest&gt;
        &lt;WebServerDirectory&gt;$(_MSDeployDestinationWebServerDirectory)&lt;/WebServerDirectory&gt;
      &lt;/_AoPubAppOfflineDestProviderSetting&gt;
    &lt;/ItemGroup&gt;

    &lt;MSdeploy
          MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
          Verb="sync"
          Source="@(_AoPubAppOfflineSourceProviderSetting)"
          Destination="@(_AoPubAppOfflineDestProviderSetting)"
          EnableRule="DoNotDeleteRule"
          AllowUntrusted="$(AllowUntrustedCertificate)"
          RetryAttempts="$(RetryAttemptsForDeployment)"
          SimpleSetParameterItems="@(_AoArchivePublishSetParam)"
          ExePath="$(MSDeployPath)" /&gt;
  &lt;/Target&gt;

  &lt;!--***********************************************************************
  Make sure app_offline-template.htm gets published as app_offline.htm
  ***************************************************************************--&gt;
  &lt;!-- We need to create a replace rule for app_offline-template.htm-&gt;app_offline.htm for when the app get's published --&gt;
  &lt;ItemGroup&gt;
    &lt;!-- Make sure not to include this file if a package is being created, so condition this on publishing --&gt;
    &lt;FilesForPackagingFromProject Include="app_offline-template.htm" Condition=" '$(DeployTarget)'=='MSDeployPublish' "&gt;
      &lt;DestinationRelativePath&gt;app_offline.htm&lt;/DestinationRelativePath&gt;
    &lt;/FilesForPackagingFromProject&gt;

    &lt;!-- This will prevent app_offline-template.htm from being published --&gt;
    &lt;MsDeploySkipRules Include="SkipAppOfflineTemplate"&gt;
      &lt;ObjectName&gt;filePath&lt;/ObjectName&gt;
      &lt;AbsolutePath&gt;app_offline-template.htm&lt;/AbsolutePath&gt;
    &lt;/MsDeploySkipRules&gt;
  &lt;/ItemGroup&gt;

  &lt;!--***********************************************************************
  When publish is completed we need to delete the app_offline.htm
  ***************************************************************************--&gt;
  &lt;Target Name="DeleteAppOffline" AfterTargets="MSDeployPublish"&gt;
    &lt;!--
    %msdeploy% 
      -verb:delete 
      -dest:contentPath="{IIS-Path}/app_offline.htm",computerName="...",username="...",password="..."
    --&gt;
    &lt;Message Text="************************************************************************" /&gt;
    &lt;Message Text="Calling MSDeploy to delete the app_offline.htm file" Importance="high" /&gt;
    &lt;Message Text="************************************************************************" /&gt;

    &lt;ItemGroup&gt;
      &lt;_AoDeleteAppOfflineDestProviderSetting Include="contentPath"&gt;
        &lt;Path&gt;$(DeployIisAppPath)/app_offline.htm&lt;/Path&gt;
        &lt;ComputerName&gt;$(_PublishMsDeployServiceUrl)&lt;/ComputerName&gt;
        &lt;UserName&gt;$(UserName)&lt;/UserName&gt;
        &lt;Password&gt;$(Password)&lt;/Password&gt;
        &lt;EncryptPassword&gt;$(DeployEncryptKey)&lt;/EncryptPassword&gt;
        &lt;AuthType&gt;$(AuthType)&lt;/AuthType&gt;
        &lt;WebServerAppHostConfigDirectory&gt;$(_MSDeployDestinationWebServerAppHostConfigDirectory)&lt;/WebServerAppHostConfigDirectory&gt;
        &lt;WebServerManifest&gt;$(_MSDeployDestinationWebServerManifest)&lt;/WebServerManifest&gt;
        &lt;WebServerDirectory&gt;$(_MSDeployDestinationWebServerDirectory)&lt;/WebServerDirectory&gt;
      &lt;/_AoDeleteAppOfflineDestProviderSetting&gt;
    &lt;/ItemGroup&gt;
    
    &lt;!-- 
    We cannot use the MSDeploy/VSMSDeploy tasks for delete so we have to call msdeploy.exe directly.
    When they support delete we can just pass in @(_AoDeleteAppOfflineDestProviderSetting) as the dest
    --&gt;
    &lt;PropertyGroup&gt;
      &lt;_Cmd&gt;"$(MSDeployExe)" -verb:delete -dest:contentPath="%(_AoDeleteAppOfflineDestProviderSetting.Path)"&lt;/_Cmd&gt;
      &lt;_Cmd Condition=" '%(_AoDeleteAppOfflineDestProviderSetting.ComputerName)' != '' "&gt;$(_Cmd),computerName="%(_AoDeleteAppOfflineDestProviderSetting.ComputerName)"&lt;/_Cmd&gt;
      &lt;_Cmd Condition=" '%(_AoDeleteAppOfflineDestProviderSetting.UserName)' != '' "&gt;$(_Cmd),username="%(_AoDeleteAppOfflineDestProviderSetting.UserName)"&lt;/_Cmd&gt;
      &lt;_Cmd Condition=" '%(_AoDeleteAppOfflineDestProviderSetting.Password)' != ''"&gt;$(_Cmd),password=$(Password)&lt;/_Cmd&gt;
      &lt;_Cmd Condition=" '%(_AoDeleteAppOfflineDestProviderSetting.AuthType)' != ''"&gt;$(_Cmd),authType="%(_AoDeleteAppOfflineDestProviderSetting.AuthType)"&lt;/_Cmd&gt;
    &lt;/PropertyGroup&gt;

    &lt;Exec Command="$(_Cmd)"/&gt;
  &lt;/Target&gt;  
&lt;/Project&gt;</pre>
        <h3>#1 Publish app_offline.htm
</h3>
        <p>
The implementation for #1 is contained inside the target PublishAppOfflineToDest.
The msdeploy.exe command that we need to get executed is.
</p>
        <p>
          <strong>msdeploy.exe 
<br />
    -source:contentPath='C:\Data\Personal\My Repo\sayed-samples\AppOfflineDemo01\AppOfflineDemo01\app_offline-template.htm' 
<br />
    -dest:contentPath='"Default Web Site/AppOfflineDemo/app_offline.htm"',UserName='sayedha',Password='password-here',ComputerName='computername-here',IncludeAcls='False',AuthType='NTLM'
-verb:sync -enableRule:DoNotDeleteRule</strong>
        </p>
        <p>
In order to do this I will leverage the MSDeploy task. Inside of the PublishAppOfflineToDest
target you can see how this is accomplished by creating an item for both the source
and destination.
</p>
        <h3>#2 Publish the app, and ensure that app_offline.htm is contained inside the payload
being published
</h3>
        <p>
This part is accomplished by the fragment
</p>
        <pre class="brush: xml;">  &lt;!--***********************************************************************
  Make sure app_offline-template.htm gets published as app_offline.htm
  ***************************************************************************--&gt;
  &lt;!-- We need to create a replace rule for app_offline-template.htm-&gt;app_offline.htm for when the app get's published --&gt;
  &lt;ItemGroup&gt;
    &lt;!-- Make sure not to include this file if a package is being created, so condition this on publishing --&gt;
    &lt;FilesForPackagingFromProject Include="app_offline-template.htm" Condition=" '$(DeployTarget)'=='MSDeployPublish' "&gt;
      &lt;DestinationRelativePath&gt;app_offline.htm&lt;/DestinationRelativePath&gt;
    &lt;/FilesForPackagingFromProject&gt;

    &lt;!-- This will prevent app_offline-template.htm from being published --&gt;
    &lt;MsDeploySkipRules Include="SkipAppOfflineTemplate"&gt;
      &lt;ObjectName&gt;filePath&lt;/ObjectName&gt;
      &lt;AbsolutePath&gt;app_offline-template.htm&lt;/AbsolutePath&gt;
    &lt;/MsDeploySkipRules&gt;
  &lt;/ItemGroup&gt;</pre>
        <p>
The item value for FilesForPackagingFromProject here will convert your app_offline-template.htm
to app_offline.htm in the folder from where the publish will be processed. Also there
is a condition on it so that it only happens during publish and not packaging. We
do not want app_offline-template.htm to be in the package (<em>but it’s not the end
of the world if it does either</em>).
</p>
        <p>
The element for MsDeploySkiprules will make sure that app_offline-template.htm itself
doesn’t get published. This may not be required but it shouldn’t hurt.
</p>
        <h3>#3 Delete app_offline.htm
</h3>
        <p>
Now that our app is published we need to delete the app_offline.htm file from the
dest web app. The msdeploy.exe command would be:
</p>
        <p>
%msdeploy% 
<br />
      -verb:delete 
<br />
      -dest:contentPath="{IIS-Path}/app_offline.htm",computerName="...",username="...",password="..." 
<br /></p>
        <p>
This is implemented inside of the DeleteAppOffline target. This target will automatically
get executed after the publish because I have included the attribute <strong>AfterTargets=”MSDeployPublish”</strong>.
In that target you can see that I am building up the msdeploy.exe command directly,
it looks like the MSDeploy task doesn’t support the delete verb. 
</p>
        <p>
If you do try this out please let me know if you run into any issues. I am thinking
to create a Nuget package from this so that you can just install that package. That
would take a bit of work so please let me know if you are interested in that.
</p>
        <h3>Resources
</h3>
        <ol>
          <li>
            <a href="https://github.com/sayedihashimi/sayed-samples/blob/master/AppOfflineDemo01/AppOfflineDemo01/AppOfflineDemo01.wpp.targets">The
latest version of my AppOffline wpp.targets file.</a>
          </li>
          <li>
            <a href="http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx">ScottGu’s
blog on app_offline.htm</a>
          </li>
        </ol>
        <p>
 
</p>
        <p>
Sayed Ibrahim Hashimi <a href="https://twitter.com/#!/sayedihashimi">@SayedIHashimi</a></p>
      </body>
      <title>How to take your web app offline during publishing</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,bc2ced18-9064-4f51-9167-05ec5595291c.aspx</guid>
      <link>http://sedodream.com/2012/01/08/HowToTakeYourWebAppOfflineDuringPublishing.aspx</link>
      <pubDate>Sun, 08 Jan 2012 20:44:39 GMT</pubDate>
      <description>&lt;p&gt;
I received a customer email asking how they can take their web application/site offline
for the entire duration that a publish is happening from Visual Studio. An easy way
to take your site offline is to drop an app_offline.htm file in the sites root directory.
For more info on that you can read ScottGu’s post, link in below in resources section.
Unfortunately Web Deploy itself doesn’t support this &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-sadsmile" alt="Sad smile" src="http://sedodream.com/content/binary/Windows-Live-Writer/c7d918859eb1_A669/wlEmoticon-sadsmile_2.png" /&gt;.
If you want Web Deploy (aka MSDeploy) to natively support this feature please vote
on it at &lt;a href="http://aspnet.uservoice.com/forums/41199-general/suggestions/2499911-take-my-site-app-offline-during-publishing"&gt;http://aspnet.uservoice.com/forums/41199-general/suggestions/2499911-take-my-site-app-offline-during-publishing&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
Since Web Deploy doesn’t support this it’s going to be a bit more difficult and it
requires us to perform the following steps:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Publish app_offline.htm&lt;/li&gt;
&lt;li&gt;
Publish the app, and ensure that app_offline.htm is contained inside the payload being
published&lt;/li&gt;
&lt;li&gt;
Delete app_offline.htm&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
#1 will take the app offline before the publish process&amp;#160; begins. 
&lt;br /&gt;
#2 will ensure that when we publish that app_offline.htm is not deleted (and therefore
keep the app offline) 
&lt;br /&gt;
#3 will delete the app_offline.htm and bring the site back online
&lt;/p&gt;
&lt;p&gt;
Now that we know what needs to be done let’s look at the implementation. First for
the easy part. Create a file in your Web Application Project (WAP) named app_offline-template.htm.
This will be the file which will end up being the app_offline.htm file on your target
server. If you leave it blank your users will get a generic message stating that the
app is offline, but it would be better for you to place &lt;strong&gt;static HTML&lt;/strong&gt; (&lt;em&gt;no
ASP.NET markup&lt;/em&gt;) inside of that file letting users know that the site will come
back up and whatever other info you think is relevant to your users. When you add
this file you should change the Build Action to None in the Properties grid. This
will make sure that this file itself is not published/packaged. Since the file ends
in .htm it will by default be published. See the image below.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/c7d918859eb1_A669/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://sedodream.com/content/binary/Windows-Live-Writer/c7d918859eb1_A669/image_thumb.png" width="288" height="380" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Now for the hard part. For Web Application Projects we have a hook into the publish/package
process which we refer to as “wpp.targets”. If you want to extend your publish/package
process you can create a file named {ProjectName}.wpp.targets in the same folder as
the project file itself. Here is the file which I created you can copy and paste the
content into your wpp.targets file. I will explain the significant parts but wanted
to post the entire file for your convince. &lt;em&gt;Note: you can grab my latest version
of this file from my github repo, the link is in the resource section below.&lt;/em&gt;
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;Project xmlns=&amp;quot;http://schemas.microsoft.com/developer/msbuild/2003&amp;quot;&amp;gt;
  &amp;lt;Target Name=&amp;quot;InitalizeAppOffline&amp;quot;&amp;gt;
    &amp;lt;!-- 
    This property needs to be declared inside of target because this is imported before
    the MSDeployPath property is defined as well as others --&amp;gt;
    &amp;lt;PropertyGroup&amp;gt;
      &amp;lt;MSDeployExe Condition=&amp;quot; '$(MSDeployExe)'=='' &amp;quot;&amp;gt;$(MSDeployPath)msdeploy.exe&amp;lt;/MSDeployExe&amp;gt;
    &amp;lt;/PropertyGroup&amp;gt;    
  &amp;lt;/Target&amp;gt;

  &amp;lt;PropertyGroup&amp;gt;
    &amp;lt;PublishAppOfflineToDest&amp;gt;
      InitalizeAppOffline;
    &amp;lt;/PublishAppOfflineToDest&amp;gt;
  &amp;lt;/PropertyGroup&amp;gt;

  &amp;lt;!--
    %msdeploy% 
      -verb:sync 
      -source:contentPath=&amp;quot;C:\path\to\app_offline-template.htm&amp;quot; 
      -dest:contentPath=&amp;quot;Default Web Site/AppOfflineDemo/app_offline.htm&amp;quot;
  --&amp;gt;

  &amp;lt;!--***********************************************************************
  Make sure app_offline-template.htm gets published as app_offline.htm
  ***************************************************************************--&amp;gt;
  &amp;lt;Target Name=&amp;quot;PublishAppOfflineToDest&amp;quot; 
          BeforeTargets=&amp;quot;MSDeployPublish&amp;quot; 
          DependsOnTargets=&amp;quot;$(PublishAppOfflineToDest)&amp;quot;&amp;gt;
    &amp;lt;ItemGroup&amp;gt;
      &amp;lt;_AoPubAppOfflineSourceProviderSetting Include=&amp;quot;contentPath&amp;quot;&amp;gt;
        &amp;lt;Path&amp;gt;$(MSBuildProjectDirectory)\app_offline-template.htm&amp;lt;/Path&amp;gt;
        &amp;lt;EncryptPassword&amp;gt;$(DeployEncryptKey)&amp;lt;/EncryptPassword&amp;gt;
        &amp;lt;WebServerAppHostConfigDirectory&amp;gt;$(_MSDeploySourceWebServerAppHostConfigDirectory)&amp;lt;/WebServerAppHostConfigDirectory&amp;gt;
        &amp;lt;WebServerManifest&amp;gt;$(_MSDeploySourceWebServerManifest)&amp;lt;/WebServerManifest&amp;gt;
        &amp;lt;WebServerDirectory&amp;gt;$(_MSDeploySourceWebServerDirectory)&amp;lt;/WebServerDirectory&amp;gt;
      &amp;lt;/_AoPubAppOfflineSourceProviderSetting&amp;gt;

      &amp;lt;_AoPubAppOfflineDestProviderSetting Include=&amp;quot;contentPath&amp;quot;&amp;gt;
        &amp;lt;Path&amp;gt;&amp;quot;$(DeployIisAppPath)/app_offline.htm&amp;quot;&amp;lt;/Path&amp;gt;
        &amp;lt;ComputerName&amp;gt;$(_PublishMsDeployServiceUrl)&amp;lt;/ComputerName&amp;gt;
        &amp;lt;UserName&amp;gt;$(UserName)&amp;lt;/UserName&amp;gt;
        &amp;lt;Password&amp;gt;$(Password)&amp;lt;/Password&amp;gt;
        &amp;lt;EncryptPassword&amp;gt;$(DeployEncryptKey)&amp;lt;/EncryptPassword&amp;gt;
        &amp;lt;IncludeAcls&amp;gt;False&amp;lt;/IncludeAcls&amp;gt;
        &amp;lt;AuthType&amp;gt;$(AuthType)&amp;lt;/AuthType&amp;gt;
        &amp;lt;WebServerAppHostConfigDirectory&amp;gt;$(_MSDeployDestinationWebServerAppHostConfigDirectory)&amp;lt;/WebServerAppHostConfigDirectory&amp;gt;
        &amp;lt;WebServerManifest&amp;gt;$(_MSDeployDestinationWebServerManifest)&amp;lt;/WebServerManifest&amp;gt;
        &amp;lt;WebServerDirectory&amp;gt;$(_MSDeployDestinationWebServerDirectory)&amp;lt;/WebServerDirectory&amp;gt;
      &amp;lt;/_AoPubAppOfflineDestProviderSetting&amp;gt;
    &amp;lt;/ItemGroup&amp;gt;

    &amp;lt;MSdeploy
          MSDeployVersionsToTry=&amp;quot;$(_MSDeployVersionsToTry)&amp;quot;
          Verb=&amp;quot;sync&amp;quot;
          Source=&amp;quot;@(_AoPubAppOfflineSourceProviderSetting)&amp;quot;
          Destination=&amp;quot;@(_AoPubAppOfflineDestProviderSetting)&amp;quot;
          EnableRule=&amp;quot;DoNotDeleteRule&amp;quot;
          AllowUntrusted=&amp;quot;$(AllowUntrustedCertificate)&amp;quot;
          RetryAttempts=&amp;quot;$(RetryAttemptsForDeployment)&amp;quot;
          SimpleSetParameterItems=&amp;quot;@(_AoArchivePublishSetParam)&amp;quot;
          ExePath=&amp;quot;$(MSDeployPath)&amp;quot; /&amp;gt;
  &amp;lt;/Target&amp;gt;

  &amp;lt;!--***********************************************************************
  Make sure app_offline-template.htm gets published as app_offline.htm
  ***************************************************************************--&amp;gt;
  &amp;lt;!-- We need to create a replace rule for app_offline-template.htm-&amp;gt;app_offline.htm for when the app get's published --&amp;gt;
  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;!-- Make sure not to include this file if a package is being created, so condition this on publishing --&amp;gt;
    &amp;lt;FilesForPackagingFromProject Include=&amp;quot;app_offline-template.htm&amp;quot; Condition=&amp;quot; '$(DeployTarget)'=='MSDeployPublish' &amp;quot;&amp;gt;
      &amp;lt;DestinationRelativePath&amp;gt;app_offline.htm&amp;lt;/DestinationRelativePath&amp;gt;
    &amp;lt;/FilesForPackagingFromProject&amp;gt;

    &amp;lt;!-- This will prevent app_offline-template.htm from being published --&amp;gt;
    &amp;lt;MsDeploySkipRules Include=&amp;quot;SkipAppOfflineTemplate&amp;quot;&amp;gt;
      &amp;lt;ObjectName&amp;gt;filePath&amp;lt;/ObjectName&amp;gt;
      &amp;lt;AbsolutePath&amp;gt;app_offline-template.htm&amp;lt;/AbsolutePath&amp;gt;
    &amp;lt;/MsDeploySkipRules&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;

  &amp;lt;!--***********************************************************************
  When publish is completed we need to delete the app_offline.htm
  ***************************************************************************--&amp;gt;
  &amp;lt;Target Name=&amp;quot;DeleteAppOffline&amp;quot; AfterTargets=&amp;quot;MSDeployPublish&amp;quot;&amp;gt;
    &amp;lt;!--
    %msdeploy% 
      -verb:delete 
      -dest:contentPath=&amp;quot;{IIS-Path}/app_offline.htm&amp;quot;,computerName=&amp;quot;...&amp;quot;,username=&amp;quot;...&amp;quot;,password=&amp;quot;...&amp;quot;
    --&amp;gt;
    &amp;lt;Message Text=&amp;quot;************************************************************************&amp;quot; /&amp;gt;
    &amp;lt;Message Text=&amp;quot;Calling MSDeploy to delete the app_offline.htm file&amp;quot; Importance=&amp;quot;high&amp;quot; /&amp;gt;
    &amp;lt;Message Text=&amp;quot;************************************************************************&amp;quot; /&amp;gt;

    &amp;lt;ItemGroup&amp;gt;
      &amp;lt;_AoDeleteAppOfflineDestProviderSetting Include=&amp;quot;contentPath&amp;quot;&amp;gt;
        &amp;lt;Path&amp;gt;$(DeployIisAppPath)/app_offline.htm&amp;lt;/Path&amp;gt;
        &amp;lt;ComputerName&amp;gt;$(_PublishMsDeployServiceUrl)&amp;lt;/ComputerName&amp;gt;
        &amp;lt;UserName&amp;gt;$(UserName)&amp;lt;/UserName&amp;gt;
        &amp;lt;Password&amp;gt;$(Password)&amp;lt;/Password&amp;gt;
        &amp;lt;EncryptPassword&amp;gt;$(DeployEncryptKey)&amp;lt;/EncryptPassword&amp;gt;
        &amp;lt;AuthType&amp;gt;$(AuthType)&amp;lt;/AuthType&amp;gt;
        &amp;lt;WebServerAppHostConfigDirectory&amp;gt;$(_MSDeployDestinationWebServerAppHostConfigDirectory)&amp;lt;/WebServerAppHostConfigDirectory&amp;gt;
        &amp;lt;WebServerManifest&amp;gt;$(_MSDeployDestinationWebServerManifest)&amp;lt;/WebServerManifest&amp;gt;
        &amp;lt;WebServerDirectory&amp;gt;$(_MSDeployDestinationWebServerDirectory)&amp;lt;/WebServerDirectory&amp;gt;
      &amp;lt;/_AoDeleteAppOfflineDestProviderSetting&amp;gt;
    &amp;lt;/ItemGroup&amp;gt;
    
    &amp;lt;!-- 
    We cannot use the MSDeploy/VSMSDeploy tasks for delete so we have to call msdeploy.exe directly.
    When they support delete we can just pass in @(_AoDeleteAppOfflineDestProviderSetting) as the dest
    --&amp;gt;
    &amp;lt;PropertyGroup&amp;gt;
      &amp;lt;_Cmd&amp;gt;&amp;quot;$(MSDeployExe)&amp;quot; -verb:delete -dest:contentPath=&amp;quot;%(_AoDeleteAppOfflineDestProviderSetting.Path)&amp;quot;&amp;lt;/_Cmd&amp;gt;
      &amp;lt;_Cmd Condition=&amp;quot; '%(_AoDeleteAppOfflineDestProviderSetting.ComputerName)' != '' &amp;quot;&amp;gt;$(_Cmd),computerName=&amp;quot;%(_AoDeleteAppOfflineDestProviderSetting.ComputerName)&amp;quot;&amp;lt;/_Cmd&amp;gt;
      &amp;lt;_Cmd Condition=&amp;quot; '%(_AoDeleteAppOfflineDestProviderSetting.UserName)' != '' &amp;quot;&amp;gt;$(_Cmd),username=&amp;quot;%(_AoDeleteAppOfflineDestProviderSetting.UserName)&amp;quot;&amp;lt;/_Cmd&amp;gt;
      &amp;lt;_Cmd Condition=&amp;quot; '%(_AoDeleteAppOfflineDestProviderSetting.Password)' != ''&amp;quot;&amp;gt;$(_Cmd),password=$(Password)&amp;lt;/_Cmd&amp;gt;
      &amp;lt;_Cmd Condition=&amp;quot; '%(_AoDeleteAppOfflineDestProviderSetting.AuthType)' != ''&amp;quot;&amp;gt;$(_Cmd),authType=&amp;quot;%(_AoDeleteAppOfflineDestProviderSetting.AuthType)&amp;quot;&amp;lt;/_Cmd&amp;gt;
    &amp;lt;/PropertyGroup&amp;gt;

    &amp;lt;Exec Command=&amp;quot;$(_Cmd)&amp;quot;/&amp;gt;
  &amp;lt;/Target&amp;gt;  
&amp;lt;/Project&amp;gt;&lt;/pre&gt;
&lt;h3&gt;#1 Publish app_offline.htm
&lt;/h3&gt;
&lt;p&gt;
The implementation for #1 is contained inside the target PublishAppOfflineToDest.
The msdeploy.exe command that we need to get executed is.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;msdeploy.exe 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; -source:contentPath='C:\Data\Personal\My Repo\sayed-samples\AppOfflineDemo01\AppOfflineDemo01\app_offline-template.htm' 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; -dest:contentPath='&amp;quot;Default Web Site/AppOfflineDemo/app_offline.htm&amp;quot;',UserName='sayedha',Password='password-here',ComputerName='computername-here',IncludeAcls='False',AuthType='NTLM'
-verb:sync -enableRule:DoNotDeleteRule&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
In order to do this I will leverage the MSDeploy task. Inside of the PublishAppOfflineToDest
target you can see how this is accomplished by creating an item for both the source
and destination.
&lt;/p&gt;
&lt;h3&gt;#2 Publish the app, and ensure that app_offline.htm is contained inside the payload
being published
&lt;/h3&gt;
&lt;p&gt;
This part is accomplished by the fragment
&lt;/p&gt;
&lt;pre class="brush: xml;"&gt;  &amp;lt;!--***********************************************************************
  Make sure app_offline-template.htm gets published as app_offline.htm
  ***************************************************************************--&amp;gt;
  &amp;lt;!-- We need to create a replace rule for app_offline-template.htm-&amp;gt;app_offline.htm for when the app get's published --&amp;gt;
  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;!-- Make sure not to include this file if a package is being created, so condition this on publishing --&amp;gt;
    &amp;lt;FilesForPackagingFromProject Include=&amp;quot;app_offline-template.htm&amp;quot; Condition=&amp;quot; '$(DeployTarget)'=='MSDeployPublish' &amp;quot;&amp;gt;
      &amp;lt;DestinationRelativePath&amp;gt;app_offline.htm&amp;lt;/DestinationRelativePath&amp;gt;
    &amp;lt;/FilesForPackagingFromProject&amp;gt;

    &amp;lt;!-- This will prevent app_offline-template.htm from being published --&amp;gt;
    &amp;lt;MsDeploySkipRules Include=&amp;quot;SkipAppOfflineTemplate&amp;quot;&amp;gt;
      &amp;lt;ObjectName&amp;gt;filePath&amp;lt;/ObjectName&amp;gt;
      &amp;lt;AbsolutePath&amp;gt;app_offline-template.htm&amp;lt;/AbsolutePath&amp;gt;
    &amp;lt;/MsDeploySkipRules&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;&lt;/pre&gt;
&lt;p&gt;
The item value for FilesForPackagingFromProject here will convert your app_offline-template.htm
to app_offline.htm in the folder from where the publish will be processed. Also there
is a condition on it so that it only happens during publish and not packaging. We
do not want app_offline-template.htm to be in the package (&lt;em&gt;but it’s not the end
of the world if it does either&lt;/em&gt;).
&lt;/p&gt;
&lt;p&gt;
The element for MsDeploySkiprules will make sure that app_offline-template.htm itself
doesn’t get published. This may not be required but it shouldn’t hurt.
&lt;/p&gt;
&lt;h3&gt;#3 Delete app_offline.htm
&lt;/h3&gt;
&lt;p&gt;
Now that our app is published we need to delete the app_offline.htm file from the
dest web app. The msdeploy.exe command would be:
&lt;/p&gt;
&lt;p&gt;
%msdeploy% 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -verb:delete 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -dest:contentPath=&amp;quot;{IIS-Path}/app_offline.htm&amp;quot;,computerName=&amp;quot;...&amp;quot;,username=&amp;quot;...&amp;quot;,password=&amp;quot;...&amp;quot; 
&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
This is implemented inside of the DeleteAppOffline target. This target will automatically
get executed after the publish because I have included the attribute &lt;strong&gt;AfterTargets=”MSDeployPublish”&lt;/strong&gt;.
In that target you can see that I am building up the msdeploy.exe command directly,
it looks like the MSDeploy task doesn’t support the delete verb. 
&lt;/p&gt;
&lt;p&gt;
If you do try this out please let me know if you run into any issues. I am thinking
to create a Nuget package from this so that you can just install that package. That
would take a bit of work so please let me know if you are interested in that.
&lt;/p&gt;
&lt;h3&gt;Resources
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/sayedihashimi/sayed-samples/blob/master/AppOfflineDemo01/AppOfflineDemo01/AppOfflineDemo01.wpp.targets"&gt;The
latest version of my AppOffline wpp.targets file.&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx"&gt;ScottGu’s
blog on app_offline.htm&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi &lt;a href="https://twitter.com/#!/sayedihashimi"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,bc2ced18-9064-4f51-9167-05ec5595291c.aspx</comments>
      <category>IIS</category>
      <category>Microsoft</category>
      <category>MSBuild</category>
      <category>MSDeploy</category>
      <category>Visual Studio 2010</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=7b98b9ee-5391-4ba5-9f64-bcbbe815035c</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,7b98b9ee-5391-4ba5-9f64-bcbbe815035c.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,7b98b9ee-5391-4ba5-9f64-bcbbe815035c.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7b98b9ee-5391-4ba5-9f64-bcbbe815035c</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>Note: I’d like to thank Tom Dykstra for helping me put this together</em>
        </p>
        <h3>Overview
</h3>
        <p>
In this tutorial you'll see how to use a <em>web deployment package</em> package to
deploy an application. A deployment package is a <em>.zip</em> file that includes
all of the content and metadata that's required to deploy an application. 
</p>
        <p>
Deployment packages are often used in enterprise environments. This is because a developer
or a continuous integration server can create the package without needing to know
things like passwords that are stored in <em>Web.config</em> files. Only the server
administrator who actually installs the package needs to know those passwords, and
that person can enter the details at installation time.
</p>
        <p>
In a smaller organization that doesn't have separate people for these roles, there's
less need for deployment packages. But you can also use deployment packages as a way
to back up and restore the state of an application. After you use a deployment package
to deploy, you can save the package,. Then if a subsequent deployment has a problem,
you can quickly and easily restore the application state to the earlier state by reinstalling
the earlier package. (This scenario is more complicated if database changes are involved,
however.)
</p>
        <p>
This tutorial shows how to use Visual Studio to create a package and IIS Manager to
install it. For information about how to create and install packages using the command
line, see <a href="http://msdn.microsoft.com/en-us/library/bb386521.aspx">ASP.NET
Deployment Content Map</a> on the MSDN web site.
</p>
        <p>
To keep things relatively simple, this example assumes you have already deployed the
application and its databases, and you only need to deploy a code update. You have
made the code update, and you are ready to deploy it first to your test environment
(IIS on your local computer) and then to your hosting provider. You have a Test build
configuration that you use for the test environment and you use the Release build
configuration for the production environment. In the example, the name of the Visual
Studio project is ContosoUniversity, and instructions for its initial deployment can
be found in a series of tutorials that will be published in December on the ASP.NET
web site. 
</p>
        <p>
The hosting provider shown, Cytanium.com, is one of many that are available, and its
use here does not constitute an endorsement or recommendation.
</p>
        <blockquote>
          <p>
            <strong>Note</strong> The following example uses separate packages for the test and
production environments, but you can also create a single deployment package that
can be used for both environments. This would require that you use Web Deploy parameters
instead of <em>Web.config</em> transformations for <em>Web.config</em> file changes
that depend on deployment destination. For information about how to use Web Deploy
parameters, see <a href="http://msdn.microsoft.com/en-us/library/ff398068.aspx">How
to: Use Parameters to Configure Deployment Settings When a Package is Installed</a>.
</p>
        </blockquote>
        <h3>Configuring the Deployment Package
</h3>
        <p>
In this section, you'll configure settings for the deployment package. Some of these
settings are the same ones that you set also for one-click publish, others are only
for deployment packages. 
</p>
        <p>
Open the <strong>Package/Publish Web</strong> tab of the <strong>Project Properties</strong> window
and select the <strong>Test</strong> build configuration.
</p>
        <p>
For this deployment you aren't making any database changes, so clear <strong>Include
all databases configured in Package/Publish SQL tab</strong>. Make sure <strong>Exclude
files from the App_Data folder</strong> is selected.
</p>
        <p>
Review the settings in the section labeled <strong>Web Deployment Package Settings</strong>:
</p>
        <ul>
          <li>
By default, deployment packages are created as <em>.zip</em> files. You don't need
to change this setting. 
</li>
          <li>
By default, deployment packages are created in the project's <em>obj\Test\Package</em> folder.
You don't need to change this setting. 
</li>
          <li>
The default IIS web application name is the name of the project with "_deploy"
appended to it. Remove that suffix. You want the application to be named just ContosoUniversity
in IIS on your computer. 
</li>
          <li>
For this tutorial you're not deploying IIS settings, so you don't need to enter a
password for that. 
</li>
        </ul>
        <p>
The <strong>Package/Publish Web</strong> tab now looks like this:
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Package_Publish_Web_tab_Test_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Package_Publish_Web_tab_Test" border="0" alt="Package_Publish_Web_tab_Test" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Package_Publish_Web_tab_Test_thumb.png" width="632" height="767" />
          </a>
        </p>
        <p>
You also need to configure settings for deploying to the production environment. Select
the <strong>Release</strong> build configuration to do that.
</p>
        <p>
Change <strong>IIS Web site/application name to use on the destination server</strong> to
a string that will serve as a reminder of what you need to do later when this value
is displayed in the IIS Manager UI: "[clear this field]". The text box on
this page won't stay cleared even if you clear it, so entering this note to yourself
will remind you to clear this value later when you deploy. When you deploy to your
hosting provider, you will connect to a site, not to a server, and in this case you
want to deploy to the root of the site.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Package_Publish_Web_tab_Release_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Package_Publish_Web_tab_Release" border="0" alt="Package_Publish_Web_tab_Release" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Package_Publish_Web_tab_Release_thumb.png" width="634" height="769" />
          </a>
        </p>
        <h4>Creating a Deployment Package for the Test Environment
</h4>
        <p>
To create a deployment package, first make sure you've selected the right build configuration.
In the <strong>Solution Configurations</strong> drop-down box, select <strong>Test</strong>.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Solution_Configurations_dropdown_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Solution_Configurations_dropdown" border="0" alt="Solution_Configurations_dropdown" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Solution_Configurations_dropdown_thumb.png" width="559" height="95" />
          </a>
        </p>
        <p>
In <strong>Solution Explorer</strong>, right-click the project that you want to build
the package for and then select <strong>Build Deployment Package</strong>.
</p>
        <p>
The <strong>Output</strong> window reports successful a build and publish (package
creation) and tells you where the package was created.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Output_Window_package_creation_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Output_Window_package_creation" border="0" alt="Output_Window_package_creation" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Output_Window_package_creation_thumb.png" width="653" height="228" />
          </a>
        </p>
        <h4>Installing the Deployment Package in the Test Environment
</h4>
        <p>
The next step is to install the deployment package in IIS on your development computer. 
</p>
        <p>
Run <strong>IIS Manager</strong>. In the <strong>Connections</strong> pane of the <strong>IIS
Manager</strong> window, expand the local server node, expand the <strong>Sites</strong> node,
and select <strong>Default Web Site</strong>. Then in the <strong>Actions</strong> pane,
click <strong>Import Application</strong>. (If you don't see an <strong>Import Application</strong> link,
the most likely reason is that you have not installed Web Deploy. You can use the <a href="http://www.microsoft.com/web/downloads/platform.aspx">Web
Platform Installer</a> to install both IIS and Web Deploy.)
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Default_Web_Site_in_inetmgr_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Default_Web_Site_in_inetmgr" border="0" alt="Default_Web_Site_in_inetmgr" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Default_Web_Site_in_inetmgr_thumb.png" width="607" height="464" />
          </a>
        </p>
        <p>
In the <strong>Select the Package</strong> wizard step, navigate to the location of
the package you just created. By default, that's the <em>obj\Test\Package</em> folder
in your ContosoUniversity project folder. (A package created with the <strong>Release</strong> build
configuration would be in <em>obj\Release\Package</em>.)
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Package_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Select_the_Package_dialog_box" border="0" alt="Select_the_Package_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Package_dialog_box_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
Click <strong>Next</strong>. The <strong>Select the Contents of the Package</strong> step
is displayed.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Contents_of_the_Package_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Select_the_Contents_of_the_Package_dialog_box" border="0" alt="Select_the_Contents_of_the_Package_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Contents_of_the_Package_dialog_box_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
Click <strong>Next</strong>. 
</p>
        <p>
The step that allows you to enter parameter values is displayed. The <strong>Application
Path</strong> value defaults to "ContosoUniversity", because that's what
you entered on the <strong>Package/Publish Web</strong> tab of the <strong>Project
Properties</strong> window.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Enter_Application_Package_Information_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Enter_Application_Package_Information_dialog_box" border="0" alt="Enter_Application_Package_Information_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Enter_Application_Package_Information_dialog_box_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
Click <strong>Next</strong>. 
</p>
        <p>
The wizard asks if you want to delete files at the destination that aren't in the
source. 
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Overwrite_Existing_Files_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Overwrite_Existing_Files_dialog_box" border="0" alt="Overwrite_Existing_Files_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Overwrite_Existing_Files_dialog_box_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
In this case you haven't deleted any files that you want to delete at the destination,
so the default (no deletions) is okay. Click <strong>Next</strong>. 
</p>
        <p>
          <strong>IIS Manager</strong> installs the package and reports its status.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_Progress_and_Summary_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Installation_Progress_and_Summary_dialog_box" border="0" alt="Installation_Progress_and_Summary_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_Progress_and_Summary_dialog_box_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
Click <strong>Finish</strong>. 
</p>
        <p>
Open a browser and run the application in test by going to the URL <code><a href="http://localhost/ContosoUniversity">http://localhost/ContosoUniversity</a></code>. 
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Instructors_page_with_separate_name_fields_Test_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Instructors_page_with_separate_name_fields_Test" border="0" alt="Instructors_page_with_separate_name_fields_Test" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Instructors_page_with_separate_name_fields_Test_thumb.png" width="653" height="336" />
          </a>
        </p>
        <h4>Installing IIS Manager for Remote Administration
</h4>
        <p>
The process for deploying to production is similar except that you create the package
using the Release build configuration, and you install it in <strong>IIS Manager</strong> using
a remote connection to the hosting provider. But first you have to install the <strong>IIS
Manager</strong> feature that facilitates remote connections.
</p>
        <p>
Click the following link to use the Web Platform Installer for this task:
</p>
        <ul>
          <li>
            <a href="http://go.microsoft.com/?linkid=9655670">IIS Manager for Remote Administration
v1.1</a>
          </li>
        </ul>
        <h4>Connecting to Your Site at the Hosting Provider
</h4>
        <p>
After you install the <strong>IIS Manager for Remote Administration</strong>, run <strong>IIS
Manager</strong>. You see a new <strong>Start Page</strong> in <strong>IIS Manager</strong> that
has several <strong>Connect to ...</strong> links in a <strong>Connection tasks</strong> box.
(These options are also available from the <strong>File</strong> menu.)
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/IIS_Manager_Remote_Admin_Start_Page_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="IIS_Manager_Remote_Admin_Start_Page" border="0" alt="IIS_Manager_Remote_Admin_Start_Page" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/IIS_Manager_Remote_Admin_Start_Page_thumb.png" width="628" height="413" />
          </a>
        </p>
        <p>
In <strong>IIS Manager</strong>, click <strong>Connect to a site</strong>. In the <strong>Specify
Site Connection Details</strong> step, enter the <strong>Server name</strong> and <strong>Site
name</strong> values that are assigned to you by your provider, and then click <strong>Next</strong>.
For a hosting account at Cytanium.com, you get the server name from <strong>Service
URL</strong> in the Visual Studio 2010 section of the welcome email. The site name
is indicated by "Site/application" in the same section of the email. 
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Specify_Site_Connection_Details_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Specify_Site_Connection_Details_dialog_box" border="0" alt="Specify_Site_Connection_Details_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Specify_Site_Connection_Details_dialog_box_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
In the <strong>Provide Credentials</strong> step, enter the user name and password
assigned by the provider, and then click <strong>Next</strong>:
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Provide_Credentials_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Provide_Credentials_dialog_box" border="0" alt="Provide_Credentials_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Provide_Credentials_dialog_box_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
You might see a <strong>Server Certificate Alert</strong> dialog box. If you're sure
that you've entered the correct server and site name, click <strong>Connect</strong>.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Server_Certificate_Alert_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Server_Certificate_Alert_dialog_box" border="0" alt="Server_Certificate_Alert_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Server_Certificate_Alert_dialog_box_thumb.png" width="402" height="289" />
          </a>
        </p>
        <p>
In the <strong>Specify a Connection Name</strong> step, click <strong>Finish</strong>.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Specify_a_Connection_Name_dialog_box_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Specify_a_Connection_Name_dialog_box" border="0" alt="Specify_a_Connection_Name_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Specify_a_Connection_Name_dialog_box_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
After <strong>IIS Manager</strong> connects to the provider's server, a <strong>New
Feature Available</strong> dialog box might appear that lists administration features
available for download. Click <strong>Cancel</strong> — you've already installed everything
you need for this deployment.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/New_Feature_Available_dialog_box_Cytanium_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="New_Feature_Available_dialog_box_Cytanium" border="0" alt="New_Feature_Available_dialog_box_Cytanium" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/New_Feature_Available_dialog_box_Cytanium_thumb.png" width="610" height="419" />
          </a>
        </p>
        <p>
After the <strong>New Feature Available</strong> box closes, the <strong>IIS Manager</strong> window
appears. There's now a node in the <strong>Connections</strong> pane for the site
at the hosting provider.
</p>
        <h4>Creating a Package for the Production Site
</h4>
        <p>
The next step is to create a deployment package for the production environment. In
the Visual Studio <strong>Solution Configurations</strong> drop-down box, select the
Release build configuration.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Solution_Configurations_dropdown_Release_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Solution_Configurations_dropdown_Release" border="0" alt="Solution_Configurations_dropdown_Release" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Solution_Configurations_dropdown_Release_thumb.png" width="554" height="93" />
          </a>
        </p>
        <p>
In <strong>Solution Explorer</strong>, right-click the <strong>ContosoUniversity</strong> project
and then select <strong>Build Deployment Package</strong>.
</p>
        <p>
The <strong>Output</strong> window reports a successful build and publish (package
creation), and it tells you that the package is created in the <em>obj\Release\Package</em> folder
in your project folder.
</p>
        <h4>Installing the Package in the Production Environment
</h4>
        <p>
Now you can install the package in the production environment. In the <strong>IIS
Manager</strong><strong>Connections</strong> pane, select the new connection you
added earlier. Then click <strong>Import Application</strong>, which will walk you
through the same process you followed earlier when you deployed to the test environment. 
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/IIS_Manager_with_provider_site_selected_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="IIS_Manager_with_provider_site_selected" border="0" alt="IIS_Manager_with_provider_site_selected" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/IIS_Manager_with_provider_site_selected_thumb.png" width="646" height="521" />
          </a>
        </p>
        <p>
In the <strong>Select the Package</strong> step, select the package that you just
created:
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Package_dialog_box_Prod_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Select_the_Package_dialog_box_Prod" border="0" alt="Select_the_Package_dialog_box_Prod" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Package_dialog_box_Prod_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
In the <strong>Select the Contents of the Package</strong> step, leave all the check
boxes selected and click <strong>Next</strong>:
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Contents_of_the_Package_dialog_box_Prod_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Select_the_Contents_of_the_Package_dialog_box_Prod" border="0" alt="Select_the_Contents_of_the_Package_dialog_box_Prod" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Contents_of_the_Package_dialog_box_Prod_thumb.png" width="650" height="500" />
          </a>
        </p>
        <p>
In the <strong>Enter Application Package Information</strong> step, clear the <strong>Application
Path</strong> and click <strong>Next</strong>:
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Enter_Application_Package_Information_dialog_box_Prod_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Enter_Application_Package_Information_dialog_box_Prod" border="0" alt="Enter_Application_Package_Information_dialog_box_Prod" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Enter_Application_Package_Information_dialog_box_Prod_thumb.png" width="641" height="491" />
          </a>
        </p>
        <p>
The wizard asks if you want to delete files at the destination that aren't in the
source. 
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Overwrite_Existing_Files_dialog_box_4.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Overwrite_Existing_Files_dialog_box" border="0" alt="Overwrite_Existing_Files_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Overwrite_Existing_Files_dialog_box_thumb_1.png" width="650" height="500" />
          </a>
        </p>
        <p>
You don't need to have anything deleted, so just click <strong>Next</strong>. 
</p>
        <p>
When you get the warning about installing to the root folder, click <strong>OK</strong>:
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_in_root_folder_warning_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Installation_in_root_folder_warning" border="0" alt="Installation_in_root_folder_warning" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_in_root_folder_warning_thumb.png" width="530" height="219" />
          </a>
        </p>
        <p>
Package installation begins. When it's done, the <strong>Installation Progress and
Summary</strong> dialog box is shown:
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_Progress_and_Summary_dialog_box_4.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Installation_Progress_and_Summary_dialog_box" border="0" alt="Installation_Progress_and_Summary_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_Progress_and_Summary_dialog_box_thumb_1.png" width="650" height="500" />
          </a>
        </p>
        <p>
Click <strong>Finish</strong>. Your application has been deployed to the hosting provider's
server, and you can test by browsing to your public site's URL.
</p>
        <p>
          <a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Instructors_page_with_separate_name_fields_Prod_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Instructors_page_with_separate_name_fields_Prod" border="0" alt="Instructors_page_with_separate_name_fields_Prod" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Instructors_page_with_separate_name_fields_Prod_thumb.png" width="616" height="294" />
          </a>
        </p>
        <p>
You've now seen how to deploy an application update by manually creating and installing
a deployment package. For information about how to create and install packages from
the command line in order to be able to integrate them into a continuous integration
process, see the <a href="http://msdn.microsoft.com/en-us/library/bb386521.aspx">ASP.NET
Deployment Content Map</a> on the MSDN web site.
</p>
        <p>
Sayed Ibrahim Hashimi – <a href="http://twitter.com/#!/sayedihashimi" target="_blank">@SayedIHashimi</a></p>
        <p>
ddd
</p>
      </body>
      <title>Using a Web Deploy package to deploy to IIS on the dev box and to a third party host</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,7b98b9ee-5391-4ba5-9f64-bcbbe815035c.aspx</guid>
      <link>http://sedodream.com/2011/11/08/UsingAWebDeployPackageToDeployToIISOnTheDevBoxAndToAThirdPartyHost.aspx</link>
      <pubDate>Tue, 08 Nov 2011 05:11:43 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;Note: I’d like to thank Tom Dykstra for helping me put this together&lt;/em&gt;
&lt;/p&gt;
&lt;h3&gt;Overview
&lt;/h3&gt;
&lt;p&gt;
In this tutorial you'll see how to use a &lt;em&gt;web deployment package&lt;/em&gt; package to
deploy an application. A deployment package is a &lt;em&gt;.zip&lt;/em&gt; file that includes
all of the content and metadata that's required to deploy an application. 
&lt;/p&gt;
&lt;p&gt;
Deployment packages are often used in enterprise environments. This is because a developer
or a continuous integration server can create the package without needing to know
things like passwords that are stored in &lt;em&gt;Web.config&lt;/em&gt; files. Only the server
administrator who actually installs the package needs to know those passwords, and
that person can enter the details at installation time.
&lt;/p&gt;
&lt;p&gt;
In a smaller organization that doesn't have separate people for these roles, there's
less need for deployment packages. But you can also use deployment packages as a way
to back up and restore the state of an application. After you use a deployment package
to deploy, you can save the package,. Then if a subsequent deployment has a problem,
you can quickly and easily restore the application state to the earlier state by reinstalling
the earlier package. (This scenario is more complicated if database changes are involved,
however.)
&lt;/p&gt;
&lt;p&gt;
This tutorial shows how to use Visual Studio to create a package and IIS Manager to
install it. For information about how to create and install packages using the command
line, see &lt;a href="http://msdn.microsoft.com/en-us/library/bb386521.aspx"&gt;ASP.NET
Deployment Content Map&lt;/a&gt; on the MSDN web site.
&lt;/p&gt;
&lt;p&gt;
To keep things relatively simple, this example assumes you have already deployed the
application and its databases, and you only need to deploy a code update. You have
made the code update, and you are ready to deploy it first to your test environment
(IIS on your local computer) and then to your hosting provider. You have a Test build
configuration that you use for the test environment and you use the Release build
configuration for the production environment. In the example, the name of the Visual
Studio project is ContosoUniversity, and instructions for its initial deployment can
be found in a series of tutorials that will be published in December on the ASP.NET
web site. 
&lt;/p&gt;
&lt;p&gt;
The hosting provider shown, Cytanium.com, is one of many that are available, and its
use here does not constitute an endorsement or recommendation.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Note&lt;/strong&gt; The following example uses separate packages for the test and
production environments, but you can also create a single deployment package that
can be used for both environments. This would require that you use Web Deploy parameters
instead of &lt;em&gt;Web.config&lt;/em&gt; transformations for &lt;em&gt;Web.config&lt;/em&gt; file changes
that depend on deployment destination. For information about how to use Web Deploy
parameters, see &lt;a href="http://msdn.microsoft.com/en-us/library/ff398068.aspx"&gt;How
to: Use Parameters to Configure Deployment Settings When a Package is Installed&lt;/a&gt;.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;h3&gt;Configuring the Deployment Package
&lt;/h3&gt;
&lt;p&gt;
In this section, you'll configure settings for the deployment package. Some of these
settings are the same ones that you set also for one-click publish, others are only
for deployment packages. 
&lt;/p&gt;
&lt;p&gt;
Open the &lt;strong&gt;Package/Publish Web&lt;/strong&gt; tab of the &lt;strong&gt;Project Properties&lt;/strong&gt; window
and select the &lt;strong&gt;Test&lt;/strong&gt; build configuration.
&lt;/p&gt;
&lt;p&gt;
For this deployment you aren't making any database changes, so clear &lt;strong&gt;Include
all databases configured in Package/Publish SQL tab&lt;/strong&gt;. Make sure &lt;strong&gt;Exclude
files from the App_Data folder&lt;/strong&gt; is selected.
&lt;/p&gt;
&lt;p&gt;
Review the settings in the section labeled &lt;strong&gt;Web Deployment Package Settings&lt;/strong&gt;:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
By default, deployment packages are created as &lt;em&gt;.zip&lt;/em&gt; files. You don't need
to change this setting. 
&lt;/li&gt;
&lt;li&gt;
By default, deployment packages are created in the project's &lt;em&gt;obj\Test\Package&lt;/em&gt; folder.
You don't need to change this setting. 
&lt;/li&gt;
&lt;li&gt;
The default IIS web application name is the name of the project with &amp;quot;_deploy&amp;quot;
appended to it. Remove that suffix. You want the application to be named just ContosoUniversity
in IIS on your computer. 
&lt;/li&gt;
&lt;li&gt;
For this tutorial you're not deploying IIS settings, so you don't need to enter a
password for that. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The &lt;strong&gt;Package/Publish Web&lt;/strong&gt; tab now looks like this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Package_Publish_Web_tab_Test_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Package_Publish_Web_tab_Test" border="0" alt="Package_Publish_Web_tab_Test" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Package_Publish_Web_tab_Test_thumb.png" width="632" height="767" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You also need to configure settings for deploying to the production environment. Select
the &lt;strong&gt;Release&lt;/strong&gt; build configuration to do that.
&lt;/p&gt;
&lt;p&gt;
Change &lt;strong&gt;IIS Web site/application name to use on the destination server&lt;/strong&gt; to
a string that will serve as a reminder of what you need to do later when this value
is displayed in the IIS Manager UI: &amp;quot;[clear this field]&amp;quot;. The text box on
this page won't stay cleared even if you clear it, so entering this note to yourself
will remind you to clear this value later when you deploy. When you deploy to your
hosting provider, you will connect to a site, not to a server, and in this case you
want to deploy to the root of the site.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Package_Publish_Web_tab_Release_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Package_Publish_Web_tab_Release" border="0" alt="Package_Publish_Web_tab_Release" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Package_Publish_Web_tab_Release_thumb.png" width="634" height="769" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h4&gt;Creating a Deployment Package for the Test Environment
&lt;/h4&gt;
&lt;p&gt;
To create a deployment package, first make sure you've selected the right build configuration.
In the &lt;strong&gt;Solution Configurations&lt;/strong&gt; drop-down box, select &lt;strong&gt;Test&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Solution_Configurations_dropdown_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Solution_Configurations_dropdown" border="0" alt="Solution_Configurations_dropdown" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Solution_Configurations_dropdown_thumb.png" width="559" height="95" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In &lt;strong&gt;Solution Explorer&lt;/strong&gt;, right-click the project that you want to build
the package for and then select &lt;strong&gt;Build Deployment Package&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
The &lt;strong&gt;Output&lt;/strong&gt; window reports successful a build and publish (package
creation) and tells you where the package was created.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Output_Window_package_creation_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Output_Window_package_creation" border="0" alt="Output_Window_package_creation" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Output_Window_package_creation_thumb.png" width="653" height="228" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h4&gt;Installing the Deployment Package in the Test Environment
&lt;/h4&gt;
&lt;p&gt;
The next step is to install the deployment package in IIS on your development computer. 
&lt;/p&gt;
&lt;p&gt;
Run &lt;strong&gt;IIS Manager&lt;/strong&gt;. In the &lt;strong&gt;Connections&lt;/strong&gt; pane of the &lt;strong&gt;IIS
Manager&lt;/strong&gt; window, expand the local server node, expand the &lt;strong&gt;Sites&lt;/strong&gt; node,
and select &lt;strong&gt;Default Web Site&lt;/strong&gt;. Then in the &lt;strong&gt;Actions&lt;/strong&gt; pane,
click &lt;strong&gt;Import Application&lt;/strong&gt;. (If you don't see an &lt;strong&gt;Import Application&lt;/strong&gt; link,
the most likely reason is that you have not installed Web Deploy. You can use the &lt;a href="http://www.microsoft.com/web/downloads/platform.aspx"&gt;Web
Platform Installer&lt;/a&gt; to install both IIS and Web Deploy.)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Default_Web_Site_in_inetmgr_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Default_Web_Site_in_inetmgr" border="0" alt="Default_Web_Site_in_inetmgr" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Default_Web_Site_in_inetmgr_thumb.png" width="607" height="464" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the &lt;strong&gt;Select the Package&lt;/strong&gt; wizard step, navigate to the location of
the package you just created. By default, that's the &lt;em&gt;obj\Test\Package&lt;/em&gt; folder
in your ContosoUniversity project folder. (A package created with the &lt;strong&gt;Release&lt;/strong&gt; build
configuration would be in &lt;em&gt;obj\Release\Package&lt;/em&gt;.)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Package_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Select_the_Package_dialog_box" border="0" alt="Select_the_Package_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Package_dialog_box_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Click &lt;strong&gt;Next&lt;/strong&gt;. The &lt;strong&gt;Select the Contents of the Package&lt;/strong&gt; step
is displayed.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Contents_of_the_Package_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Select_the_Contents_of_the_Package_dialog_box" border="0" alt="Select_the_Contents_of_the_Package_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Contents_of_the_Package_dialog_box_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Click &lt;strong&gt;Next&lt;/strong&gt;. 
&lt;/p&gt;
&lt;p&gt;
The step that allows you to enter parameter values is displayed. The &lt;strong&gt;Application
Path&lt;/strong&gt; value defaults to &amp;quot;ContosoUniversity&amp;quot;, because that's what
you entered on the &lt;strong&gt;Package/Publish Web&lt;/strong&gt; tab of the &lt;strong&gt;Project
Properties&lt;/strong&gt; window.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Enter_Application_Package_Information_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Enter_Application_Package_Information_dialog_box" border="0" alt="Enter_Application_Package_Information_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Enter_Application_Package_Information_dialog_box_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Click &lt;strong&gt;Next&lt;/strong&gt;. 
&lt;/p&gt;
&lt;p&gt;
The wizard asks if you want to delete files at the destination that aren't in the
source. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Overwrite_Existing_Files_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Overwrite_Existing_Files_dialog_box" border="0" alt="Overwrite_Existing_Files_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Overwrite_Existing_Files_dialog_box_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In this case you haven't deleted any files that you want to delete at the destination,
so the default (no deletions) is okay. Click &lt;strong&gt;Next&lt;/strong&gt;. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;IIS Manager&lt;/strong&gt; installs the package and reports its status.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_Progress_and_Summary_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Installation_Progress_and_Summary_dialog_box" border="0" alt="Installation_Progress_and_Summary_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_Progress_and_Summary_dialog_box_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Click &lt;strong&gt;Finish&lt;/strong&gt;. 
&lt;/p&gt;
&lt;p&gt;
Open a browser and run the application in test by going to the URL &lt;code&gt;&lt;a href="http://localhost/ContosoUniversity"&gt;http://localhost/ContosoUniversity&lt;/a&gt;&lt;/code&gt;. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Instructors_page_with_separate_name_fields_Test_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Instructors_page_with_separate_name_fields_Test" border="0" alt="Instructors_page_with_separate_name_fields_Test" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Instructors_page_with_separate_name_fields_Test_thumb.png" width="653" height="336" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h4&gt;Installing IIS Manager for Remote Administration
&lt;/h4&gt;
&lt;p&gt;
The process for deploying to production is similar except that you create the package
using the Release build configuration, and you install it in &lt;strong&gt;IIS Manager&lt;/strong&gt; using
a remote connection to the hosting provider. But first you have to install the &lt;strong&gt;IIS
Manager&lt;/strong&gt; feature that facilitates remote connections.
&lt;/p&gt;
&lt;p&gt;
Click the following link to use the Web Platform Installer for this task:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://go.microsoft.com/?linkid=9655670"&gt;IIS Manager for Remote Administration
v1.1&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Connecting to Your Site at the Hosting Provider
&lt;/h4&gt;
&lt;p&gt;
After you install the &lt;strong&gt;IIS Manager for Remote Administration&lt;/strong&gt;, run &lt;strong&gt;IIS
Manager&lt;/strong&gt;. You see a new &lt;strong&gt;Start Page&lt;/strong&gt; in &lt;strong&gt;IIS Manager&lt;/strong&gt; that
has several &lt;strong&gt;Connect to ...&lt;/strong&gt; links in a &lt;strong&gt;Connection tasks&lt;/strong&gt; box.
(These options are also available from the &lt;strong&gt;File&lt;/strong&gt; menu.)
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/IIS_Manager_Remote_Admin_Start_Page_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="IIS_Manager_Remote_Admin_Start_Page" border="0" alt="IIS_Manager_Remote_Admin_Start_Page" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/IIS_Manager_Remote_Admin_Start_Page_thumb.png" width="628" height="413" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In &lt;strong&gt;IIS Manager&lt;/strong&gt;, click &lt;strong&gt;Connect to a site&lt;/strong&gt;. In the &lt;strong&gt;Specify
Site Connection Details&lt;/strong&gt; step, enter the &lt;strong&gt;Server name&lt;/strong&gt; and &lt;strong&gt;Site
name&lt;/strong&gt; values that are assigned to you by your provider, and then click &lt;strong&gt;Next&lt;/strong&gt;.
For a hosting account at Cytanium.com, you get the server name from &lt;strong&gt;Service
URL&lt;/strong&gt; in the Visual Studio 2010 section of the welcome email. The site name
is indicated by &amp;quot;Site/application&amp;quot; in the same section of the email. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Specify_Site_Connection_Details_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Specify_Site_Connection_Details_dialog_box" border="0" alt="Specify_Site_Connection_Details_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Specify_Site_Connection_Details_dialog_box_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the &lt;strong&gt;Provide Credentials&lt;/strong&gt; step, enter the user name and password
assigned by the provider, and then click &lt;strong&gt;Next&lt;/strong&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Provide_Credentials_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Provide_Credentials_dialog_box" border="0" alt="Provide_Credentials_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Provide_Credentials_dialog_box_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You might see a &lt;strong&gt;Server Certificate Alert&lt;/strong&gt; dialog box. If you're sure
that you've entered the correct server and site name, click &lt;strong&gt;Connect&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Server_Certificate_Alert_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Server_Certificate_Alert_dialog_box" border="0" alt="Server_Certificate_Alert_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Server_Certificate_Alert_dialog_box_thumb.png" width="402" height="289" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the &lt;strong&gt;Specify a Connection Name&lt;/strong&gt; step, click &lt;strong&gt;Finish&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Specify_a_Connection_Name_dialog_box_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Specify_a_Connection_Name_dialog_box" border="0" alt="Specify_a_Connection_Name_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Specify_a_Connection_Name_dialog_box_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
After &lt;strong&gt;IIS Manager&lt;/strong&gt; connects to the provider's server, a &lt;strong&gt;New
Feature Available&lt;/strong&gt; dialog box might appear that lists administration features
available for download. Click &lt;strong&gt;Cancel&lt;/strong&gt; — you've already installed everything
you need for this deployment.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/New_Feature_Available_dialog_box_Cytanium_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="New_Feature_Available_dialog_box_Cytanium" border="0" alt="New_Feature_Available_dialog_box_Cytanium" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/New_Feature_Available_dialog_box_Cytanium_thumb.png" width="610" height="419" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
After the &lt;strong&gt;New Feature Available&lt;/strong&gt; box closes, the &lt;strong&gt;IIS Manager&lt;/strong&gt; window
appears. There's now a node in the &lt;strong&gt;Connections&lt;/strong&gt; pane for the site
at the hosting provider.
&lt;/p&gt;
&lt;h4&gt;Creating a Package for the Production Site
&lt;/h4&gt;
&lt;p&gt;
The next step is to create a deployment package for the production environment. In
the Visual Studio &lt;strong&gt;Solution Configurations&lt;/strong&gt; drop-down box, select the
Release build configuration.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Solution_Configurations_dropdown_Release_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Solution_Configurations_dropdown_Release" border="0" alt="Solution_Configurations_dropdown_Release" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Solution_Configurations_dropdown_Release_thumb.png" width="554" height="93" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In &lt;strong&gt;Solution Explorer&lt;/strong&gt;, right-click the &lt;strong&gt;ContosoUniversity&lt;/strong&gt; project
and then select &lt;strong&gt;Build Deployment Package&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
The &lt;strong&gt;Output&lt;/strong&gt; window reports a successful build and publish (package
creation), and it tells you that the package is created in the &lt;em&gt;obj\Release\Package&lt;/em&gt; folder
in your project folder.
&lt;/p&gt;
&lt;h4&gt;Installing the Package in the Production Environment
&lt;/h4&gt;
&lt;p&gt;
Now you can install the package in the production environment. In the &lt;strong&gt;IIS
Manager&lt;/strong&gt; &lt;strong&gt;Connections&lt;/strong&gt; pane, select the new connection you
added earlier. Then click &lt;strong&gt;Import Application&lt;/strong&gt;, which will walk you
through the same process you followed earlier when you deployed to the test environment. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/IIS_Manager_with_provider_site_selected_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="IIS_Manager_with_provider_site_selected" border="0" alt="IIS_Manager_with_provider_site_selected" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/IIS_Manager_with_provider_site_selected_thumb.png" width="646" height="521" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the &lt;strong&gt;Select the Package&lt;/strong&gt; step, select the package that you just
created:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Package_dialog_box_Prod_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Select_the_Package_dialog_box_Prod" border="0" alt="Select_the_Package_dialog_box_Prod" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Package_dialog_box_Prod_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the &lt;strong&gt;Select the Contents of the Package&lt;/strong&gt; step, leave all the check
boxes selected and click &lt;strong&gt;Next&lt;/strong&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Contents_of_the_Package_dialog_box_Prod_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Select_the_Contents_of_the_Package_dialog_box_Prod" border="0" alt="Select_the_Contents_of_the_Package_dialog_box_Prod" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Select_the_Contents_of_the_Package_dialog_box_Prod_thumb.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In the &lt;strong&gt;Enter Application Package Information&lt;/strong&gt; step, clear the &lt;strong&gt;Application
Path&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Enter_Application_Package_Information_dialog_box_Prod_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Enter_Application_Package_Information_dialog_box_Prod" border="0" alt="Enter_Application_Package_Information_dialog_box_Prod" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Enter_Application_Package_Information_dialog_box_Prod_thumb.png" width="641" height="491" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The wizard asks if you want to delete files at the destination that aren't in the
source. 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Overwrite_Existing_Files_dialog_box_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Overwrite_Existing_Files_dialog_box" border="0" alt="Overwrite_Existing_Files_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Overwrite_Existing_Files_dialog_box_thumb_1.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You don't need to have anything deleted, so just click &lt;strong&gt;Next&lt;/strong&gt;. 
&lt;/p&gt;
&lt;p&gt;
When you get the warning about installing to the root folder, click &lt;strong&gt;OK&lt;/strong&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_in_root_folder_warning_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Installation_in_root_folder_warning" border="0" alt="Installation_in_root_folder_warning" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_in_root_folder_warning_thumb.png" width="530" height="219" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Package installation begins. When it's done, the &lt;strong&gt;Installation Progress and
Summary&lt;/strong&gt; dialog box is shown:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_Progress_and_Summary_dialog_box_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Installation_Progress_and_Summary_dialog_box" border="0" alt="Installation_Progress_and_Summary_dialog_box" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Installation_Progress_and_Summary_dialog_box_thumb_1.png" width="650" height="500" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Click &lt;strong&gt;Finish&lt;/strong&gt;. Your application has been deployed to the hosting provider's
server, and you can test by browsing to your public site's URL.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Instructors_page_with_separate_name_fields_Prod_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Instructors_page_with_separate_name_fields_Prod" border="0" alt="Instructors_page_with_separate_name_fields_Prod" src="http://sedodream.com/content/binary/Windows-Live-Writer/b763f270a538_125B5/Instructors_page_with_separate_name_fields_Prod_thumb.png" width="616" height="294" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You've now seen how to deploy an application update by manually creating and installing
a deployment package. For information about how to create and install packages from
the command line in order to be able to integrate them into a continuous integration
process, see the &lt;a href="http://msdn.microsoft.com/en-us/library/bb386521.aspx"&gt;ASP.NET
Deployment Content Map&lt;/a&gt; on the MSDN web site.
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi – &lt;a href="http://twitter.com/#!/sayedihashimi" target="_blank"&gt;@SayedIHashimi&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
ddd
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,7b98b9ee-5391-4ba5-9f64-bcbbe815035c.aspx</comments>
      <category>IIS</category>
      <category>MSBuild</category>
      <category>MSDeploy</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
      <category>Web Development</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=d158f2b8-cdee-4257-86cd-401362deeff2</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,d158f2b8-cdee-4257-86cd-401362deeff2.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,d158f2b8-cdee-4257-86cd-401362deeff2.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d158f2b8-cdee-4257-86cd-401362deeff2</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Back in November I participated in <a href="http://virtualtechdays.com/">Virtual Tech
Days</a> which is an online conference presented by Microsoft. In the session I discussed
the enhancements to web deployment using Visual Studio 2010 and MSDeploy. Some of
the topics which I covered includ:
</p>
        <ul>
          <li>
web.conig (XDT) transforms 
</li>
          <li>
How to publish to local file system using Visual Studio 
</li>
          <li>
How to publish to a 3rd party host using Visual Studio via MSDeploy 
</li>
          <li>
How to publish to local IIS server using the .cmd file generated by Visual Studio 
</li>
          <li>
How to use msdeploy.exe to delete IIS applications 
</li>
          <li>
How to use the IIS Manager to import web packages 
</li>
          <li>
How to use msdeploy.exe to deploy a web package to the local IIS server 
</li>
          <li>
How to use msdeploy.exe to deploy a web package to a remove IIS server 
</li>
          <li>
How to use msdeploy.exe to deploy a web package &amp; set parameters using SetParameters.xml
to a remote IIS server 
</li>
        </ul>
        <p>
You can download the video &amp; all of my sample files at <a href="http://virtualtechdays.com/pastevents_2010november.aspx">http://virtualtechdays.com/pastevents_2010november.aspx</a>.
In the samples you will find all of the scripts that I used and a bunch of others
which I didn’t have time to cover. Enjoy!
</p>
        <p>
Sayed Ibrahim Hashimi <a href="http://twitter.com/sayedihashimi">@sayedihashimi</a></p>
      </body>
      <title>Video on Web Deployment using Visual Studio 2010 and MSDeploy</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,d158f2b8-cdee-4257-86cd-401362deeff2.aspx</guid>
      <link>http://sedodream.com/2011/01/08/VideoOnWebDeploymentUsingVisualStudio2010AndMSDeploy.aspx</link>
      <pubDate>Sat, 08 Jan 2011 20:34:08 GMT</pubDate>
      <description>
&lt;p&gt;
Back in November I participated in &lt;a href="http://virtualtechdays.com/"&gt;Virtual Tech
Days&lt;/a&gt; which is an online conference presented by Microsoft. In the session I discussed
the enhancements to web deployment using Visual Studio 2010 and MSDeploy. Some of
the topics which I covered includ:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
web.conig (XDT) transforms 
&lt;/li&gt;
&lt;li&gt;
How to publish to local file system using Visual Studio 
&lt;/li&gt;
&lt;li&gt;
How to publish to a 3rd party host using Visual Studio via MSDeploy 
&lt;/li&gt;
&lt;li&gt;
How to publish to local IIS server using the .cmd file generated by Visual Studio 
&lt;/li&gt;
&lt;li&gt;
How to use msdeploy.exe to delete IIS applications 
&lt;/li&gt;
&lt;li&gt;
How to use the IIS Manager to import web packages 
&lt;/li&gt;
&lt;li&gt;
How to use msdeploy.exe to deploy a web package to the local IIS server 
&lt;/li&gt;
&lt;li&gt;
How to use msdeploy.exe to deploy a web package to a remove IIS server 
&lt;/li&gt;
&lt;li&gt;
How to use msdeploy.exe to deploy a web package &amp;amp; set parameters using SetParameters.xml
to a remote IIS server 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
You can download the video &amp;amp; all of my sample files at &lt;a href="http://virtualtechdays.com/pastevents_2010november.aspx"&gt;http://virtualtechdays.com/pastevents_2010november.aspx&lt;/a&gt;.
In the samples you will find all of the scripts that I used and a bunch of others
which I didn’t have time to cover. Enjoy!
&lt;/p&gt;
&lt;p&gt;
Sayed Ibrahim Hashimi &lt;a href="http://twitter.com/sayedihashimi"&gt;@sayedihashimi&lt;/a&gt;
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,d158f2b8-cdee-4257-86cd-401362deeff2.aspx</comments>
      <category>Config-Transformation</category>
      <category>IIS</category>
      <category>MSBuild</category>
      <category>MSDeploy</category>
      <category>speaking</category>
      <category>Visual Studio</category>
      <category>Visual Studio 2010</category>
      <category>web</category>
      <category>Web Deployment Tool</category>
      <category>Web Development</category>
      <category>Web Publishing Pipeline</category>
    </item>
    <item>
      <trackback:ping>http://sedodream.com/Trackback.aspx?guid=610e67fd-a3e6-41cd-bab4-1e462ae76e8b</trackback:ping>
      <pingback:server>http://sedodream.com/pingback.aspx</pingback:server>
      <pingback:target>http://sedodream.com/PermaLink,guid,610e67fd-a3e6-41cd-bab4-1e462ae76e8b.aspx</pingback:target>
      <dc:creator>Ibrahim</dc:creator>
      <wfw:comment>http://sedodream.com/CommentView,guid,610e67fd-a3e6-41cd-bab4-1e462ae76e8b.aspx</wfw:comment>
      <wfw:commentRss>http://sedodream.com/SyndicationService.asmx/GetEntryCommentsRss?guid=610e67fd-a3e6-41cd-bab4-1e462ae76e8b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you are doing any kind of web development and you are not familiar with the <a href="http://www.microsoft.com/web/downloads/platform.aspx">Web
Platform Installer</a>(WPI) then you need to take a look at it. I just installed <a href="http://wordpress.org/">WordPress</a> on
IIS 7 with just a few clicks and  filled in a few text boxes. When you install <a href="http://wordpress.org/">WordPress</a> there
are some prerequisites like <a href="http://www.mysql.com/">mySql</a> and <a href="http://www.php.net/">php</a>.
The WPI was smart enough to realize that I had neither installed, downloaded those,
installed them and configured them. I was prompted for some info for those tools of
course. I’ve also installed a few other apps using the WPI like, <a href="http://www.iis.net/download/WebDeploy">MSDeploy</a> and <a href="http://www.dasblog.info/">dasBlog</a> and
I didn’t have any issues what so ever.
</p>
        <p>
When using the WPI there are two main categories that can be installed, <em>Web Platform</em> and <em>Web
Applications</em>. The Web Platform category includes items like frameworks (i.e.
ASP.NET, PHP), Database (i.e. mySql) and other high level shared components. The Web
Applications includes various web applications. Some others that I didn’t list previously
include; <a href="http://www.dotnetnuke.com/">DotNetNuke</a>, <a href="http://www.nopcommerce.com/">nopCommerce</a>,
and <a href="http://umbraco.org/">umbarco</a> just to name a few. I’m not sure how
many apps are available but it looks like at least 50.
</p>
        <p>
If you are an app creator and would like to share your app then you can visit the <a href="http://www.microsoft.com/web/gallery/developer.aspx">WPI
Developer</a> page for a starting point.
</p>
      </body>
      <title>Installing web apps made easy: Web Platform Installer</title>
      <guid isPermaLink="false">http://sedodream.com/PermaLink,guid,610e67fd-a3e6-41cd-bab4-1e462ae76e8b.aspx</guid>
      <link>http://sedodream.com/2010/06/07/InstallingWebAppsMadeEasyWebPlatformInstaller.aspx</link>
      <pubDate>Mon, 07 Jun 2010 03:17:01 GMT</pubDate>
      <description>&lt;p&gt;
If you are doing any kind of web development and you are not familiar with the &lt;a href="http://www.microsoft.com/web/downloads/platform.aspx"&gt;Web
Platform Installer&lt;/a&gt;(WPI) then you need to take a look at it. I just installed &lt;a href="http://wordpress.org/"&gt;WordPress&lt;/a&gt; on
IIS 7 with just a few clicks and&amp;#160; filled in a few text boxes. When you install &lt;a href="http://wordpress.org/"&gt;WordPress&lt;/a&gt; there
are some prerequisites like &lt;a href="http://www.mysql.com/"&gt;mySql&lt;/a&gt; and &lt;a href="http://www.php.net/"&gt;php&lt;/a&gt;.
The WPI was smart enough to realize that I had neither installed, downloaded those,
installed them and configured them. I was prompted for some info for those tools of
course. I’ve also installed a few other apps using the WPI like, &lt;a href="http://www.iis.net/download/WebDeploy"&gt;MSDeploy&lt;/a&gt; and &lt;a href="http://www.dasblog.info/"&gt;dasBlog&lt;/a&gt; and
I didn’t have any issues what so ever.
&lt;/p&gt;
&lt;p&gt;
When using the WPI there are two main categories that can be installed, &lt;em&gt;Web Platform&lt;/em&gt; and &lt;em&gt;Web
Applications&lt;/em&gt;. The Web Platform category includes items like frameworks (i.e.
ASP.NET, PHP), Database (i.e. mySql) and other high level shared components. The Web
Applications includes various web applications. Some others that I didn’t list previously
include; &lt;a href="http://www.dotnetnuke.com/"&gt;DotNetNuke&lt;/a&gt;, &lt;a href="http://www.nopcommerce.com/"&gt;nopCommerce&lt;/a&gt;,
and &lt;a href="http://umbraco.org/"&gt;umbarco&lt;/a&gt; just to name a few. I’m not sure how
many apps are available but it looks like at least 50.
&lt;/p&gt;
&lt;p&gt;
If you are an app creator and would like to share your app then you can visit the &lt;a href="http://www.microsoft.com/web/gallery/developer.aspx"&gt;WPI
Developer&lt;/a&gt; page for a starting point.
&lt;/p&gt;</description>
      <comments>http://sedodream.com/CommentView,guid,610e67fd-a3e6-41cd-bab4-1e462ae76e8b.aspx</comments>
      <category>Deployment</category>
      <category>IIS</category>
      <category>MSDeploy</category>
      <category>web</category>
      <category>Web Platform Installer</category>
    </item>
  </channel>
</rss>