Browse Source

Added the .NET Nancy framework

Added the .NET Nancy framework to the benchmark suite.

This is based off the `aspnet` and `servicestack` examples and
implements the first three benchmark cases (json, single db query, and
multi db query) using the MySQL backend.
Kevin Pullin 12 years ago
parent
commit
7d14f72885
58 changed files with 10780 additions and 0 deletions
  1. 4 0
      nancy/.gitignore
  2. 66 0
      nancy/README.md
  3. 0 0
      nancy/__init__.py
  4. 22 0
      nancy/benchmark_config
  5. BIN
      nancy/lib/Dapper.1.12.1/Dapper.1.12.1.nupkg
  6. 36 0
      nancy/lib/Dapper.1.12.1/Dapper.1.12.1.nuspec
  7. BIN
      nancy/lib/Dapper.1.12.1/lib/net35/Dapper.dll
  8. BIN
      nancy/lib/Dapper.1.12.1/lib/net35/Dapper.pdb
  9. 680 0
      nancy/lib/Dapper.1.12.1/lib/net35/Dapper.xml
  10. BIN
      nancy/lib/Dapper.1.12.1/lib/net40/Dapper.dll
  11. BIN
      nancy/lib/Dapper.1.12.1/lib/net40/Dapper.pdb
  12. 648 0
      nancy/lib/Dapper.1.12.1/lib/net40/Dapper.xml
  13. BIN
      nancy/lib/MySql.Data.6.6.5/MySql.Data.6.6.5.nupkg
  14. 19 0
      nancy/lib/MySql.Data.6.6.5/MySql.Data.6.6.5.nuspec
  15. BIN
      nancy/lib/MySql.Data.6.6.5/lib/net20-cf/MySql.Data.cf.dll
  16. BIN
      nancy/lib/MySql.Data.6.6.5/lib/net20/MySql.Data.dll
  17. BIN
      nancy/lib/MySql.Data.6.6.5/lib/net40/MySql.Data.dll
  18. BIN
      nancy/lib/Nancy.0.17.1/Nancy.0.17.1.nupkg
  19. 20 0
      nancy/lib/Nancy.0.17.1/Nancy.0.17.1.nuspec
  20. BIN
      nancy/lib/Nancy.0.17.1/lib/net40/Nancy.dll
  21. BIN
      nancy/lib/Nancy.Hosting.Aspnet.0.17.1/Nancy.Hosting.Aspnet.0.17.1.nupkg
  22. 23 0
      nancy/lib/Nancy.Hosting.Aspnet.0.17.1/Nancy.Hosting.Aspnet.0.17.1.nuspec
  23. 14 0
      nancy/lib/Nancy.Hosting.Aspnet.0.17.1/content/web.config.transform
  24. BIN
      nancy/lib/Nancy.Hosting.Aspnet.0.17.1/lib/net40/Nancy.Hosting.Aspnet.dll
  25. 1 0
      nancy/lib/VisualStudio.MsBuild.11.0/Readme.md
  26. 181 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.AllFilesInProjectFolder.targets
  27. 242 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.AllFilesInTheProject.targets
  28. 445 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets
  29. 59 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FPSE.targets
  30. 60 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FTP.targets
  31. 116 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FileSystem.targets
  32. 49 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.MsDeploy.targets
  33. 54 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.Package.targets
  34. 1192 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.MsDeploy.Common.targets
  35. BIN
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.Publishing.Tasks.dll
  36. 4678 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.Publishing.targets
  37. BIN
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.XmlTransform.dll
  38. 530 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.WebSite.Publishing.targets
  39. 767 0
      nancy/lib/VisualStudio.MsBuild.11.0/Web/Transform/Microsoft.Web.Publishing.AspNetCompileMerge.targets
  40. BIN
      nancy/lib/VisualStudio.MsBuild.11.0/WebApplications/Microsoft.WebApplication.Build.Tasks.Dll
  41. 389 0
      nancy/lib/VisualStudio.MsBuild.11.0/WebApplications/Microsoft.WebApplication.targets
  42. 4 0
      nancy/lib/repositories.config
  43. 26 0
      nancy/nginx.conf
  44. 19 0
      nancy/setup_iis.ps1
  45. 22 0
      nancy/setup_iis.py
  46. 39 0
      nancy/setup_nginx.py
  47. 33 0
      nancy/setup_xsp.py
  48. 67 0
      nancy/src/DbModule.cs
  49. 1 0
      nancy/src/Global.asax
  50. 16 0
      nancy/src/Global.asax.cs
  51. 19 0
      nancy/src/JsonModule.cs
  52. 109 0
      nancy/src/NancyBenchmark.csproj
  53. 25 0
      nancy/src/NancyBenchmark.sln
  54. 6 0
      nancy/src/NuGet.config
  55. 30 0
      nancy/src/Web.Debug.config
  56. 31 0
      nancy/src/Web.Release.config
  57. 31 0
      nancy/src/Web.config
  58. 7 0
      nancy/src/packages.config

+ 4 - 0
nancy/.gitignore

@@ -0,0 +1,4 @@
+*.user
+*.suo
+*/bin/*
+*/obj/*

+ 66 - 0
nancy/README.md

@@ -0,0 +1,66 @@
+# Nancy on Mono and Windows
+
+## Tests
+
+### JSON
+
+* `http://localhost:8080/json`
+
+---
+
+### Nancy - Dapper (ORM)
+
+**MySQL**
+
+* `http://localhost:8080/db`
+* `http://localhost:8080/db/10`
+
+## Mono Installation
+
+    sudo apt-get install build-essential autoconf automake libtool zlib1g-dev git
+
+    git clone git://github.com/mono/mono
+    cd mono
+    git checkout mono-3.0.10
+    ./autogen.sh --prefix=/usr/local
+    make get-monolite-latest
+    make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe
+    sudo make install
+
+    cd ..
+
+    git clone git://github.com/mono/xsp
+    cd xsp
+    git checkout 3.0
+    ./autogen.sh --prefix=/usr/local
+    make
+    sudo make install
+
+## Versions
+
+**Language**
+
+* C# 5.0
+
+**Platforms**
+
+* .NET Framework 4.5 (Windows)
+* Mono 3.0.X (Linux)
+
+**Web Servers**
+
+* IIS 8 (Windows)
+* nginx 1.4.0 & XSP FastCGI (Linux)
+
+**Web Stack**
+
+* ASP.NET 4.5
+* Nancy 0.17.1 (custom build to address this issue: https://github.com/NancyFx/Nancy/pull/1100)
+
+**Databases**
+
+* MySQL Connector/Net
+
+**Developer Tools**
+
+* Visual Studio 2012

+ 0 - 0
nancy/__init__.py


+ 22 - 0
nancy/benchmark_config

@@ -0,0 +1,22 @@
+{
+  "framework": "nancy",
+  "tests": [{
+    "default": {
+      "setup_file": "setup_iis",
+      "os": "nt",
+      "json_url": "/json",
+      "db_url": "/db",
+      "query_url": "/db/",
+      "port": 8080,
+      "sort": 120
+    },
+    "mono": {
+      "setup_file": "setup_nginx",
+      "json_url": "/json",
+      "db_url": "/db",
+      "query_url": "/db/",
+      "port": 8080,
+      "sort": 121
+    }
+  }]
+}

BIN
nancy/lib/Dapper.1.12.1/Dapper.1.12.1.nupkg


+ 36 - 0
nancy/lib/Dapper.1.12.1/Dapper.1.12.1.nuspec

@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+  <metadata>
+    <id>Dapper</id>
+    <version>1.12.1</version>
+    <title>Dapper dot net</title>
+    <authors>Sam Saffron, Marc Gravell</authors>
+    <owners>Sam Saffron, Marc Gravell</owners>
+    <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
+    <projectUrl>http://code.google.com/p/dapper-dot-net/</projectUrl>
+    <requireLicenseAcceptance>false</requireLicenseAcceptance>
+    <description>A high performance Micro-ORM supporting Sql Server, MySQL, Sqlite, SqlCE, Firebird etc..</description>
+    <summary>A high performance Micro-ORM</summary>
+    <releaseNotes>* 1.12.1 - Minor deploy glitch (should now include intellisense files!)
+      * 1.12 - Better automatic type-mapping (int vs long, float vs double, etc)
+      *        Fixed: bug with indexer properties
+      * 1.11 - Custom type-map support
+      * 1.10 - Fixed: error-handling could lose original exception if reader closed
+      * 1.9 - Added: better schema change detection
+      *       Fixed: enum support for T in Query-of-T
+      *       Added: dictionary support for parameters
+      * 1.8 - Started release notes
+      *       Important: Dapper is now shipping as a DLL which will work on .net 3.5 or .net 4.0,
+      *          This improves the debugging experience as you no longer break into dapper when SQL fails.
+      *       Added: ParameterNames on DynamicParameters</releaseNotes>
+    <copyright />
+    <language />
+    <tags>orm sql micro-orm</tags>
+    <frameworkAssemblies>
+      <frameworkAssembly assemblyName="System.Core" targetFramework="" />
+      <frameworkAssembly assemblyName="System" targetFramework="" />
+      <frameworkAssembly assemblyName="System.Data" targetFramework="" />
+      <frameworkAssembly assemblyName="Microsoft.CSharp" targetFramework=".NETFramework4.0-Client, .NETFramework4.0" />
+    </frameworkAssemblies>
+  </metadata>
+</package>

BIN
nancy/lib/Dapper.1.12.1/lib/net35/Dapper.dll


BIN
nancy/lib/Dapper.1.12.1/lib/net35/Dapper.pdb


+ 680 - 0
nancy/lib/Dapper.1.12.1/lib/net35/Dapper.xml

@@ -0,0 +1,680 @@
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>Dapper</name>
+    </assembly>
+    <members>
+        <member name="T:Dapper.SqlMapper">
+            <summary>
+            Dapper, a light weight object mapper for ADO.NET
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.PurgeQueryCache">
+            <summary>
+            Purge the query cache 
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Execute(System.Data.IDbConnection,System.String,System.Object)">
+            <summary>
+            Execute parameterized SQL  
+            </summary>
+            <returns>Number of rows affected</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Execute(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction)">
+            <summary>
+            Execute parameterized SQL
+            </summary>
+            <returns>Number of rows affected</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Execute(System.Data.IDbConnection,System.String,System.Object,System.Data.CommandType)">
+            <summary>
+            Execute parameterized SQL
+            </summary>
+            <returns>Number of rows affected</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Execute(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Data.CommandType)">
+            <summary>
+            Execute parameterized SQL
+            </summary>
+            <returns>Number of rows affected</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``1(System.Data.IDbConnection,System.String,System.Object)">
+            <summary>
+            Executes a query, returning the data typed as per T
+            </summary>
+            <returns>A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
+            created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
+            </returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``1(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction)">
+            <summary>
+            Executes a query, returning the data typed as per T
+            </summary>
+            <returns>A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
+            created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
+            </returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``1(System.Data.IDbConnection,System.String,System.Object,System.Data.CommandType)">
+            <summary>
+            Executes a query, returning the data typed as per T
+            </summary>
+            <returns>A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
+            created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
+            </returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``1(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Data.CommandType)">
+            <summary>
+            Executes a query, returning the data typed as per T
+            </summary>
+            <returns>A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
+            created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
+            </returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.QueryMultiple(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction)">
+            <summary>
+            Execute a command that returns multiple result sets, and access each in turn
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.QueryMultiple(System.Data.IDbConnection,System.String,System.Object,System.Data.CommandType)">
+            <summary>
+            Execute a command that returns multiple result sets, and access each in turn
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.QueryMultiple(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Data.CommandType)">
+            <summary>
+            Execute a command that returns multiple result sets, and access each in turn
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Execute(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Execute parameterized SQL  
+            </summary>
+            <returns>Number of rows affected</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query(System.Data.IDbConnection,System.String,System.Object)">
+            <summary>
+            Return a list of dynamic objects, reader is closed after the call
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction)">
+            <summary>
+            Return a list of dynamic objects, reader is closed after the call
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query(System.Data.IDbConnection,System.String,System.Object,System.Nullable{System.Data.CommandType})">
+            <summary>
+            Return a list of dynamic objects, reader is closed after the call
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable{System.Data.CommandType})">
+            <summary>
+            Return a list of dynamic objects, reader is closed after the call
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Return a list of dynamic objects, reader is closed after the call
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``1(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Executes a query, returning the data typed as per T
+            </summary>
+            <remarks>the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object</remarks>
+            <returns>A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
+            created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
+            </returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.QueryMultiple(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Execute a command that returns multiple result sets, and access each in turn
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.QueryInternal``1(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Return a typed list of objects, reader is closed after the call
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``3(System.Data.IDbConnection,System.String,System.Func{``0,``1,``2},System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Maps a query to objects
+            </summary>
+            <typeparam name="TFirst">The first type in the recordset</typeparam>
+            <typeparam name="TSecond">The second type in the recordset</typeparam>
+            <typeparam name="TReturn">The return type</typeparam>
+            <param name="cnn"></param>
+            <param name="sql"></param>
+            <param name="map"></param>
+            <param name="param"></param>
+            <param name="transaction"></param>
+            <param name="buffered"></param>
+            <param name="splitOn">The Field we should split and read the second object from (default: id)</param>
+            <param name="commandTimeout">Number of seconds before command execution timeout</param>
+            <param name="commandType">Is it a stored proc or a batch?</param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``4(System.Data.IDbConnection,System.String,System.Func{``0,``1,``2,``3},System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Maps a query to objects
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="cnn"></param>
+            <param name="sql"></param>
+            <param name="map"></param>
+            <param name="param"></param>
+            <param name="transaction"></param>
+            <param name="buffered"></param>
+            <param name="splitOn">The Field we should split and read the second object from (default: id)</param>
+            <param name="commandTimeout">Number of seconds before command execution timeout</param>
+            <param name="commandType"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``5(System.Data.IDbConnection,System.String,System.Func{``0,``1,``2,``3,``4},System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Perform a multi mapping query with 4 input parameters
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TFourth"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="cnn"></param>
+            <param name="sql"></param>
+            <param name="map"></param>
+            <param name="param"></param>
+            <param name="transaction"></param>
+            <param name="buffered"></param>
+            <param name="splitOn"></param>
+            <param name="commandTimeout"></param>
+            <param name="commandType"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ReadChar(System.Object)">
+            <summary>
+            Internal use only
+            </summary>
+            <param name="value"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ReadNullableChar(System.Object)">
+            <summary>
+            Internal use only
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.PackListParameters(System.Data.IDbCommand,System.String,System.Object)">
+            <summary>
+            Internal use only
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.CreateParamInfoGenerator(Dapper.SqlMapper.Identity)">
+            <summary>
+            Internal use only
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.GetTypeMap(System.Type)">
+            <summary>
+            Gets type-map for the given type
+            </summary>
+            <returns>Type map implementation, DefaultTypeMap instance if no override present</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.SetTypeMap(System.Type,Dapper.SqlMapper.ITypeMap)">
+            <summary>
+            Set custom mapping for type deserializers
+            </summary>
+            <param name="type">Entity type to override</param>
+            <param name="map">Mapping rules impementation, null to remove custom map</param>
+        </member>
+        <member name="M:Dapper.SqlMapper.GetTypeDeserializer(System.Type,System.Data.IDataReader,System.Int32,System.Int32,System.Boolean)">
+            <summary>
+            Internal use only
+            </summary>
+            <param name="type"></param>
+            <param name="reader"></param>
+            <param name="startBound"></param>
+            <param name="length"></param>
+            <param name="returnNullIfFirstMissing"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ThrowDataException(System.Exception,System.Int32,System.Data.IDataReader)">
+            <summary>
+            Throws a data exception, only used internally
+            </summary>
+            <param name="ex"></param>
+            <param name="index"></param>
+            <param name="reader"></param>
+        </member>
+        <member name="E:Dapper.SqlMapper.QueryCachePurged">
+            <summary>
+            Called if the query cache is purged via PurgeQueryCache
+            </summary>
+        </member>
+        <member name="T:Dapper.SqlMapper.IDynamicParameters">
+            <summary>
+            Implement this interface to pass an arbitrary db specific set of parameters to Dapper
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.IDynamicParameters.AddParameters(System.Data.IDbCommand,Dapper.SqlMapper.Identity)">
+            <summary>
+            Add all the parameters needed to the command just before it executes
+            </summary>
+            <param name="command">The raw command prior to execution</param>
+            <param name="identity">Information about the query</param>
+        </member>
+        <member name="T:Dapper.SqlMapper.ITypeMap">
+            <summary>
+            Implement this interface to change default mapping of reader columns to type memebers
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.ITypeMap.FindConstructor(System.String[],System.Type[])">
+            <summary>
+            Finds best constructor
+            </summary>
+            <param name="names">DataReader column names</param>
+            <param name="types">DataReader column types</param>
+            <returns>Matching constructor or default one</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ITypeMap.GetConstructorParameter(System.Reflection.ConstructorInfo,System.String)">
+            <summary>
+            Gets mapping for constructor parameter
+            </summary>
+            <param name="constructor">Constructor to resolve</param>
+            <param name="columnName">DataReader column name</param>
+            <returns>Mapping implementation</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ITypeMap.GetMember(System.String)">
+            <summary>
+            Gets member mapping for column
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <returns>Mapping implementation</returns>
+        </member>
+        <member name="T:Dapper.SqlMapper.IMemberMap">
+            <summary>
+            Implements this interface to provide custom member mapping
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.ColumnName">
+            <summary>
+            Source DataReader column name
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.MemberType">
+            <summary>
+             Target member type
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.Property">
+            <summary>
+            Target property
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.Field">
+            <summary>
+            Target field
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.Parameter">
+            <summary>
+            Target constructor parameter
+            </summary>
+        </member>
+        <member name="T:Dapper.SqlMapper.Link`2">
+            <summary>
+            This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
+            and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
+            equality. The type is fully thread-safe.
+            </summary>
+        </member>
+        <member name="T:Dapper.SqlMapper.Identity">
+            <summary>
+            Identity of a cached query in Dapper, used for extensability
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Identity.ForDynamicParameters(System.Type)">
+            <summary>
+            Create an identity for use with DynamicParameters, internal use only
+            </summary>
+            <param name="type"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Identity.Equals(System.Object)">
+            <summary>
+            
+            </summary>
+            <param name="obj"></param>
+            <returns></returns>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.sql">
+            <summary>
+            The sql
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.commandType">
+            <summary>
+            The command type 
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.hashCode">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.gridIndex">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.type">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.connectionString">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.parametersType">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Identity.GetHashCode">
+            <summary>
+            
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Identity.Equals(Dapper.SqlMapper.Identity)">
+            <summary>
+            Compare 2 Identity objects
+            </summary>
+            <param name="other"></param>
+            <returns></returns>
+        </member>
+        <member name="T:Dapper.SqlMapper.GridReader">
+            <summary>
+            The grid reader provides interfaces for reading multiple result sets from a Dapper query 
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``1">
+            <summary>
+            Read the next grid of results
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``3(System.Func{``0,``1,``2},System.String)">
+            <summary>
+            Read multiple objects from a single recordset on the grid
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="func"></param>
+            <param name="splitOn"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``4(System.Func{``0,``1,``2,``3},System.String)">
+            <summary>
+            Read multiple objects from a single recordset on the grid
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="func"></param>
+            <param name="splitOn"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``5(System.Func{``0,``1,``2,``3,``4},System.String)">
+            <summary>
+            Read multiple objects from a single record set on the grid
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TFourth"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="func"></param>
+            <param name="splitOn"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Dispose">
+            <summary>
+            Dispose the grid, closing and disposing both the underlying reader and command.
+            </summary>
+        </member>
+        <member name="T:Dapper.DynamicParameters">
+            <summary>
+            A bag of parameters that can be passed to the Dapper Query and Execute methods
+            </summary>
+        </member>
+        <member name="M:Dapper.DynamicParameters.#ctor">
+            <summary>
+            construct a dynamic parameter bag
+            </summary>
+        </member>
+        <member name="M:Dapper.DynamicParameters.#ctor(System.Object)">
+            <summary>
+            construct a dynamic parameter bag
+            </summary>
+            <param name="template">can be an anonymous type or a DynamicParameters bag</param>
+        </member>
+        <member name="M:Dapper.DynamicParameters.AddDynamicParams(System.Object)">
+            <summary>
+            Append a whole object full of params to the dynamic
+            EG: AddDynamicParams(new {A = 1, B = 2}) // will add property A and B to the dynamic
+            </summary>
+            <param name="param"></param>
+        </member>
+        <member name="M:Dapper.DynamicParameters.Add(System.String,System.Object,System.Nullable{System.Data.DbType},System.Nullable{System.Data.ParameterDirection},System.Nullable{System.Int32})">
+            <summary>
+            Add a parameter to this dynamic parameter list
+            </summary>
+            <param name="name"></param>
+            <param name="value"></param>
+            <param name="dbType"></param>
+            <param name="direction"></param>
+            <param name="size"></param>
+        </member>
+        <member name="M:Dapper.DynamicParameters.AddParameters(System.Data.IDbCommand,Dapper.SqlMapper.Identity)">
+            <summary>
+            Add all the parameters needed to the command just before it executes
+            </summary>
+            <param name="command">The raw command prior to execution</param>
+            <param name="identity">Information about the query</param>
+        </member>
+        <member name="M:Dapper.DynamicParameters.Get``1(System.String)">
+            <summary>
+            Get the value of a parameter
+            </summary>
+            <typeparam name="T"></typeparam>
+            <param name="name"></param>
+            <returns>The value, note DBNull.Value is not returned, instead the value is returned as null</returns>
+        </member>
+        <member name="P:Dapper.DynamicParameters.ParameterNames">
+            <summary>
+            All the names of the param in the bag, use Get to yank them out
+            </summary>
+        </member>
+        <member name="T:Dapper.DbString">
+            <summary>
+            This class represents a SQL string, it can be used if you need to denote your parameter is a Char vs VarChar vs nVarChar vs nChar
+            </summary>
+        </member>
+        <member name="M:Dapper.DbString.#ctor">
+            <summary>
+            Create a new DbString
+            </summary>
+        </member>
+        <member name="M:Dapper.DbString.AddParameter(System.Data.IDbCommand,System.String)">
+            <summary>
+            Add the parameter to the command... internal use only
+            </summary>
+            <param name="command"></param>
+            <param name="name"></param>
+        </member>
+        <member name="P:Dapper.DbString.IsAnsi">
+            <summary>
+            Ansi vs Unicode 
+            </summary>
+        </member>
+        <member name="P:Dapper.DbString.IsFixedLength">
+            <summary>
+            Fixed length 
+            </summary>
+        </member>
+        <member name="P:Dapper.DbString.Length">
+            <summary>
+            Length of the string -1 for max
+            </summary>
+        </member>
+        <member name="P:Dapper.DbString.Value">
+            <summary>
+            The value of the string
+            </summary>
+        </member>
+        <member name="T:Dapper.FeatureSupport">
+            <summary>
+            Handles variances in features per DBMS
+            </summary>
+        </member>
+        <member name="F:Dapper.FeatureSupport.FeatureList">
+            <summary>
+            Dictionary of supported features index by connection type name
+            </summary>
+        </member>
+        <member name="M:Dapper.FeatureSupport.Get(System.Data.IDbConnection)">
+            <summary>
+            Gets the featureset based on the passed connection
+            </summary>
+        </member>
+        <member name="P:Dapper.FeatureSupport.Arrays">
+            <summary>
+            True if the db supports array columns e.g. Postgresql
+            </summary>
+        </member>
+        <member name="T:Dapper.SimpleMemberMap">
+            <summary>
+            Represents simple memeber map for one of target parameter or property or field to source DataReader column
+            </summary>
+        </member>
+        <member name="M:Dapper.SimpleMemberMap.#ctor(System.String,System.Reflection.PropertyInfo)">
+            <summary>
+            Creates instance for simple property mapping
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <param name="property">Target property</param>
+        </member>
+        <member name="M:Dapper.SimpleMemberMap.#ctor(System.String,System.Reflection.FieldInfo)">
+            <summary>
+            Creates instance for simple field mapping
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <param name="field">Target property</param>
+        </member>
+        <member name="M:Dapper.SimpleMemberMap.#ctor(System.String,System.Reflection.ParameterInfo)">
+            <summary>
+            Creates instance for simple constructor parameter mapping
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <param name="parameter">Target constructor parameter</param>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.ColumnName">
+            <summary>
+            DataReader column name
+            </summary>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.MemberType">
+            <summary>
+            Target member type
+            </summary>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.Property">
+            <summary>
+            Target property
+            </summary>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.Field">
+            <summary>
+            Target field
+            </summary>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.Parameter">
+            <summary>
+            Target constructor parameter
+            </summary>
+        </member>
+        <member name="T:Dapper.DefaultTypeMap">
+            <summary>
+            Represents default type mapping strategy used by Dapper
+            </summary>
+        </member>
+        <member name="M:Dapper.DefaultTypeMap.#ctor(System.Type)">
+            <summary>
+            Creates default type map
+            </summary>
+            <param name="type">Entity type</param>
+        </member>
+        <member name="M:Dapper.DefaultTypeMap.FindConstructor(System.String[],System.Type[])">
+            <summary>
+            Finds best constructor
+            </summary>
+            <param name="names">DataReader column names</param>
+            <param name="types">DataReader column types</param>
+            <returns>Matching constructor or default one</returns>
+        </member>
+        <member name="M:Dapper.DefaultTypeMap.GetConstructorParameter(System.Reflection.ConstructorInfo,System.String)">
+            <summary>
+            Gets mapping for constructor parameter
+            </summary>
+            <param name="constructor">Constructor to resolve</param>
+            <param name="columnName">DataReader column name</param>
+            <returns>Mapping implementation</returns>
+        </member>
+        <member name="M:Dapper.DefaultTypeMap.GetMember(System.String)">
+            <summary>
+            Gets member mapping for column
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <returns>Mapping implementation</returns>
+        </member>
+        <member name="T:Dapper.CustomPropertyTypeMap">
+            <summary>
+            Implements custom property mapping by user provided criteria (usually presence of some custom attribute with column to member mapping)
+            </summary>
+        </member>
+        <member name="M:Dapper.CustomPropertyTypeMap.#ctor(System.Type,System.Func{System.Type,System.String,System.Reflection.PropertyInfo})">
+            <summary>
+            Creates custom property mapping
+            </summary>
+            <param name="type">Target entity type</param>
+            <param name="propertySelector">Property selector based on target type and DataReader column name</param>
+        </member>
+        <member name="M:Dapper.CustomPropertyTypeMap.FindConstructor(System.String[],System.Type[])">
+            <summary>
+            Always returns default constructor
+            </summary>
+            <param name="names">DataReader column names</param>
+            <param name="types">DataReader column types</param>
+            <returns>Default constructor</returns>
+        </member>
+        <member name="M:Dapper.CustomPropertyTypeMap.GetConstructorParameter(System.Reflection.ConstructorInfo,System.String)">
+            <summary>
+            Not impelmeneted as far as default constructor used for all cases
+            </summary>
+            <param name="constructor"></param>
+            <param name="columnName"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.CustomPropertyTypeMap.GetMember(System.String)">
+            <summary>
+            Returns property based on selector strategy
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <returns>Poperty member map</returns>
+        </member>
+    </members>
+</doc>

BIN
nancy/lib/Dapper.1.12.1/lib/net40/Dapper.dll


BIN
nancy/lib/Dapper.1.12.1/lib/net40/Dapper.pdb


+ 648 - 0
nancy/lib/Dapper.1.12.1/lib/net40/Dapper.xml

@@ -0,0 +1,648 @@
+<?xml version="1.0"?>
+<doc>
+    <assembly>
+        <name>Dapper</name>
+    </assembly>
+    <members>
+        <member name="T:Dapper.SqlMapper">
+            <summary>
+            Dapper, a light weight object mapper for ADO.NET
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.PurgeQueryCache">
+            <summary>
+            Purge the query cache 
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.GetCachedSQLCount">
+            <summary>
+            Return a count of all the cached queries by dapper
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GetCachedSQL(System.Int32)">
+            <summary>
+            Return a list of all the queries cached by dapper
+            </summary>
+            <param name="ignoreHitCountAbove"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GetHashCollissions">
+            <summary>
+            Deep diagnostics only: find any hash collisions in the cache
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Execute(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Execute parameterized SQL  
+            </summary>
+            <returns>Number of rows affected</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Return a list of dynamic objects, reader is closed after the call
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``1(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Executes a query, returning the data typed as per T
+            </summary>
+            <remarks>the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object</remarks>
+            <returns>A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
+            created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
+            </returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.QueryMultiple(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Execute a command that returns multiple result sets, and access each in turn
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.QueryInternal``1(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Return a typed list of objects, reader is closed after the call
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``3(System.Data.IDbConnection,System.String,System.Func{``0,``1,``2},System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Maps a query to objects
+            </summary>
+            <typeparam name="TFirst">The first type in the recordset</typeparam>
+            <typeparam name="TSecond">The second type in the recordset</typeparam>
+            <typeparam name="TReturn">The return type</typeparam>
+            <param name="cnn"></param>
+            <param name="sql"></param>
+            <param name="map"></param>
+            <param name="param"></param>
+            <param name="transaction"></param>
+            <param name="buffered"></param>
+            <param name="splitOn">The Field we should split and read the second object from (default: id)</param>
+            <param name="commandTimeout">Number of seconds before command execution timeout</param>
+            <param name="commandType">Is it a stored proc or a batch?</param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``4(System.Data.IDbConnection,System.String,System.Func{``0,``1,``2,``3},System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Maps a query to objects
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="cnn"></param>
+            <param name="sql"></param>
+            <param name="map"></param>
+            <param name="param"></param>
+            <param name="transaction"></param>
+            <param name="buffered"></param>
+            <param name="splitOn">The Field we should split and read the second object from (default: id)</param>
+            <param name="commandTimeout">Number of seconds before command execution timeout</param>
+            <param name="commandType"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``5(System.Data.IDbConnection,System.String,System.Func{``0,``1,``2,``3,``4},System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Perform a multi mapping query with 4 input parameters
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TFourth"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="cnn"></param>
+            <param name="sql"></param>
+            <param name="map"></param>
+            <param name="param"></param>
+            <param name="transaction"></param>
+            <param name="buffered"></param>
+            <param name="splitOn"></param>
+            <param name="commandTimeout"></param>
+            <param name="commandType"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Query``6(System.Data.IDbConnection,System.String,System.Func{``0,``1,``2,``3,``4,``5},System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})">
+            <summary>
+            Perform a multi mapping query with 5 input parameters
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TFourth"></typeparam>
+            <typeparam name="TFifth"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="cnn"></param>
+            <param name="sql"></param>
+            <param name="map"></param>
+            <param name="param"></param>
+            <param name="transaction"></param>
+            <param name="buffered"></param>
+            <param name="splitOn"></param>
+            <param name="commandTimeout"></param>
+            <param name="commandType"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ReadChar(System.Object)">
+            <summary>
+            Internal use only
+            </summary>
+            <param name="value"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ReadNullableChar(System.Object)">
+            <summary>
+            Internal use only
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.PackListParameters(System.Data.IDbCommand,System.String,System.Object)">
+            <summary>
+            Internal use only
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.CreateParamInfoGenerator(Dapper.SqlMapper.Identity)">
+            <summary>
+            Internal use only
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.GetTypeMap(System.Type)">
+            <summary>
+            Gets type-map for the given type
+            </summary>
+            <returns>Type map implementation, DefaultTypeMap instance if no override present</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.SetTypeMap(System.Type,Dapper.SqlMapper.ITypeMap)">
+            <summary>
+            Set custom mapping for type deserializers
+            </summary>
+            <param name="type">Entity type to override</param>
+            <param name="map">Mapping rules impementation, null to remove custom map</param>
+        </member>
+        <member name="M:Dapper.SqlMapper.GetTypeDeserializer(System.Type,System.Data.IDataReader,System.Int32,System.Int32,System.Boolean)">
+            <summary>
+            Internal use only
+            </summary>
+            <param name="type"></param>
+            <param name="reader"></param>
+            <param name="startBound"></param>
+            <param name="length"></param>
+            <param name="returnNullIfFirstMissing"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ThrowDataException(System.Exception,System.Int32,System.Data.IDataReader)">
+            <summary>
+            Throws a data exception, only used internally
+            </summary>
+            <param name="ex"></param>
+            <param name="index"></param>
+            <param name="reader"></param>
+        </member>
+        <member name="E:Dapper.SqlMapper.QueryCachePurged">
+            <summary>
+            Called if the query cache is purged via PurgeQueryCache
+            </summary>
+        </member>
+        <member name="T:Dapper.SqlMapper.IDynamicParameters">
+            <summary>
+            Implement this interface to pass an arbitrary db specific set of parameters to Dapper
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.IDynamicParameters.AddParameters(System.Data.IDbCommand,Dapper.SqlMapper.Identity)">
+            <summary>
+            Add all the parameters needed to the command just before it executes
+            </summary>
+            <param name="command">The raw command prior to execution</param>
+            <param name="identity">Information about the query</param>
+        </member>
+        <member name="T:Dapper.SqlMapper.ITypeMap">
+            <summary>
+            Implement this interface to change default mapping of reader columns to type memebers
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.ITypeMap.FindConstructor(System.String[],System.Type[])">
+            <summary>
+            Finds best constructor
+            </summary>
+            <param name="names">DataReader column names</param>
+            <param name="types">DataReader column types</param>
+            <returns>Matching constructor or default one</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ITypeMap.GetConstructorParameter(System.Reflection.ConstructorInfo,System.String)">
+            <summary>
+            Gets mapping for constructor parameter
+            </summary>
+            <param name="constructor">Constructor to resolve</param>
+            <param name="columnName">DataReader column name</param>
+            <returns>Mapping implementation</returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.ITypeMap.GetMember(System.String)">
+            <summary>
+            Gets member mapping for column
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <returns>Mapping implementation</returns>
+        </member>
+        <member name="T:Dapper.SqlMapper.IMemberMap">
+            <summary>
+            Implements this interface to provide custom member mapping
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.ColumnName">
+            <summary>
+            Source DataReader column name
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.MemberType">
+            <summary>
+             Target member type
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.Property">
+            <summary>
+            Target property
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.Field">
+            <summary>
+            Target field
+            </summary>
+        </member>
+        <member name="P:Dapper.SqlMapper.IMemberMap.Parameter">
+            <summary>
+            Target constructor parameter
+            </summary>
+        </member>
+        <member name="T:Dapper.SqlMapper.Link`2">
+            <summary>
+            This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
+            and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
+            equality. The type is fully thread-safe.
+            </summary>
+        </member>
+        <member name="T:Dapper.SqlMapper.Identity">
+            <summary>
+            Identity of a cached query in Dapper, used for extensability
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Identity.ForDynamicParameters(System.Type)">
+            <summary>
+            Create an identity for use with DynamicParameters, internal use only
+            </summary>
+            <param name="type"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Identity.Equals(System.Object)">
+            <summary>
+            
+            </summary>
+            <param name="obj"></param>
+            <returns></returns>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.sql">
+            <summary>
+            The sql
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.commandType">
+            <summary>
+            The command type 
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.hashCode">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.gridIndex">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.type">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.connectionString">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:Dapper.SqlMapper.Identity.parametersType">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.Identity.GetHashCode">
+            <summary>
+            
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.Identity.Equals(Dapper.SqlMapper.Identity)">
+            <summary>
+            Compare 2 Identity objects
+            </summary>
+            <param name="other"></param>
+            <returns></returns>
+        </member>
+        <member name="T:Dapper.SqlMapper.GridReader">
+            <summary>
+            The grid reader provides interfaces for reading multiple result sets from a Dapper query 
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read">
+            <summary>
+            Read the next grid of results, returned as a dynamic object
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``1">
+            <summary>
+            Read the next grid of results
+            </summary>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``3(System.Func{``0,``1,``2},System.String)">
+            <summary>
+            Read multiple objects from a single recordset on the grid
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="func"></param>
+            <param name="splitOn"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``4(System.Func{``0,``1,``2,``3},System.String)">
+            <summary>
+            Read multiple objects from a single recordset on the grid
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="func"></param>
+            <param name="splitOn"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``5(System.Func{``0,``1,``2,``3,``4},System.String)">
+            <summary>
+            Read multiple objects from a single record set on the grid
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TFourth"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="func"></param>
+            <param name="splitOn"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Read``6(System.Func{``0,``1,``2,``3,``4,``5},System.String)">
+            <summary>
+            Read multiple objects from a single record set on the grid
+            </summary>
+            <typeparam name="TFirst"></typeparam>
+            <typeparam name="TSecond"></typeparam>
+            <typeparam name="TThird"></typeparam>
+            <typeparam name="TFourth"></typeparam>
+            <typeparam name="TFifth"></typeparam>
+            <typeparam name="TReturn"></typeparam>
+            <param name="func"></param>
+            <param name="splitOn"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.SqlMapper.GridReader.Dispose">
+            <summary>
+            Dispose the grid, closing and disposing both the underlying reader and command.
+            </summary>
+        </member>
+        <member name="T:Dapper.DynamicParameters">
+            <summary>
+            A bag of parameters that can be passed to the Dapper Query and Execute methods
+            </summary>
+        </member>
+        <member name="M:Dapper.DynamicParameters.#ctor">
+            <summary>
+            construct a dynamic parameter bag
+            </summary>
+        </member>
+        <member name="M:Dapper.DynamicParameters.#ctor(System.Object)">
+            <summary>
+            construct a dynamic parameter bag
+            </summary>
+            <param name="template">can be an anonymous type or a DynamicParameters bag</param>
+        </member>
+        <member name="M:Dapper.DynamicParameters.AddDynamicParams(System.Object)">
+            <summary>
+            Append a whole object full of params to the dynamic
+            EG: AddDynamicParams(new {A = 1, B = 2}) // will add property A and B to the dynamic
+            </summary>
+            <param name="param"></param>
+        </member>
+        <member name="M:Dapper.DynamicParameters.Add(System.String,System.Object,System.Nullable{System.Data.DbType},System.Nullable{System.Data.ParameterDirection},System.Nullable{System.Int32})">
+            <summary>
+            Add a parameter to this dynamic parameter list
+            </summary>
+            <param name="name"></param>
+            <param name="value"></param>
+            <param name="dbType"></param>
+            <param name="direction"></param>
+            <param name="size"></param>
+        </member>
+        <member name="M:Dapper.DynamicParameters.AddParameters(System.Data.IDbCommand,Dapper.SqlMapper.Identity)">
+            <summary>
+            Add all the parameters needed to the command just before it executes
+            </summary>
+            <param name="command">The raw command prior to execution</param>
+            <param name="identity">Information about the query</param>
+        </member>
+        <member name="M:Dapper.DynamicParameters.Get``1(System.String)">
+            <summary>
+            Get the value of a parameter
+            </summary>
+            <typeparam name="T"></typeparam>
+            <param name="name"></param>
+            <returns>The value, note DBNull.Value is not returned, instead the value is returned as null</returns>
+        </member>
+        <member name="P:Dapper.DynamicParameters.ParameterNames">
+            <summary>
+            All the names of the param in the bag, use Get to yank them out
+            </summary>
+        </member>
+        <member name="T:Dapper.DbString">
+            <summary>
+            This class represents a SQL string, it can be used if you need to denote your parameter is a Char vs VarChar vs nVarChar vs nChar
+            </summary>
+        </member>
+        <member name="M:Dapper.DbString.#ctor">
+            <summary>
+            Create a new DbString
+            </summary>
+        </member>
+        <member name="M:Dapper.DbString.AddParameter(System.Data.IDbCommand,System.String)">
+            <summary>
+            Add the parameter to the command... internal use only
+            </summary>
+            <param name="command"></param>
+            <param name="name"></param>
+        </member>
+        <member name="P:Dapper.DbString.IsAnsi">
+            <summary>
+            Ansi vs Unicode 
+            </summary>
+        </member>
+        <member name="P:Dapper.DbString.IsFixedLength">
+            <summary>
+            Fixed length 
+            </summary>
+        </member>
+        <member name="P:Dapper.DbString.Length">
+            <summary>
+            Length of the string -1 for max
+            </summary>
+        </member>
+        <member name="P:Dapper.DbString.Value">
+            <summary>
+            The value of the string
+            </summary>
+        </member>
+        <member name="T:Dapper.FeatureSupport">
+            <summary>
+            Handles variances in features per DBMS
+            </summary>
+        </member>
+        <member name="F:Dapper.FeatureSupport.FeatureList">
+            <summary>
+            Dictionary of supported features index by connection type name
+            </summary>
+        </member>
+        <member name="M:Dapper.FeatureSupport.Get(System.Data.IDbConnection)">
+            <summary>
+            Gets the featureset based on the passed connection
+            </summary>
+        </member>
+        <member name="P:Dapper.FeatureSupport.Arrays">
+            <summary>
+            True if the db supports array columns e.g. Postgresql
+            </summary>
+        </member>
+        <member name="T:Dapper.SimpleMemberMap">
+            <summary>
+            Represents simple memeber map for one of target parameter or property or field to source DataReader column
+            </summary>
+        </member>
+        <member name="M:Dapper.SimpleMemberMap.#ctor(System.String,System.Reflection.PropertyInfo)">
+            <summary>
+            Creates instance for simple property mapping
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <param name="property">Target property</param>
+        </member>
+        <member name="M:Dapper.SimpleMemberMap.#ctor(System.String,System.Reflection.FieldInfo)">
+            <summary>
+            Creates instance for simple field mapping
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <param name="field">Target property</param>
+        </member>
+        <member name="M:Dapper.SimpleMemberMap.#ctor(System.String,System.Reflection.ParameterInfo)">
+            <summary>
+            Creates instance for simple constructor parameter mapping
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <param name="parameter">Target constructor parameter</param>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.ColumnName">
+            <summary>
+            DataReader column name
+            </summary>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.MemberType">
+            <summary>
+            Target member type
+            </summary>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.Property">
+            <summary>
+            Target property
+            </summary>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.Field">
+            <summary>
+            Target field
+            </summary>
+        </member>
+        <member name="P:Dapper.SimpleMemberMap.Parameter">
+            <summary>
+            Target constructor parameter
+            </summary>
+        </member>
+        <member name="T:Dapper.DefaultTypeMap">
+            <summary>
+            Represents default type mapping strategy used by Dapper
+            </summary>
+        </member>
+        <member name="M:Dapper.DefaultTypeMap.#ctor(System.Type)">
+            <summary>
+            Creates default type map
+            </summary>
+            <param name="type">Entity type</param>
+        </member>
+        <member name="M:Dapper.DefaultTypeMap.FindConstructor(System.String[],System.Type[])">
+            <summary>
+            Finds best constructor
+            </summary>
+            <param name="names">DataReader column names</param>
+            <param name="types">DataReader column types</param>
+            <returns>Matching constructor or default one</returns>
+        </member>
+        <member name="M:Dapper.DefaultTypeMap.GetConstructorParameter(System.Reflection.ConstructorInfo,System.String)">
+            <summary>
+            Gets mapping for constructor parameter
+            </summary>
+            <param name="constructor">Constructor to resolve</param>
+            <param name="columnName">DataReader column name</param>
+            <returns>Mapping implementation</returns>
+        </member>
+        <member name="M:Dapper.DefaultTypeMap.GetMember(System.String)">
+            <summary>
+            Gets member mapping for column
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <returns>Mapping implementation</returns>
+        </member>
+        <member name="T:Dapper.CustomPropertyTypeMap">
+            <summary>
+            Implements custom property mapping by user provided criteria (usually presence of some custom attribute with column to member mapping)
+            </summary>
+        </member>
+        <member name="M:Dapper.CustomPropertyTypeMap.#ctor(System.Type,System.Func{System.Type,System.String,System.Reflection.PropertyInfo})">
+            <summary>
+            Creates custom property mapping
+            </summary>
+            <param name="type">Target entity type</param>
+            <param name="propertySelector">Property selector based on target type and DataReader column name</param>
+        </member>
+        <member name="M:Dapper.CustomPropertyTypeMap.FindConstructor(System.String[],System.Type[])">
+            <summary>
+            Always returns default constructor
+            </summary>
+            <param name="names">DataReader column names</param>
+            <param name="types">DataReader column types</param>
+            <returns>Default constructor</returns>
+        </member>
+        <member name="M:Dapper.CustomPropertyTypeMap.GetConstructorParameter(System.Reflection.ConstructorInfo,System.String)">
+            <summary>
+            Not impelmeneted as far as default constructor used for all cases
+            </summary>
+            <param name="constructor"></param>
+            <param name="columnName"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Dapper.CustomPropertyTypeMap.GetMember(System.String)">
+            <summary>
+            Returns property based on selector strategy
+            </summary>
+            <param name="columnName">DataReader column name</param>
+            <returns>Poperty member map</returns>
+        </member>
+    </members>
+</doc>

BIN
nancy/lib/MySql.Data.6.6.5/MySql.Data.6.6.5.nupkg


+ 19 - 0
nancy/lib/MySql.Data.6.6.5/MySql.Data.6.6.5.nuspec

@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
+  <metadata>
+    <id>MySql.Data</id>
+    <version>6.6.5</version>
+    <title>MySql.Data</title>
+    <authors>Oracle Corporation</authors>
+    <owners>Oracle Corporation</owners>
+    <licenseUrl>http://www.gnu.org/licenses/old-licenses/gpl-2.0.html</licenseUrl>
+    <projectUrl>http://www.mysql.com/downloads/connector/net/</projectUrl>
+    <iconUrl>http://www.mysql.com/common/logos/logo-mysql-110x57.png</iconUrl>
+    <requireLicenseAcceptance>false</requireLicenseAcceptance>
+    <description>Connector/Net is a fully-managed ADO.NET driver for MySQL.</description>
+    <releaseNotes />
+    <copyright />
+    <language />
+    <tags>MySQL</tags>
+  </metadata>
+</package>

BIN
nancy/lib/MySql.Data.6.6.5/lib/net20-cf/MySql.Data.cf.dll


BIN
nancy/lib/MySql.Data.6.6.5/lib/net20/MySql.Data.dll


BIN
nancy/lib/MySql.Data.6.6.5/lib/net40/MySql.Data.dll


BIN
nancy/lib/Nancy.0.17.1/Nancy.0.17.1.nupkg


+ 20 - 0
nancy/lib/Nancy.0.17.1/Nancy.0.17.1.nuspec

@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+  <metadata>
+    <id>Nancy</id>
+    <version>0.17.1</version>
+    <title>Nancy</title>
+    <authors>Andreas Håkansson,  Steven Robbins and contributors</authors>
+    <owners>Andreas Håkansson,  Steven Robbins and contributors</owners>
+    <licenseUrl>https://github.com/NancyFx/Nancy/blob/master/license.txt</licenseUrl>
+    <projectUrl>http://nancyfx.org/</projectUrl>
+    <iconUrl>http://nancyfx.org/nancy-nuget.png</iconUrl>
+    <requireLicenseAcceptance>false</requireLicenseAcceptance>
+    <description>Nancy is a lightweight web framework for the .Net platform, inspired by Sinatra. Nancy aim at delivering a low ceremony approach to building light, fast web applications.</description>
+    <summary>Nancy is a lightweight web framework for the .Net platform, inspired by Sinatra. Nancy aim at delivering a low ceremony approach to building light, fast web applications.</summary>
+    <releaseNotes />
+    <copyright>Andreas Håkansson, Steven Robbins and contributors</copyright>
+    <language>en-US</language>
+    <tags>Nancy</tags>
+  </metadata>
+</package>

BIN
nancy/lib/Nancy.0.17.1/lib/net40/Nancy.dll


BIN
nancy/lib/Nancy.Hosting.Aspnet.0.17.1/Nancy.Hosting.Aspnet.0.17.1.nupkg


+ 23 - 0
nancy/lib/Nancy.Hosting.Aspnet.0.17.1/Nancy.Hosting.Aspnet.0.17.1.nuspec

@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+  <metadata>
+    <id>Nancy.Hosting.Aspnet</id>
+    <version>0.17.1</version>
+    <title>Nancy.Hosting.Aspnet</title>
+    <authors>Andreas Håkansson,  Steven Robbins and contributors</authors>
+    <owners>Andreas Håkansson,  Steven Robbins and contributors</owners>
+    <licenseUrl>https://github.com/NancyFx/Nancy/blob/master/license.txt</licenseUrl>
+    <projectUrl>http://nancyfx.org/</projectUrl>
+    <iconUrl>http://nancyfx.org/nancy-nuget.png</iconUrl>
+    <requireLicenseAcceptance>false</requireLicenseAcceptance>
+    <description>Enables hosting Nancy on ASP.NET</description>
+    <summary>Nancy is a lightweight web framework for the .Net platform, inspired by Sinatra. Nancy aim at delivering a low ceremony approach to building light, fast web applications.</summary>
+    <releaseNotes />
+    <copyright>Andreas Håkansson, Steven Robbins and contributors</copyright>
+    <language>en-US</language>
+    <tags>Nancy ASP.NET</tags>
+    <dependencies>
+      <dependency id="Nancy" version="0.17.1" />
+    </dependencies>
+  </metadata>
+</package>

+ 14 - 0
nancy/lib/Nancy.Hosting.Aspnet.0.17.1/content/web.config.transform

@@ -0,0 +1,14 @@
+<configuration>
+  <system.web>
+    <httpHandlers>
+      <add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/>
+    </httpHandlers>
+  </system.web>
+
+  <system.webServer>
+    <validation validateIntegratedModeConfiguration="false"/>
+    <handlers>
+      <add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/>
+    </handlers>
+  </system.webServer>
+</configuration>

BIN
nancy/lib/Nancy.Hosting.Aspnet.0.17.1/lib/net40/Nancy.Hosting.Aspnet.dll


+ 1 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Readme.md

@@ -0,0 +1 @@
+These are MSBuild files that come with Visual Studio 2012 Update 2. They can be found in `C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0`.

+ 181 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.AllFilesInProjectFolder.targets

@@ -0,0 +1,181 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.AllFilesInProjectFolder.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for collecting all files in the project folder.
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project  xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="CollectFilesinFolder" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="EscapeTextForRegularExpressions" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="FilterByItems" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+  <!--ImportBefore Extension-->
+  <PropertyGroup>
+    <ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInProjectFolderTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInProjectFolderTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInProjectFolderTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInProjectFolderTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/>
+
+
+  <PropertyGroup>
+    <PublishPipelineCollectFilesCore>
+      $(PublishPipelineCollectFilesCore);
+      CollectFilesFromProjectFolder;
+     </PublishPipelineCollectFilesCore>
+    <_CollectFiles_IncludeIgnorableFile Condition="'$(_CollectFiles_IncludeIgnorableFile)'==''">False</_CollectFiles_IncludeIgnorableFile>
+
+    <!--Overwrite the default behavior.  Don't remove the web.debug.config -->
+    <ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">False</ExcludeTransformAssistFilesFromPublish>
+    <CollectFilesFromProjectFolder_ExcludeSccFiles Condition="'$(CollectFilesFromProjectFolder_ExcludeSccFiles)'==''">True</CollectFilesFromProjectFolder_ExcludeSccFiles>
+  </PropertyGroup>
+
+  <!--********************************************************************-->
+  <!-- Task SetExcludeFromProjectFolder -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <SetExcludeFromProjectFolderDependsOn Condition="'$(SetExcludeFromProjectFolderDependsOn)'==''">
+    </SetExcludeFromProjectFolderDependsOn>
+  </PropertyGroup>
+
+  <Target Name="SetExcludeFromProjectFolder"
+          DependsOnTargets="$(SetExcludeFromProjectFolderDependsOn)">
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_DefaultExcludeIntermediateOutputFolderMessage"
+      LogType="Message" />
+      
+    <GetPublishingLocalizedString
+          ID="PublishLocalizedString_DefaultExcludeFileExtentionOutMessage"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          ID="PublishLocalizedString_DefaultExcludeSourceControlItems"
+          LogType="Message" />
+
+    <!--Maybe we need to introduce @(_ExcludeFromProjectFolder)-->
+    <ItemGroup>
+
+      <!--Split item to _KnowProjectItems is to keep the metadata for item collection. 
+      Please see  http://msdn.microsoft.com/en-us/library/bb629388.aspx for known Project item collection.-->
+      <_KnownProjectItems Include="@(EmbeddedResource)" />
+      <_KnownProjectItems Include="@(None)" />
+      <_KnownProjectItems Include="@(Content)" />
+      <_KnownProjectItems Include="@(Compile)" />
+
+
+      <!--Explicit exclude all files under the obj folder -->
+      <_ProjectBaseIntermediateOutputPath Include="$(BaseIntermediateOutputPath)"/>
+      
+    </ItemGroup>
+
+    <!--Create the rgulare expression to exclude all root folder *.out, all folder *.scc and all folder*.vspscc file-->
+    <!--Note split by semicolon (;)-->
+    <PropertyGroup>
+      <_ExcludeRelativePathFromProjectFolder>^[^\\]*\.out$</_ExcludeRelativePathFromProjectFolder>
+    </PropertyGroup>
+
+    <!--Create the rgulare expression to exclude all Intermedidate output path.-->
+    <EscapeTextForRegularExpressions Text="@(_ProjectBaseIntermediateOutputPath->'%(FullPath)')">
+      <Output TaskParameter="Result" PropertyName="_ExcludeFullPathFromProjectFolder" />
+    </EscapeTextForRegularExpressions>
+
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromProjectFolder_ExcludeSccFiles -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromProjectFolder_ExcludeSccFilesDependsOn>
+      $(OnBeforeCollectFilesFromProjectFolder_ExcludeSccFiles);
+      $(CollectFilesFromProjectFolder_ExcludeSccFilesDependsOn);
+      SetExcludeFromProjectFolder;
+    </CollectFilesFromProjectFolder_ExcludeSccFilesDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromProjectFolder_ExcludeSccFiles"
+          DependsOnTargets="$(CollectFilesFromProjectFolder_ExcludeSccFilesDependsOn)"
+          Condition="$(CollectFilesFromProjectFolder_ExcludeSccFiles)">
+    <!--Note split by semicolon (;)-->
+    <PropertyGroup>
+      <_ExcludeRelativePathFromProjectFolder>$(_ExcludeRelativePathFromProjectFolder);[^\\]*\.scc$;[^\\]*\.vssscc$;[^\\]*\.vspscc$</_ExcludeRelativePathFromProjectFolder>
+    </PropertyGroup>
+
+    <CallTarget Targets="$(OnAfterCollectFilesFromProjectFolder_ExcludeSccFiles)" RunEachTargetSeparately="false" />
+  </Target>
+  
+  
+  
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromProjectFolder -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromProjectFolderDependsOn>
+      $(OnBeforeCollectFilesFromProjectFolder);
+      $(CollectFilesFromProjectFolderDependsOn);
+      SetExcludeFromProjectFolder;
+      CollectFilesFromProjectFolder_ExcludeSccFiles;
+    </CollectFilesFromProjectFolderDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromProjectFolder"
+          DependsOnTargets="$(CollectFilesFromProjectFolderDependsOn)" >
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherAllFilesInProjectFolderExceptExclusion"
+      LogType="Message" />
+
+    <CollectFilesinFolder RootPath="$(WebPublishPipelineProjectDirectory)"
+                          ExcludeFullPathMatchs="$(_ExcludeFullPathFromProjectFolder)"
+                          ExcludeRelativePathMatchs="$(_ExcludeRelativePathFromProjectFolder)" 
+                          SkipHiddenItems="$(_SkipHiddenItems)">
+      <Output TaskParameter="Result" ItemName="_AllFilesUnderProjectFolderNoMetadata" />
+    </CollectFilesinFolder>
+    
+
+    <!--The first two lines keeps the _KnowProjectItem's item metadata-->
+    <FilterByItems PipelineItems="@(_AllFilesUnderProjectFolderNoMetadata)"
+                   Filter="@(_KnownProjectItems)">
+      <Output TaskParameter="OutFilter" ItemName="_AllFilesUnderProjectFolderExceptKnownProjectItems"/>
+    </FilterByItems>
+    
+    <ItemGroup>
+      <!--Readd  _KnowProjectItem's to keep  item metadata. First for non-Link file -->
+      <FilesForPackagingFromProject Include="@(_KnownProjectItems)" Condition="'%(_KnownProjectItems.Link)'==''">
+        <DestinationRelativePath>%(_KnownProjectItems.Identity)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromProjectFolder.KonwnProjectItems</FromTarget>
+        <Category>AllFilesInProjectFolder</Category>
+      </FilesForPackagingFromProject>
+      <FilesForPackagingFromProject Include="@(_KnownProjectItems)"  Condition="'%(_KnownProjectItems.Link)'!='' And $(EnableCollectLinkFilesInProject)">
+        <DestinationRelativePath>%(_KnownProjectItems.Link)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromProjectFolder.KonwnProjectItems</FromTarget>
+        <Category>AllFilesInProjectFolder</Category>
+        <Exclude>$(ExcludeLinkFilesInProject)</Exclude>
+        <ProjectFileType>Link</ProjectFileType>
+      </FilesForPackagingFromProject>
+      
+      <FilesForPackagingFromProject Include="@(_AllFilesUnderProjectFolderExceptKnownProjectItems)" >
+        <DestinationRelativePath>%(_AllFilesUnderProjectFolderExceptKnownProjectItems.Identity)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromProjectFolder.ExceptKonwnProjectItems</FromTarget>
+        <Category>AllFilesInProjectFolder</Category>
+      </FilesForPackagingFromProject>
+
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromProjectFolder)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingAllFilesInProjectFolderTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingAllFilesInProjectFolderTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingAllFilesInProjectFolderTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingAllFilesInProjectFolderTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+</Project>
+

+ 242 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.AllFilesInTheProject.targets

@@ -0,0 +1,242 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.AllFilesInTheProject.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for collecting only project files .
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--ImportBefore Extension-->
+  <PropertyGroup>
+    <ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInTheProjectTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInTheProjectTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInTheProjectTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingAllFilesInTheProjectTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/>
+
+  <!--The following property need to set before import of Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets or it will set the property first-->
+  <PropertyGroup>
+    <!--Overwrite the default behavior.  Don't remove the web.debug.config -->
+    <ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">False</ExcludeTransformAssistFilesFromPublish>
+  </PropertyGroup>
+
+  <!--We need all of the item in the minimum run web needed-->
+  <Import Project="Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets"/>
+
+  <PropertyGroup>
+    <PublishPipelineCollectFilesCore>
+      $(PublishPipelineCollectFilesCore);
+      CollectFilesFromCompile;
+      CollectFilesFromEmbeddedResource;
+      CollectFilesFromNone;
+      CollectFilesFromBaseApplicationManifest;
+      CollectFilesFromProjectFile;
+    </PublishPipelineCollectFilesCore>
+  </PropertyGroup>
+
+  <!--MSBuild target does not have a good way to identify all item in the project yet. 
+  MSBuild team is working on this.  At the same time, we are working backward from only known common item collection from 
+  The following is base on http://msdn.microsoft.com/en-us/library/bb629388.aspx for common project item.
+  Note that Content Collection is already in the Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets-->
+  
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromCompile -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromCompileDependsOn>
+      $(OnBeforeCollectFilesFromCompile);
+      $(CollectFilesFromCompileDependsOn);
+    </CollectFilesFromCompileDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromCompile"
+          DependsOnTargets="$(CollectFilesFromCompileDependsOn)"
+          Condition="'@(Compile)'!=''">
+
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="Compile"
+      LogType="Message" />
+    <Message Text="@(Compile)" />
+    
+    <ItemGroup>
+      <FilesForPackagingFromProject Include="@(Compile)" Condition="'%(Compile.Link)'==''">
+        <DestinationRelativePath>%(Compile.Identity)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromCompile</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+      </FilesForPackagingFromProject>
+      <FilesForPackagingFromProject Include="@(Compile)" Condition="'%(Compile.Link)'!='' And $(EnableCollectLinkFilesInProject)">
+        <DestinationRelativePath>%(Compile.Link)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromCompile</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+        <Exclude>$(ExcludeLinkFilesInProject)</Exclude>
+        <ProjectFileType>Link</ProjectFileType>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromCompile)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromEmbeddedResource -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromEmbeddedResourceDependsOn>
+      $(OnBeforeCollectFilesFromEmbeddedResource);
+      $(CollectFilesFromEmbeddedResourceDependsOn);
+    </CollectFilesFromEmbeddedResourceDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromEmbeddedResource"
+          DependsOnTargets="$(CollectFilesFromEmbeddedResourceDependsOn)"
+          Condition="'@(EmbeddedResource)'!=''">
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="EmbeddedResource"
+      LogType="Message" />
+    <Message Text="@(EmbeddedResource)" />
+
+    <ItemGroup>
+      <FilesForPackagingFromProject Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.Link)'==''">
+        <DestinationRelativePath>%(EmbeddedResource.Identity)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromEmbeddedResource</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+      </FilesForPackagingFromProject>
+      <FilesForPackagingFromProject Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.Link)'!='' And $(EnableCollectLinkFilesInProject)">
+        <DestinationRelativePath>%(EmbeddedResource.Link)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromEmbeddedResource</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+        <Exclude>$(ExcludeLinkFilesInProject)</Exclude>
+        <ProjectFileType>Link</ProjectFileType>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromEmbeddedResource)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromNone -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromNoneDependsOn>
+      $(OnBeforeCollectFilesFromNone);
+      $(CollectFilesFromNoneDependsOn);
+    </CollectFilesFromNoneDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromNone"
+          DependsOnTargets="$(CollectFilesFromNoneDependsOn)"
+          Condition="'@(None)'!=''">
+
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="None"
+      LogType="Message" />
+    <Message Text="@(None)" />
+    
+    <ItemGroup>
+      <FilesForPackagingFromProject Include="@(None)" Condition="'%(None.Link)'==''">
+        <DestinationRelativePath>%(None.Identity)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromNone</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+      </FilesForPackagingFromProject>
+      <FilesForPackagingFromProject Include="@(None)" Condition="'%(None.Link)'!='' And $(EnableCollectLinkFilesInProject)" >
+        <DestinationRelativePath>%(None.Link)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromNone</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+        <Exclude>$(ExcludeLinkFilesInProject)</Exclude>
+        <ProjectFileType>Link</ProjectFileType>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromNone)" RunEachTargetSeparately="false" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromBaseApplicationManifest -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromBaseApplicationManifestDependsOn>
+      $(OnBeforeCollectFilesFromBaseApplicationManifest);
+      $(CollectFilesFromBaseApplicationManifestDependsOn);
+    </CollectFilesFromBaseApplicationManifestDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromBaseApplicationManifest"
+          DependsOnTargets="$(CollectFilesFromBaseApplicationManifestDependsOn)"
+          Condition="'@(BaseApplicationManifest)'!=''">
+
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="BaseApplicationManifest"
+      LogType="Message" />
+    <Message Text="@(BaseApplicationManifest)" />
+
+    <ItemGroup>
+      <FilesForPackagingFromProject Include="@(BaseApplicationManifest)" Condition="'%(BaseApplicationManifest.Link)'==''">
+        <DestinationRelativePath>%(BaseApplicationManifest.Identity)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromBaseApplicationManifest</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+      </FilesForPackagingFromProject>
+      <FilesForPackagingFromProject Include="@(BaseApplicationManifest)" Condition="'%(BaseApplicationManifest.Link)'!='' And $(EnableCollectLinkFilesInProject)">
+        <DestinationRelativePath>%(BaseApplicationManifest.Link)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromBaseApplicationManifest</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+        <Exclude>$(ExcludeLinkFilesInProject)</Exclude>
+        <ProjectFileType>Link</ProjectFileType>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromBaseApplicationManifest)" RunEachTargetSeparately="false" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromProjectFile -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromProjectFileDependsOn>
+      $(OnBeforeCollectFilesFromProjectFile);
+      $(CollectFilesFromProjectFileDependsOn);
+    </CollectFilesFromProjectFileDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromProjectFile"
+          DependsOnTargets="$(CollectFilesFromProjectFileDependsOn)">
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="ProjectFiles"
+      LogType="Message" />
+    <Message Text="$(MSBuildProjectFile);$(MSBuildProjectFile).user" />
+
+    <ItemGroup>
+      <FilesForPackagingFromProject Include="$(MSBuildProjectFile)">
+        <DestinationRelativePath>$(MSBuildProjectFile)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromProjectFile</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+      </FilesForPackagingFromProject>
+      <FilesForPackagingFromProject Include="$(MSBuildProjectFile).user" Condition="Exists('$(MSBuildProjectFile).user')">
+        <DestinationRelativePath>$(MSBuildProjectFile).user</DestinationRelativePath>
+        <FromTarget>CollectFilesFromProjectFile</FromTarget>
+        <Category>ProjectNotRunRequired</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromProjectFile)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingAllFilesInTheProjectTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingAllFilesInTheProjectTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingAllFilesInTheProjectTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingAllFilesInTheProjectTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+</Project>

+ 445 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets

@@ -0,0 +1,445 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for collecting only files to run the web appliation.
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="FilterByItems" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+  <!--ImportBefore Extension-->
+  <PropertyGroup>
+    <ImportByWildcardBeforeMicrosoftWebPublishingOnlyFilesToRunTheAppTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingOnlyFilesToRunTheAppTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingOnlyFilesToRunTheAppTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingOnlyFilesToRunTheAppTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/>
+
+  <PropertyGroup>
+    <PublishPipelineCollectFilesCore>
+      $(PublishPipelineCollectFilesCore);
+      CollectFilesFromIntermediateAssembly;
+      CollectFilesFromContent;
+      CollectFilesFromAddModules;
+      CollectFilesFrom_SGenDllCreated;
+      CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath;
+      CollectFilesFromReference;
+      CollectFilesFromAllExtraReferenceFiles;
+      CollectFilesFrom_SourceItemsToCopyToOutputDirectory;
+      CollectFilesFromDocFileItem;
+      CollectFilesFrom_WebApplicationSilverlightXapFiles;
+      CollectFilesFrom_binDeployableAssemblies;
+    </PublishPipelineCollectFilesCore>
+    <ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">True</ExcludeTransformAssistFilesFromPublish>
+  </PropertyGroup>
+  
+  <!--***************************************************************-->
+  <!-- Task CollectFilesFromIntermediateAssembly                     -->
+  <!-- Note $(OutDir) can be not in the bin like in Team build system -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromIntermediateAssemblyDependsOn>
+      $(OnBeforeCollectFilesFromIntermediateAssembly);
+      $(CollectFilesFromIntermediateAssemblyDependsOn);
+    </CollectFilesFromIntermediateAssemblyDependsOn>
+  </PropertyGroup>
+
+  <Target Name="CollectFilesFromIntermediateAssembly"
+          DependsOnTargets="$(CollectFilesFromIntermediateAssemblyDependsOn)"
+          Condition="'@(IntermediateAssembly)'!=''">
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="IntermediateAssembly"
+      LogType="Message" />
+    <Message Text="@(IntermediateAssembly->'$(OutDir)%(FileName)%(Extension) to bin\%(FileName)%(Extension)')" />
+    
+    <ItemGroup>
+      <FilesForPackagingFromProject
+        Include="@(IntermediateAssembly->'$(OutDir)%(FileName)%(Extension)')">
+        <DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromIntermediateAssembly</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <Message Text="@(IntermediateAssembly->'$(OutDir)%(FileName).pdb to bin\%(FileName).pdb')"
+             Condition="$(_DebugSymbolsProduced) AND !$(ExcludeGeneratedDebugSymbol) AND Exists(@(IntermediateAssembly->'$(OutDir)%(FileName).pdb')) "/>
+    <ItemGroup Condition="$(_DebugSymbolsProduced) AND !$(ExcludeGeneratedDebugSymbol) AND Exists(@(IntermediateAssembly->'$(OutDir)%(FileName).pdb'))">
+      <FilesForPackagingFromProject
+        Include="@(IntermediateAssembly->'$(OutDir)%(FileName).pdb')"
+        Condition="Exists(@(IntermediateAssembly->'$(OutDir)%(FileName).pdb'))">
+        <DestinationRelativePath>bin\%(FileName).pdb</DestinationRelativePath>
+        <FromTarget>CollectFilesFromIntermediateAssembly</FromTarget>
+        <Category>Debug</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+
+    <CallTarget Targets="$(OnAfterCollectFilesFromIntermediateAssembly)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromContent -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromContentDependsOn>
+      $(OnBeforeCollectFilesFromContent);
+      $(CollectFilesFromContentDependsOn);
+    </CollectFilesFromContentDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromContent"
+          DependsOnTargets="$(CollectFilesFromContentDependsOn)"
+          Condition="'@(Content)'!=''">
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="Content"
+      LogType="Message" />
+    <Message Text="@(Content)" />
+    
+    <ItemGroup>
+      <FilesForPackagingFromProject Include="@(Content)" Condition="'%(Content.Link)'==''">
+        <DestinationRelativePath>%(Content.Identity)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromContent</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+      <FilesForPackagingFromProject Include="@(Content)" Condition="'%(Content.Link)'!='' And $(EnableCollectLinkFilesInProject)">
+        <DestinationRelativePath>%(Content.Link)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromContent</FromTarget>
+        <Category>Run</Category>
+        <Exclude>$(ExcludeLinkFilesInProject)</Exclude>
+        <ProjectFileType>Link</ProjectFileType>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromContent)" RunEachTargetSeparately="false" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromAddModules -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromAddModulesDependsOn>
+      $(OnBeforeCollectFilesFromAddModulesDependsOn);
+      $(CollectFilesFromAddModulesDependsOn);
+    </CollectFilesFromAddModulesDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromAddModules"
+          DependsOnTargets="$(CollectFilesFromAddModulesDependsOn)"
+          Condition="'@(AddModules)'!=''">
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificOutputsFromProject"
+      ArgumentCount="1"
+      Arguments="AddModules"
+      LogType="Message" />
+    <Message Text="@(AddModules->'$(OutDir)%(FileName)%(Extension) to bin\%(FileName)%(Extension)')"/>
+    <ItemGroup>
+      <FilesForPackagingFromProject  Include="@(AddModules->'$(OutDir)%(FileName)%(Extension)')">
+        <DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromAddModules</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromAddModulesDependsOn)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFrom_SGenDllCreated -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFrom_SGenDllCreatedDependsOn>
+      $(OnBeforeCollectFilesFrom_SGenDllCreated);
+      $(CollectFilesFrom_SGenDllCreatedDependsOn);
+    </CollectFilesFrom_SGenDllCreatedDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFrom_SGenDllCreated"
+          DependsOnTargets="$(CollectFilesFrom_SGenDllCreatedDependsOn)"
+          Condition="$(_SGenDllCreated)">
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificOutputsFromProject"
+      ArgumentCount="1"
+      Arguments="_SGenDllName"
+      LogType="Message" />
+    <Message Text="bin\$(_SGenDllName)" />
+    
+    <ItemGroup>
+      <FilesForPackagingFromProject  Include="$(OutDir)$(_SGenDllName)">
+        <DestinationRelativePath>bin\$(_SGenDllName)</DestinationRelativePath>
+        <FromTarget>CollectFilesFrom_SGenDllCreated</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFrom_SGenDllCreated)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromIntermediateSatelliteAssembliesWithTargetPathDependsOn>
+      $(OnBeforeCollectFilesFromIntermediateSatelliteAssembliesWithTargetPath);
+      $(CollectFilesFromIntermediateSatelliteAssembliesWithTargetPathDependsOn);
+    </CollectFilesFromIntermediateSatelliteAssembliesWithTargetPathDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath"
+          DependsOnTargets="$(CollectFilesFromIntermediateSatelliteAssembliesWithTargetPathDependsOn)">
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificOutputsFromProject"
+      ArgumentCount="1"
+      Arguments="IntermediateSatelliteAssembliesWithTargetPath"
+      LogType="Message" />
+    <Message Text="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(TargetPath) to bin\%(TargetPath)')"
+             Condition="Exists('$(OutDir)\%(TargetPath)')"/>
+    <ItemGroup>
+      <FilesForPackagingFromProject
+        Include="@(IntermediateSatelliteAssembliesWithTargetPath->'$(OutDir)%(TargetPath)')">
+        <DestinationRelativePath>bin\%(IntermediateSatelliteAssembliesWithTargetPath.TargetPath)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromIntermediateSatelliteAssembliesWithTargetPath)"  RunEachTargetSeparately="false" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromReference -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromReferenceDependsOn>
+      $(OnBeforeCollectFilesFromReference);
+      $(CollectFilesFromReferenceDependsOn);
+      ResolveProjectReferences;
+      ResolveAssemblyReferences;
+    </CollectFilesFromReferenceDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromReference"
+          DependsOnTargets="$(CollectFilesFromReferenceDependsOn)">
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProjectNoDetail"
+      ArgumentCount="1"
+      Arguments="ReferenceCopyLocalPaths,ReferenceComWrappersToCopyLocal,ResolvedIsolatedComModules,_DeploymentLooseManifestFile,NativeReferenceFile"
+      LogType="Message" />
+
+    <ItemGroup>
+      <FilesForPackagingFromProject
+        Include="@(ReferenceCopyLocalPaths)">
+        <DestinationRelativePath>bin\%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromReference</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    
+    <ItemGroup>
+      <FilesForPackagingFromProject
+        Include="@(ReferenceComWrappersToCopyLocal); 
+                @(ResolvedIsolatedComModules); 
+                @(_DeploymentLooseManifestFile); 
+                @(NativeReferenceFile)">
+        <DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromReference</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromReference)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromAllExtraReferenceFiles -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromAllExtraReferenceFilesDependsOn>
+      $(OnBeforeCollectFilesFromAllExtraReferenceFiles);
+      $(CollectFilesFromAllExtraReferenceFilesDependsOn);
+    </CollectFilesFromAllExtraReferenceFilesDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromAllExtraReferenceFiles"
+          DependsOnTargets="$(CollectFilesFromAllExtraReferenceFilesDependsOn)">
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="AllExtraReferenceFiles"
+      LogType="Message" />
+    <Message Text="@(AllExtraReferenceFiles->'$(OutDir)%(FileName)%(Extension)')" />
+    <ItemGroup>
+      <FilesForPackagingFromProject  Include="@(AllExtraReferenceFiles->'$(OutDir)%(FileName)%(Extension)')">
+        <DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromAllExtraReferenceFiles</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromAllExtraReferenceFiles)" RunEachTargetSeparately="false"/>
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFrom_SourceItemsToCopyToOutputDirectory -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    
+    <CollectFilesFrom_SourceItemsToCopyToOutputDirectoryDependsOn>
+      $(OnBeforeCollectFilesFrom_SourceItemsToCopyToOutputDirectory);
+      $(CollectFilesFrom_SourceItemsToCopyToOutputDirectoryDependsOn);
+    </CollectFilesFrom_SourceItemsToCopyToOutputDirectoryDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFrom_SourceItemsToCopyToOutputDirectory"
+          DependsOnTargets="$(CollectFilesFrom_SourceItemsToCopyToOutputDirectoryDependsOn)"
+          Condition="'@(_SourceItemsToCopyToOutputDirectoryAlways)' != '' or '@(_SourceItemsToCopyToOutputDirectory)' != ''">
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="_SourceItemsToCopyToOutputDirectoryAlways,_SourceItemsToCopyToOutputDirectory"
+      LogType="Message" />
+    
+    <ItemGroup>
+      <_TempSourceItemsToCopyToOutputDirectory Include="@(_SourceItemsToCopyToOutputDirectoryAlways); @(_SourceItemsToCopyToOutputDirectory)" />
+    </ItemGroup>
+
+    <Message Text="@(_TempSourceItemsToCopyToOutputDirectory->'bin\%(TargetPath)')" />
+    <ItemGroup>
+      <FilesForPackagingFromProject
+        Include="@(_TempSourceItemsToCopyToOutputDirectory)">
+        <DestinationRelativePath>bin\%(_TempSourceItemsToCopyToOutputDirectory.TargetPath)</DestinationRelativePath>
+        <FromTarget>CollectFilesFrom_SourceItemsToCopyToOutputDirectory</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFrom_SourceItemsToCopyToOutputDirectory)" RunEachTargetSeparately="false" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFromDocFileItem -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFromDocFileItemDependsOn>
+      $(OnBeforeCollectFilesFromDocFileItem);
+      $(CollectFilesFromDocFileItemDependsOn);
+    </CollectFilesFromDocFileItemDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFromDocFileItem"
+          DependsOnTargets="$(CollectFilesFromDocFileItemDependsOn)"
+          Condition="$(_DocumentationFileProduced)" >
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="DocFileItem"
+      LogType="Message" />
+    <Message Text="@(DocFileItem->'bin\%(FileName)%(Extension)')" />
+    <ItemGroup>
+      <FilesForPackagingFromProject
+        Include="@(DocFileItem)">
+        <DestinationRelativePath>bin\%(FileName)%(Extension)</DestinationRelativePath>
+        <FromTarget>CollectFilesFromDocFileItem</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFromDocFileItem)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFrom_WebApplicationSilverlightXapFiles -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFrom_WebApplicationSilverlightXapFilesDependsOn>
+      $(OnBeforeCollectFilesFrom_WebApplicationSilverlightXapFiles);
+      $(CollectFilesFrom_WebApplicationSilverlightXapFilesDependsOn);
+    </CollectFilesFrom_WebApplicationSilverlightXapFilesDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFrom_WebApplicationSilverlightXapFiles"
+          DependsOnTargets="$(CollectFilesFrom_WebApplicationSilverlightXapFilesDependsOn)"
+          Condition="'@(_WebApplicationSilverlightXapFiles)'!=''">
+    
+    <FilterByItems PipelineItems="@(_WebApplicationSilverlightXapFiles)"
+                   Filter="@(Content)">
+      <Output TaskParameter="OutFilter" ItemName="_WebApplicationSilverlightXapFilesNotInContent"/>
+    </FilterByItems>
+
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="_WebApplicationSilverlightXapFilesNotInContent"
+      LogType="Message" />
+    <Message Text="@(_WebApplicationSilverlightXapFilesNotInContent)" />
+    <ItemGroup>
+      <FilesForPackagingFromProject Include="@(_WebApplicationSilverlightXapFilesNotInContent)">
+        <DestinationRelativePath>%(_WebApplicationSilverlightXapFiles.Identity)</DestinationRelativePath>
+        <FromTarget>CollectFilesFrom_WebApplicationSilverlightXapFiles</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFrom_WebApplicationSilverlightXapFiles)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Task CollectFilesFrom_binDeployableAssemblies -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesFrom_binDeployableAssembliesDependsOn>
+      $(OnBeforeCollectFilesFrom_binDeployableAssemblies);
+      $(CollectFilesFrom_binDeployableAssembliesDependsOn);
+      _CopyBinDeployableAssemblies;
+    </CollectFilesFrom_binDeployableAssembliesDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectFilesFrom_binDeployableAssemblies"
+          DependsOnTargets="$(CollectFilesFrom_binDeployableAssembliesDependsOn)">
+    <!--Make sure binDeployableAssemblies is in None group.  This is mainly for the dev10-->
+    <FilterByItems PipelineItems="@(_binDeployableAssemblies)"
+                   SourceMetadataName="FullPath"
+                   Filter="@(None)"
+                   FilterMetadataName="FullPath">
+      <Output TaskParameter="InFilter" ItemName="_binDeployableAssemblies_None"/>
+    </FilterByItems>
+    <!--Get Localized string before display message-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_GatherSpecificItemsFromProject"
+      ArgumentCount="1"
+      Arguments="_binDeployableAssemblies"
+      LogType="Message" />
+    <Message Text="@(_binDeployableAssemblies_None)" />
+    
+    <ItemGroup>
+      <FilesForPackagingFromProject Include="@(_binDeployableAssemblies_None)" Condition="'%(_binDeployableAssemblies_None.DestinationRelPath)'==''">
+        <DestinationRelativePath>bin\%(RecursiveDir)%(FileName)%(Extension)</DestinationRelativePath>
+        <FromTarget>CollectFilesFrom_binDeployableAssemblies_NoDestinationRelPath</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+      <!--VS11, _binDeployAssembly begin to have %(DestinationRelPath), we should honer that instead of %(recursiveDir)-->
+      <FilesForPackagingFromProject Include="@(_binDeployableAssemblies_None)" Condition="'%(_binDeployableAssemblies_None.DestinationRelPath)'!=''">
+        <DestinationRelativePath>bin\%(_binDeployableAssemblies_None.DestinationRelPath)%(FileName)%(Extension)</DestinationRelativePath>
+        <FromTarget>CollectFilesFrom_binDeployableAssemblies_WithDestinationRelPath</FromTarget>
+        <Category>Run</Category>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesFrom_binDeployableAssemblies)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingOnlyFilesToRunTheAppTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingOnlyFilesToRunTheAppTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingOnlyFilesToRunTheAppTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingOnlyFilesToRunTheAppTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+</Project>

+ 59 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FPSE.targets

@@ -0,0 +1,59 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.Deploy.FPSE.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for Deploy 
+Currently
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+
+  <!--Append WebFTPPublish to the supported list.-->
+  <PropertyGroup>
+    <_WPPWebPublishMethodSupports>$(_WPPWebPublishMethodSupports);WebFPSEPublish</_WPPWebPublishMethodSupports>
+  </PropertyGroup>
+
+
+  <!--********************************************************************-->
+  <!--Target WebFPSEPublish -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <WebFPSEPublishDependsOn>
+      $(OnBeforeWebFPSEPublish);
+      $(WebFPSEPublishDependsOn);
+    </WebFPSEPublishDependsOn>
+  </PropertyGroup>
+
+  <Target Name="WebFPSEPublish"
+          DependsOnTargets="$(WebFPSEPublishDependsOn)"
+          Condition="'$(WebFPSEPublish)' != 'False'">
+
+    <!--This is not yet implemented through the command line for now error it out-->
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishMethodIsNotSupportedInCmdLine"
+       ArgumentCount="1"
+       Arguments="$(WebPublishMethod)"
+       LogType="Error" />
+
+    <Error  Text ="Target WebFPSEPublish Failed" />
+
+    <CallTarget Targets="$(OnAfterWebFPSEPublish)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingDeployFPSETargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFPSETargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployFPSETargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFPSETargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+</Project>

+ 60 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FTP.targets

@@ -0,0 +1,60 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.Deploy.FTP.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for Deploy 
+Currently
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+
+  <!--Append WebFTPPublish to the supported list.-->
+  <PropertyGroup>
+    <_WPPWebPublishMethodSupports>$(_WPPWebPublishMethodSupports);WebFTPPublish</_WPPWebPublishMethodSupports>
+  </PropertyGroup>
+
+
+  <!--********************************************************************-->
+  <!--Target WebFTPPublish -->
+  <!--Current this is not supported through the command line, show the error message.-->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <WebFTPPublishDependsOn>
+      $(OnBeforeWebFTPPublish);
+      $(WebFTPPublishDependsOn);
+    </WebFTPPublishDependsOn>
+  </PropertyGroup>
+
+  <Target Name="WebFTPPublish"
+          DependsOnTargets="$(WebFTPPublishDependsOn)"
+          Condition="'$(WebFTPPublish)' != 'False'">
+
+    <!--This is not yet implemented through the command line for Log the error -->
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishMethodIsNotSupportedInCmdLine"
+       ArgumentCount="1"
+       Arguments="$(WebPublishMethod)"
+       LogType="Error" />
+
+    <Error  Text ="Target WebFTPPublish Failed" />
+
+    <CallTarget Targets="$(OnAfterWebFTPPublish)" RunEachTargetSeparately="False" />
+  </Target>
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingDeployFTPTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFTPTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployFTPTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFTPTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+
+</Project>

+ 116 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FileSystem.targets

@@ -0,0 +1,116 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.Deploy.FPSE.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for Deploy 
+Currently
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CopyPipelineFiles"  AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+
+  <!--Append WebFTPPublish to the supported list.-->
+  <PropertyGroup>
+    <_WPPWebPublishMethodSupports>$(_WPPWebPublishMethodSupports);WebFileSystemPublish</_WPPWebPublishMethodSupports>
+  </PropertyGroup>
+
+
+
+  <!--********************************************************************-->
+  <!--Target WebFileSystemPublish -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <WebFileSystemPublishDependsOn>
+      $(OnBeforeWebFileSystemPublish);
+      $(WebFileSystemPublishDependsOn);
+    </WebFileSystemPublishDependsOn>
+    <WebFileSystemPublishDependsOn>
+      $(WebFileSystemPublishDependsOn);
+      PipelinePreDeployCopyAllFilesToOneFolder;
+    </WebFileSystemPublishDependsOn>
+  </PropertyGroup>
+
+  <Target Name="WebFileSystemPublish"
+          DependsOnTargets="$(WebFileSystemPublishDependsOn)"
+          Condition="'$(WebFileSystemPublish)' != 'False'">
+
+    <PropertyGroup>
+      <_DoWebFileSystemPublishDeleteExtraFiles>False</_DoWebFileSystemPublishDeleteExtraFiles>
+      <_DoWebFileSystemPublishDeleteExtraFiles  Condition= "'$(DeleteExistingFiles)' == 'True'" >True</_DoWebFileSystemPublishDeleteExtraFiles>
+      <_HttpHeader>http://</_HttpHeader>
+      <_DoWebFileSystemPublish>False</_DoWebFileSystemPublish>
+      <_DoWebFileSystemPublish Condition="'$(PublishUrl)'!='' And '$(PublishUrl.StartsWith($(_HttpHeader),  StringComparison.OrdinalIgnoreCase))' == 'False' And '$([System.IO.Path]::GetFullPath($(PublishUrl)))' != ''">True</_DoWebFileSystemPublish>
+    </PropertyGroup>
+
+    <!--This is not yet implemented through the command line for now error it out-->
+    <GetPublishingLocalizedString
+      Condition="!$(_DoWebFileSystemPublish)"
+      ID="PublishLocalizedString_WebPublishMethodIsNotSupportedInCmdLine"
+       ArgumentCount="1"
+       Arguments="$(WebPublishMethod)"
+       LogType="Error" />
+
+    <Error  Text ="Target WebFileSystemPublish Failed"
+      Condition="!$(_DoWebFileSystemPublish)"
+            />
+
+    <ItemGroup Condition="$(_DoWebFileSystemPublish)">
+      <FilesForFileCopy Remove="$(FilesForFileCopy)" />
+    </ItemGroup>
+
+    <CollectFilesinFolder RootPath="$(WPPAllFilesInSingleFolder)"
+                          Condition="$(_DoWebFileSystemPublish)" >
+      <Output TaskParameter="Result" ItemName="_AllFilesUnder_WPPAllFilesInSingleFolder" />
+    </CollectFilesinFolder>
+
+    <ItemGroup>
+      <FilesForFileCopy Include="@(_AllFilesUnder_WPPAllFilesInSingleFolder)" >
+        <DestinationRelativePath>%(_AllFilesUnder_WPPAllFilesInSingleFolder.Identity)</DestinationRelativePath>
+        <FromTarget>WebFileSystemPublish</FromTarget>
+        <Category>AllFilesInFolder</Category>
+      </FilesForFileCopy>
+    </ItemGroup>
+
+
+    <!-- In the case of the incremental Packaging/Publish, we need to find out the extra file and delee them-->
+    <ItemGroup  Condition="'$(DeleteExistingFiles)' == 'True'">
+      <_AllExtraFilesUnderPublishUrl Include="$(PublishUrl)\**" />
+      <_AllExtraFilesUnderPublishUrl
+        Remove="@(FilesForFileCopy->'$(PublishUrl)\%(DestinationRelativePath)')" />
+    </ItemGroup>
+    <!--Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject-->
+    <Delete Files="@(_AllExtraFilesUnderPublishUrl)" />
+    <!-- Make sure the folder exist -->
+    <MakeDir Directories="$(PublishUrl)" Condition="$(_DoWebFileSystemPublish) And !Exists('$(PublishUrl)')"/>
+
+    <!--Force Copy Of all file to the WPPAllFilesInSingleFolder if needed-->
+    <CopyPipelineFiles Condition="$(_DoWebFileSystemPublish)"
+                           PipelineItems="@(FilesForFileCopy)"
+                           SourceDirectory="$(WPPAllFilesInSingleFolder)"
+                           TargetDirectory="$(PublishUrl)"
+                           SkipMetadataExcludeTrueItems="False"
+                           UpdateItemSpec="True"
+                           DeleteItemsMarkAsExcludeTrue ="False">
+      <Output TaskParameter="ResultPipelineItems" ItemName="_FilesForFileCopyAfterFileSystemPublish"/>
+    </CopyPipelineFiles>
+
+
+    <CallTarget Targets="$(OnAfterWebFileSystemPublish)" RunEachTargetSeparately="False" />
+  </Target>
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingDeployFileSystemTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFileSystemTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployFileSystemTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployFileSystemTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+</Project>

+ 49 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.MsDeploy.targets

@@ -0,0 +1,49 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.Deploy.MSDeploy.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for Deploy 
+Currently
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+  <!--ImportBefore Extension-->
+  <PropertyGroup>
+    <ImportByWildcardBeforeMicrosoftWebPublishingDeployMSDeployTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingDeployMSDeployTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingDeployMSDeployTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingDeployMSDeployTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/>
+
+  <!--This only support new /t:WebPublish with the 'WebPublishMethod'=='MSDeploy'-->
+
+
+  <PropertyGroup>
+    <Microsoft_Web_Publishing_MSDeploy_Common_targets Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets)' == ''">Microsoft.Web.Publishing.MSDeploy.Common.targets</Microsoft_Web_Publishing_MSDeploy_Common_targets>
+  </PropertyGroup>
+  <Import Project="$(Microsoft_Web_Publishing_MSDeploy_Common_targets)" Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets_Imported)' != 'true' And Exists($(Microsoft_Web_Publishing_MSDeploy_Common_targets))"/>
+
+  <PropertyGroup>
+    <Microsoft_Web_Publishing_Deploy_MSDeploy_targets_Imported>True</Microsoft_Web_Publishing_Deploy_MSDeploy_targets_Imported>
+    <PipelineDeployPhaseDependsOn>
+      $(PipelineDeployPhaseDependsOn);
+      PipelineMsdeploySpecificTransformPhase;
+    </PipelineDeployPhaseDependsOn>
+  </PropertyGroup>
+
+
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingDeployMSDeployTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployMSDeployTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployMSDeployTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployMSDeployTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+</Project>

+ 54 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.Package.targets

@@ -0,0 +1,54 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.Deploy.Package.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for Deploy 
+Currently
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="MSDeploy" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="VSMSDeploy" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ImportParametersFile" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ExportParametersFile" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="SortParametrsByPriority" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+
+  <!--ImportBefore Extension-->
+  <PropertyGroup>
+    <ImportByWildcardBeforeMicrosoftWebPublishingDeployPackageTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingDeployPackageTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingDeployPackageTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingDeployPackageTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/>
+
+  <PropertyGroup>
+    <Microsoft_Web_Publishing_MSDeploy_Common_targets Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets)' == ''">Microsoft.Web.Publishing.MSDeploy.Common.targets</Microsoft_Web_Publishing_MSDeploy_Common_targets>
+  </PropertyGroup>
+  <Import Project="$(Microsoft_Web_Publishing_MSDeploy_Common_targets)" Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets_Imported)' != 'true' And Exists($(Microsoft_Web_Publishing_MSDeploy_Common_targets))"/>
+
+  <PropertyGroup>
+    <Microsoft_Web_Publishing_Deploy_Package_targets_Imported>True</Microsoft_Web_Publishing_Deploy_Package_targets_Imported>
+    <PipelineDeployPhaseDependsOn>
+      $(PipelineDeployPhaseDependsOn);
+      PipelineMsdeploySpecificTransformPhase;
+    </PipelineDeployPhaseDependsOn>
+  </PropertyGroup>
+  
+  
+  
+
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingDeployPackageTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployPackageTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingDeployPackageTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingDeployPackageTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+</Project>

+ 1192 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.MsDeploy.Common.targets

@@ -0,0 +1,1192 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.MSDeploy.Common.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for Deploy 
+Currently
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="MSDeploy" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="VSMSDeploy" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ImportParametersFile" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ExportParametersFile" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="SortParametrsByPriority" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CreateProviderList" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+  <!--ImportBefore Extension-->
+  <PropertyGroup>
+    <ImportByWildcardBeforeMicrosoftWebPublishingMSDeployCommonTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingMSDeployCommonTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingMSDeployCommonTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingMSDeployCommonTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/>
+
+  <!--Indicate that we already imported to avoid duplicate import-->
+  <PropertyGroup>
+    <Microsoft_Web_Publishing_MSDeploy_Common_targets_Imported>True</Microsoft_Web_Publishing_MSDeploy_Common_targets_Imported>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <InsertEFCodeFirstDeployWebCofig Condition="'$(InsertEFCodeFirstDeployWebCofig)' == ''">True</InsertEFCodeFirstDeployWebCofig>
+    <InsertEFCodeFirstDeployWebCofigIntermediateOutput Condition="'$(InsertEFCodeFirstDeployWebCofigIntermediateOutput)'==''">InsertEFCodeFirstDeploy</InsertEFCodeFirstDeployWebCofigIntermediateOutput>
+    <InsertEFCodeFirstDeployWebCofigLocation Condition="'$(InsertEFCodeFirstDeployWebCofigLocation)'==''">$(_WPPDefaultIntermediateOutputPath)$(InsertEFCodeFirstDeployWebCofigIntermediateOutput)</InsertEFCodeFirstDeployWebCofigLocation>
+  </PropertyGroup>
+  
+  <!--********************************************************************-->
+  <!-- ProcessPublishDatabaseSettings  -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PublishDatabases Condition="'$(PublishDatabases)'==''">True</PublishDatabases>
+    <ProcessPublishDatabaseSettingsDependsOn>
+      GetMSDeployInstalledVersionPath;
+    </ProcessPublishDatabaseSettingsDependsOn>
+  </PropertyGroup>
+
+  <Target Name="ProcessPublishDatabaseSettings" DependsOnTargets="$(ProcessPublishDatabaseSettingsDependsOn)" Condition="$(PublishDatabases) And '$(FilePreview)'!='true' And ('$(PublishDatabaseSettings)' != '' Or '$(PublishDatabaseSettingsFile)' != '')">
+
+    <MakeDir Directories="$(DatabaseDeployIntermediateOutputPath)" Condition="!Exists($(DatabaseDeployIntermediateOutputPath))" />
+    <CreateProviderList ProjectFileFullPath="$(WebPublishPipeLineProjectFullPath)"
+                        ProvidersXml="$(PublishDatabaseSettings)"
+                        IntermediateOutputPath="$(DatabaseDeployIntermediateOutputPath)"
+                        MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+                        UseMSDeployExe="$(UseMsdeployExe)"
+                        MSDeployExePath="$(MSDeployPath)"
+                        ImportInSyncCheck="$(VerifyDatabaseSettingWithImport)"
+                        LocalDBVersionToUseForSqlExpress="$(_LocalDBVersionToUseForSqlExpress)"
+                        Condition="'$(PublishDatabaseSettings)' != ''">
+      <Output TaskParameter="List" ItemName="_DatabasesToPackage" />
+      <Output TaskParameter="SourceManifest" ItemName="_DatabasesToSourceManifest" />
+    </CreateProviderList>
+    <CreateProviderList ProjectFileFullPath="$(WebPublishPipeLineProjectFullPath)"
+                        ProvidersFile="$(PublishDatabaseSettingsFile)"
+                        IntermediateOutputPath="$(DatabaseDeployIntermediateOutputPath)"
+                        MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+                        UseMSDeployExe="$(UseMsdeployExe)"
+                        MSDeployExePath="$(MSDeployPath)"
+                        ImportInSyncCheck="$(VerifyDatabaseSettingWithImport)"
+                        LocalDBVersionToUseForSqlExpress="$(_LocalDBVersionToUseForSqlExpress)"
+                        Condition="'$(PublishDatabaseSettingsFile)' != ''">
+      <Output TaskParameter="List" ItemName="_DatabasesToPackage" />
+      <Output TaskParameter="SourceManifest" ItemName="_DatabasesToSourceManifest" />
+    </CreateProviderList>
+
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                   Encoding="utf-8"
+                   File="$(PackageLogDir)\DatabasesToPackage.txt"
+                   Lines="@(_DatabasesToPackage->'
+                      Name:%(Identity) 
+                      SourceProvider:%(SourceProvider)
+                      SourcePath=%(SourcePath)
+                      SourcePath_RegExExcaped=%(SourcePath_RegExExcaped)
+                      DestinationGroup=%(DestinationGroup)')" Overwrite="True" />
+
+  </Target>
+
+
+
+  <!--********************************************************************-->
+  <!-- ParseSQLScriptForMSDeployParameters  -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PublishDatabases Condition="'$(PublishDatabases)'==''">True</PublishDatabases>
+    <ParseSQLScriptForMSDeployParametersDependsOn>
+      $(ParseSQLScriptForMSDeployParametersDependsOn);
+      GetMSDeployInstalledVersionPath;
+      ProcessPublishDatabaseSettings;
+    </ParseSQLScriptForMSDeployParametersDependsOn>
+  </PropertyGroup>
+  <Target Name="ParseSQLScriptForMSDeployParameters" DependsOnTargets="$(ParseSQLScriptForMSDeployParametersDependsOn)" Condition="$(PublishDatabases) And ('$(PublishDatabaseSettings)' != '' Or '$(PublishDatabaseSettingsFile)' != '')">
+    <ItemGroup>
+      <_DatabasesToPackageForSQL  Include="@(_DatabasesToPackage)"
+                                  Condition="$(EnableSqlScriptVariableParameterize) 
+                                              And '%(_DatabasesToPackage.SourceProvider)' == 'DbFullSql' 
+                                              And '%(_DatabasesToPackage.SourcePath)' != '' 
+                                              And Exists('%(_DatabasesToPackage.SourcePath)') 
+                                              And '$([System.IO.Path]::GetExtension($([System.String]::new(%(_DatabasesToPackage.SourcePath)))))' == '.sql'">
+      </_DatabasesToPackageForSQL>
+    </ItemGroup>
+
+    <!-- this is very costly operation depend on sql file size. For example,  256 Meg sql file, it takes about 11 second to process (merely open it and scan it.)
+         We should avoid process if we have any knowledge on the sql file-->
+    <SqlScriptPreprocessSqlVariables
+      UnsupportedKeywords="$(MsdeploySqlUnsupportedCommand)"
+      CheckForUnsupportCommands="$(CheckSqlScriptForUnsupportedCommands)"
+      TreadSqlScriptUnsupportedCommandsAsWarning="$(TreadSqlScriptUnsupportedCommandsAsWarning)"
+      SqlScriptFile="%(_DatabasesToPackageForSQL.SourcePath)"
+      DestinationGroup="%(_DatabasesToPackageForSQL.DestinationGroup)"
+      ResolveIncludes="$(SqlScriptPreProcessResolveIncludes)"
+      BatchDelimiter="$(SqlScriptPreProcessBatchDelimiter)"
+      Condition="$(EnableSqlScriptVariableParameterize) And '%(_DatabasesToPackageForSQL.SourcePath)' != '' And Exists('%(_DatabasesToPackageForSQL.SourcePath)')  ">
+      <Output TaskParameter="List" ItemName="_DatabasesToPackage_SqlVariables" />
+    </SqlScriptPreprocessSqlVariables>
+
+    <!--Log the information  Set $(EnablePackageProcessLoggingAndAssert) to True if you want to see this information-->
+    <MakeDir Condition="$(EnableSqlScriptVariableParameterize) And $(EnablePackageProcessLoggingAndAssert) And !Exists('$(PackageLogDir)')"
+             Directories="$(PackageLogDir)" />
+
+    <!-- (Debug Only, Turn on EnablePackageProcessLoggingAndAssert if needed )
+    Dump the list to the log file in the log dir-->
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) and $(EnableSqlScriptVariableParameterize)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\SqlVariables.txt"
+                      Lines="@(_DatabasesToPackage_SqlVariables->'
+                      Name:%(Identity) 
+                      Vaule:%(Value)
+                      IsDeclared:%(IsDeclared)
+                      SourcePath=%(SourcePath)
+                      SourcePath_RegExExcaped=%(SourcePath_RegExExcaped)
+                      DestinationGroup=%(DestinationGroup)')" Overwrite="True" />
+  </Target>
+
+
+
+  <!--********************************************************************-->
+  <!-- HandleEFCodeFirstDataMigration  -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PublishDatabases Condition="'$(PublishDatabases)'==''">True</PublishDatabases>
+    <HandleEFCodeFirstDataMigrationDependsOn>
+      $(HandleEFCodeFirstDataMigrationDependsOn);
+      GetMSDeployInstalledVersionPath;
+      ProcessPublishDatabaseSettings;
+    </HandleEFCodeFirstDataMigrationDependsOn>
+  </PropertyGroup>
+  <Target Name="HandleEFCodeFirstDataMigration" DependsOnTargets="$(HandleEFCodeFirstDataMigrationDependsOn)" Condition="$(PublishDatabases) And ('$(PublishDatabaseSettings)' != '' Or '$(PublishDatabaseSettingsFile)' != '')">
+
+   <ItemGroup>
+      <_DatabasesToPackageForEFCodeFirst  Include="@(_DatabasesToPackage)"
+                                  Condition="'%(_DatabasesToPackage.SourceProvider)' == 'DbCodeFirst' 
+                                              And '%(_DatabasesToPackage.SourcePath)' == 'DBMigration'">
+      </_DatabasesToPackageForEFCodeFirst>
+    </ItemGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                 Encoding="utf-8"
+                 File="$(PackageLogDir)\DatabasesToPackageForEFCodeFirst.txt"
+                 Lines="@(_DatabasesToPackageForEFCodeFirst->'
+                      Name:%(Identity) 
+                      SourceProvider:%(SourceProvider)
+                      SourcePath=%(SourcePath)
+                      SourcePath_RegExExcaped=%(SourcePath_RegExExcaped)
+                      SourceMigrationConfiguration=%(SourceMigrationConfiguration)
+                      SourceDbContext=%(SourceDbContext)
+                      DestinationGroup=%(DestinationGroup)')" Overwrite="True" />
+
+  </Target>
+
+
+  <!--********************************************************************
+  Target PreInsertEFCodeFirstDeployWebCofig 
+  ********************************************************************-->
+  <PropertyGroup>
+    <PreInsertEFCodeFirstDeployWebCofigDependsOn>
+      HandleEFCodeFirstDataMigration;
+      ProfileTransformWebConfig;
+    </PreInsertEFCodeFirstDeployWebCofigDependsOn>
+    <PreInsertEFCodeFirstDeployWebCofigBeforeTarget>
+      $(PreInsertEFCodeFirstDeployWebCofigBeforeTarget);
+      AutoParameterizationWebConfigConnectionStrings;
+      PreAutoParameterizationWebConfigConnectionStrings;
+    </PreInsertEFCodeFirstDeployWebCofigBeforeTarget>
+  </PropertyGroup>
+
+  <Target Name="PreInsertEFCodeFirstDeployWebCofig"
+          DependsOnTargets="$(PreInsertEFCodeFirstDeployWebCofigDependsOn)"
+          Condition="'@(_DatabasesToPackageForEFCodeFirst)' !=''"
+          BeforeTargets="$(PreInsertEFCodeFirstDeployWebCofigBeforeTarget)">
+    <ItemGroup>
+      <_WebConfigsToInsertEFCodeFirstDeployContext Include="@(FilesForPackagingFromProject)"
+                             Condition="'%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)' 
+                                         And !%(FilesForPackagingFromProject.Exclude)
+                                         And '%(DestinationRelativePath)' == '$(ProjectConfigFileName)'">
+        <TransformOriginalFolder>$(InsertEFCodeFirstDeployWebCofigLocation)\original</TransformOriginalFolder>
+        <TransformOutputFile>$(InsertEFCodeFirstDeployWebCofigLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
+        <TransformScope>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))</TransformScope>
+      </_WebConfigsToInsertEFCodeFirstDeployContext>
+      <_WebConfigsToInsertEFCodeFirstDeployContextOuputFiles Include="@(_WebConfigsToInsertEFCodeFirstDeployContext->'%(TransformOutputFile)')">
+      </_WebConfigsToInsertEFCodeFirstDeployContextOuputFiles>
+    </ItemGroup>
+
+    <PropertyGroup>
+      <_WebConfigsToInsertEFCodeFirstDeployContextOuputDirectories>@(_WebConfigsToInsertEFCodeFirstDeployContextOuputFiles->'%(RootDir)%(Directory)')</_WebConfigsToInsertEFCodeFirstDeployContextOuputDirectories>
+      <_WebConfigsToInsertEFCodeFirstDeployContextOuput>@(_WebConfigsToInsertEFCodeFirstDeployContext->'%(TransformOutputFile)');</_WebConfigsToInsertEFCodeFirstDeployContextOuput>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_WebConfigsToInsertEFCodeFirstDeployContextOuputDirectories Include="$(_WebConfigsToInsertEFCodeFirstDeployContextOuputDirectories)" />
+    </ItemGroup>
+
+     <!--Make sure required directories exist-->  
+    <MakeDir Directories="@(_WebConfigsToInsertEFCodeFirstDeployContextOuputDirectories)" Condition="!Exists(%(Identity))"/>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) And ('@(_WebConfigsToInsertEFCodeFirstDeployContext)'!='') And !%(Exclude)"
+                      Encoding="utf-8"
+                      Overwrite="True"
+                      File="$(PackageLogDir)\PreInsertEFCodeFirstDeployWebCofig.Log"
+                      Lines="@(_WebConfigsToInsertEFCodeFirstDeployContext->'
+    InsertEFCodeFirstDeployContextTransform   input: %(Identity) 
+                      output: %(TransformOutputFile)
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)
+                      ')" />
+
+
+    <!--Copy the original web.config-->
+    <CopyPipelineFiles PipelineItems="@(_WebConfigsToInsertEFCodeFirstDeployContext)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="%(TransformOriginalFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                       Condition="'@(_WebConfigsToInsertEFCodeFirstDeployContext)' != ''">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedWebConfigsToInsertEFCodeFirstDeployContext"/>
+    </CopyPipelineFiles>
+
+     <!--Delete those web.config have been updated if existed-->
+    <Delete Files="@(_UpdatedWebConfigsToInsertEFCodeFirstDeployContext->'%(TransformOutputFile)')" />
+
+
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_EFCodeFirstConnectionStringParameterDescription">
+      <Output TaskParameter="Result" PropertyName="_PublishLocalizedString_EFCodeFirstConnectionStringParameterDescription" />
+    </GetPublishingLocalizedString>
+
+    <PropertyGroup>
+      <DeployParameterEFCodeFirstConnectionStringDescription Condition="'$(DeployParameterEFCodeFirstConnectionStringDescription)'==''">$(_PublishLocalizedString_EFCodeFirstConnectionStringParameterDescription)</DeployParameterEFCodeFirstConnectionStringDescription>
+    </PropertyGroup>
+
+    <!--Description might have the xml special character, we need to escape it. -->
+    <EscapeXMLString
+      Source="$(DeployParameterEFCodeFirstConnectionStringDescription)" >
+      <Output TaskParameter="Result" PropertyName="_EscapedDeployParameterEFCodeFirstConnectionStringDescription" />
+    </EscapeXMLString>
+
+    
+    <ItemGroup>
+      <MSDeployParameterValue Include="@(_DatabasesToPackageForEFCodeFirst->'$(DeployParameterPrefix)%(DestinationGroup)_DatabasePublish-Web.config Connection String')">
+        <ParameterValue>%(_DatabasesToPackageForEFCodeFirst.DestinationPath)</ParameterValue>
+        <Description>%(_DatabasesToPackageForEFCodeFirst.DestinationGroup) $(_EscapedDeployParameterEFCodeFirstConnectionStringDescription)</Description>
+        <UpdateDestWebConfig>True</UpdateDestWebConfig>
+        <AllowUIUpdate>False</AllowUIUpdate>
+      </MSDeployParameterValue>
+    </ItemGroup>
+
+    <ItemGroup>
+      <_InsertEFCodeFirstDeployContextNames Include="@(_DatabasesToPackageForEFCodeFirst)">
+        <TransformXMLFragement_CSInsert>
+          &lt;add
+          name=&quot;%(_DatabasesToPackageForEFCodeFirst.DestinationGroup)_DatabasePublish&quot;&#13;&#10;
+          connectionString=&quot;%(_DatabasesToPackageForEFCodeFirst.DestinationGroup)_DatabasePublish.ConnetionString&quot;&#13;&#10;
+          providerName=&quot;$(InsertAdditionalWebConfigConnectionStringProviderName)&quot;&#13;&#10;
+          xdt:Transform=&quot;InsertIfMissing&quot; &#13;&#10;
+          xdt:Locator=&quot;Match(name)&quot;&#13;&#10;
+          xdt:SupressWarnings=&quot;True&quot;&#13;&#10;
+          /&gt;
+        </TransformXMLFragement_CSInsert>
+        <TransformXMLFragement_Deploy>
+          &lt;context type="%(_DatabasesToPackageForEFCodeFirst.SourceDbContext)" &#13;&#10;
+          xdt:Transform="InsertIfMissing" &#13;&#10;
+          xdt:Locator=&quot;Match(type)&quot;&#13;&#10;
+          xdt:SupressWarnings=&quot;true&quot;&#13;&#10;
+          &gt;&#13;&#10;
+            &lt;databaseInitializer type="System.Data.Entity.MigrateDatabaseToLatestVersion`2[[%(_DatabasesToPackageForEFCodeFirst.SourceDbContext)], [%(_DatabasesToPackageForEFCodeFirst.SourceMigrationConfiguration)]], EntityFramework, PublicKeyToken=b77a5c561934e089"&gt;&#13;&#10;
+              &lt;parameters&gt;&#13;&#10;
+                &lt;parameter value="%(_DatabasesToPackageForEFCodeFirst.DestinationGroup)_DatabasePublish" /&gt;&#13;&#10;
+              &lt;/parameters&gt;&#13;&#10;
+            &lt;/databaseInitializer&gt;&#13;&#10;
+          &lt;/context&gt;
+        </TransformXMLFragement_Deploy>
+      </_InsertEFCodeFirstDeployContextNames>
+    </ItemGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) And ('@(_InsertEFCodeFirstDeployContextNames)'!='') "
+                  Encoding="utf-8"
+                  Overwrite="True"
+                  File="$(PackageLogDir)\InsertEFCodeFirstDeployContextName.Log"
+                  Lines="@(_InsertEFCodeFirstDeployContextNames->'
+    _InsertEFCodeFirstDeployContextNames   
+                      TransformXMLFragement_CSInsert: %(TransformXMLFragement_CSInsert)
+                      TransformXMLFragement_Deploy: %(TransformXMLFragement_Deploy)
+                      ')" />
+
+    <PropertyGroup>
+      <_WebConfigsToInsertEFCodeFirstDeployContext_Transform>&lt;?xml version=&quot;1.0&quot;?&gt;
+        &lt;configuration xmlns:xdt=&quot;http://schemas.microsoft.com/XML-Document-Transform&quot;&gt;
+        &lt;connectionStrings xdt:Transform=&quot;InsertIfMissing&quot; xdt:SupressWarnings=&quot;True&quot;&gt;
+        @(_InsertEFCodeFirstDeployContextNames->'%(TransformXMLFragement_CSInsert)', '')
+        &lt;/connectionStrings&gt;
+        &lt;entityFramework xdt:Transform=&quot;InsertIfMissing&quot; xdt:SupressWarnings=&quot;true&quot;&gt;
+        &lt;contexts xdt:Transform=&quot;InsertIfMissing&quot; xdt:SupressWarnings=&quot;true&quot;&gt;
+        @(_InsertEFCodeFirstDeployContextNames->'%(TransformXMLFragement_Deploy)', '')
+        &lt;/contexts&gt;
+        &lt;/entityFramework&gt;
+        &lt;/configuration&gt;
+      </_WebConfigsToInsertEFCodeFirstDeployContext_Transform>
+    </PropertyGroup>
+
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) And ('@(_InsertEFCodeFirstDeployContextNames)'!='') "
+                Encoding="utf-8"
+                Overwrite="False"
+                File="$(PackageLogDir)\InsertEFCodeFirstDeployContextName.Log"
+                Lines="Final Transform-------------------------------
+                $(_WebConfigsToInsertEFCodeFirstDeployContext_Transform)" />
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target InsertEFCodeFirstDeployWebCofigCore -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <InsertEFCodeFirstDeployWebCofigCoreDependsOn>
+      HandleEFCodeFirstDataMigration;
+      ProfileTransformWebConfig;
+      PreInsertEFCodeFirstDeployWebCofig;
+    </InsertEFCodeFirstDeployWebCofigCoreDependsOn>
+  </PropertyGroup>
+
+  <Target Name="InsertEFCodeFirstDeployWebCofigCore"
+          Inputs="@(_WebConfigsToInsertEFCodeFirstDeployContext)"
+          Outputs="%(TransformOutputFile)"
+          DependsOnTargets="$(InsertEFCodeFirstDeployWebCofigCoreDependsOn)"
+          Condition="'@(_DatabasesToPackageForEFCodeFirst)' !=''">
+
+    <!-- First Delete the output parameter file-->
+    <!-- Remove the output file if there is change on $(UseParameterizeToTransformWebConfig)-->
+    <Delete Files="@(_WebConfigsToInsertEFCodeFirstDeployContext->'%(TransformOutputFile)')"/>
+
+
+    <PropertyGroup>
+      <_WebConfigToInsertEFCodeFirstDeployContext_Identity>%(_WebConfigsToInsertEFCodeFirstDeployContext.Identity)</_WebConfigToInsertEFCodeFirstDeployContext_Identity>
+      <_WebConfigToInsertEFCodeFirstDeployContext_TransformOutputFile>%(_WebConfigsToInsertEFCodeFirstDeployContext.TransformOutputFile)</_WebConfigToInsertEFCodeFirstDeployContext_TransformOutputFile>
+      <_WebConfigsToInsertEFCodeFirstDeployContext_TransformScope>%(_WebConfigsToInsertEFCodeFirstDeployContext.TransformScope)</_WebConfigsToInsertEFCodeFirstDeployContext_TransformScope>
+    </PropertyGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                  Encoding="utf-8"
+                  Overwrite="False"
+                  File="$(PackageLogDir)\InsertEFCodeFirstDeployContextName.Log"
+                  Lines="_WebConfigToInsertEFCodeFirstDeployContext_Identity: $(_WebConfigToInsertEFCodeFirstDeployContext_Identity) 
+                      _WebConfigToInsertEFCodeFirstDeployContext_TransformOutputFile: $(_WebConfigToInsertEFCodeFirstDeployContext_TransformOutputFile)
+                      _WebConfigsToInsertEFCodeFirstDeployContext_TransformScope: $(_WebConfigsToInsertEFCodeFirstDeployContext_TransformScope)
+                      _WebConfigsToInsertEFCodeFirstDeployContext_Transform: $(_WebConfigsToInsertEFCodeFirstDeployContext_Transform)
+                      " />
+
+    <!-- Now we use the tokenize transform to auto parameterize the web.config-->
+    <ParameterizeTransformXml
+      Source="$(_WebConfigToInsertEFCodeFirstDeployContext_Identity)"
+      IsSourceAFile="True"
+      Transform="$(_WebConfigsToInsertEFCodeFirstDeployContext_Transform)"
+      IsTransformAFile="False"
+      Destination="$(_WebConfigToInsertEFCodeFirstDeployContext_TransformOutputFile)"
+      IsDestinationAFile="True"
+      Scope="$(_WebConfigsToInsertEFCodeFirstDeployContext_TransformScope)"
+      StackTrace="$(TransformWebConfigStackTraceEnabled)"
+      SourceRootPath="$(WebPublishPipelineSourceRootDirectory)">
+    </ParameterizeTransformXml>
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PostInsertEFCodeFirstDeployWebCofig -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PostInsertEFCodeFirstDeployWebCofigDependsOn>
+      HandleEFCodeFirstDataMigration;
+      ProfileTransformWebConfig;
+      PreInsertEFCodeFirstDeployWebCofig;
+      InsertEFCodeFirstDeployWebCofigCore;
+    </PostInsertEFCodeFirstDeployWebCofigDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PostInsertEFCodeFirstDeployWebCofig"
+          DependsOnTargets="$(PostInsertEFCodeFirstDeployWebCofigDependsOn)"
+          Condition="'@(_DatabasesToPackageForEFCodeFirst)' !=''">
+
+    <ItemGroup>
+      <!--Remove untransformed Web.configs from the pipeline-->
+      <FilesForPackagingFromProject Remove="@(_WebConfigsToInsertEFCodeFirstDeployContext)" Condition="'@(_WebConfigsToInsertEFCodeFirstDeployContext)'!='' And !%(_WebConfigsToInsertEFCodeFirstDeployContext.Exclude) And Exists(%(_WebConfigsToInsertEFCodeFirstDeployContext.TransformOutputFile))"/>
+      <!--Add the transformed Web.configs at the new loction to the pipeline-->
+      <FilesForPackagingFromProject Include="@(_WebConfigsToInsertEFCodeFirstDeployContext->'%(TransformOutputFile)')" Condition="'@(_WebConfigsToInsertEFCodeFirstDeployContext)'!='' And !%(_WebConfigsToInsertEFCodeFirstDeployContext.Exclude) And Exists(%(_WebConfigsToInsertEFCodeFirstDeployContext.TransformOutputFile))"/>
+    </ItemGroup>
+
+    <!--Get Localized string before displaying message-->
+    <GetPublishingLocalizedString
+       Importance="High"
+       Condition="'@(_WebConfigsToInsertEFCodeFirstDeployContext)'!='' And !%(_WebConfigsToInsertEFCodeFirstDeployContext.Exclude) And Exists(%(_WebConfigsToInsertEFCodeFirstDeployContext.TransformOutputFile))"
+       ID="PublishLocalizedString_InsertEFCodeFirstDeployContextTransformConfigToTransformOutputFile"
+       ArgumentCount="2"
+       Arguments="@(_WebConfigsToInsertEFCodeFirstDeployContext->'%(Identity)');%(TransformOutputFile)"
+       LogType="Message" />
+    <!--<Message Importance="high"
+             Condition="'@(_WebConfigsToInsertEFCodeFirstDeployContext)'!='' And !%(_WebConfigsToInsertEFCodeFirstDeployContext.Exclude) And Exists(%(_WebConfigsToInsertEFCodeFirstDeployContext.TransformOutputFile))"
+             Text="Auto ConnectionString Transformed @(_WebConfigsToInsertEFCodeFirstDeployContext) into %(TransformOutputFile)" />-->
+
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\PostInsertEFCodeFirstDeployWebCofig.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)')" Overwrite="True" />
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target InsertEFCodeFirstDeployWebCofig-->
+  <!--**********************************************************************-->
+  <PropertyGroup>
+    <InsertEFCodeFirstDeployWebCofigDependsOn>
+      $(OnBeforeInsertEFCodeFirstDeployWebCofig);
+      $(InsertEFCodeFirstDeployWebCofigDependsOn);
+      TransformWebConfig;
+      HandleEFCodeFirstDataMigration;
+      ProfileTransformWebConfig;
+      PreInsertEFCodeFirstDeployWebCofig;
+      InsertEFCodeFirstDeployWebCofigCore;
+      PostInsertEFCodeFirstDeployWebCofig;
+    </InsertEFCodeFirstDeployWebCofigDependsOn>
+    <InsertEFCodeFirstDeployWebCofigBeforeTargets>
+      $(InsertEFCodeFirstDeployWebCofigBeforeTargets);
+      PreAutoParameterizationWebConfigConnectionStrings;
+      AutoParameterizationWebConfigConnectionStrings;
+      PipelineMsdeploySpecificTransformPhase;
+    </InsertEFCodeFirstDeployWebCofigBeforeTargets>
+  </PropertyGroup>
+  <Target Name="InsertEFCodeFirstDeployWebCofig" 
+          DependsOnTargets="$(InsertEFCodeFirstDeployWebCofigDependsOn)"
+          BeforeTargets="$(InsertEFCodeFirstDeployWebCofigBeforeTargets)"
+          Condition="'$(InsertEFCodeFirstDeployWebCofig)' != 'False'">
+
+  </Target>
+
+  <Target Name="_GatherDbDacFxDestinationPathes">
+    <ItemGroup>
+      <_DbDacFxDestinationPathesToPublish Include="@(_DatabasesToPackage->'%(DestinationPath)')" Condition="'%(_DatabasesToPackage.SourceProvider)' == 'dbDacFx'" />
+    </ItemGroup>
+  </Target>
+  
+  <!--********************************************************************-->
+  <!-- _CheckDBProvidersAreAvailableAtServer  -->
+  <!--********************************************************************-->
+  <Target Name="_CheckDBProvidersAreAvailableAtServer"
+          DependsOnTargets="_GatherDbDacFxDestinationPathes"
+          Condition="'$(WebPublishMethod)' != 'Package' And '$(MsDeployServiceUrl)' != ''">
+    <CallTarget Targets="_DetectDbDacFxProvider" RunEachTargetSeparately="false" Condition="'@(_DbDacFxDestinationPathesToPublish)' != ''" />      
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- CollectDatabasesToPublish  -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PublishDatabases Condition="'$(PublishDatabases)'==''">True</PublishDatabases>
+    <CollectDatabasesToPublishDependsOn>
+      $(CollectDatabasesToPublishDependsOn);
+      GetMSDeployInstalledVersionPath;
+      ProcessPublishDatabaseSettings;
+      _CheckDBProvidersAreAvailableAtServer;
+      ParseSQLScriptForMSDeployParameters;
+      HandleEFCodeFirstDataMigration;
+      InsertEFCodeFirstDeployWebCofig;
+    </CollectDatabasesToPublishDependsOn>
+  </PropertyGroup>
+  <Target Name="CollectDatabasesToPublish" DependsOnTargets="$(CollectDatabasesToPublishDependsOn)" Condition="$(PublishDatabases) And ('$(PublishDatabaseSettings)' != '' Or '$(PublishDatabaseSettingsFile)' != '')">
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- AddDeclareParametersItemsForDatabaseScript  -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddDeclareParametersItemsForDatabaseScript Condition="'$(BeforeAddDeclareParametersItemsForDatabaseScript)'==''">
+    </BeforeAddDeclareParametersItemsForDatabaseScript>
+    <AfterAddDeclareParametersItemsForDatabaseScript Condition="'$(AfterAddDeclareParametersItemsForDatabaseScript)'==''">
+    </AfterAddDeclareParametersItemsForDatabaseScript>
+    <AddDeclareParametersItemsForDatabaseScriptDependsOn>
+      $(BeforeAddDeclareParametersItemsForDatabaseScript);
+      CollectDatabasesToPublish;
+    </AddDeclareParametersItemsForDatabaseScriptDependsOn>
+  </PropertyGroup>
+  <Target Name="AddDeclareParametersItemsForDatabaseScript"
+          DependsOnTargets="$(AddDeclareParametersItemsForDatabaseScriptDependsOn)">
+
+    <!--Get localized $(DeployParameterSqlScriptVariablesDescription) from the Task.dll if it wasn't bee set by user.-->
+    <GetPublishingLocalizedString
+      Condition="'$(DeployParameterSqlScriptVariablesDescription)'==''"
+      ID="PublishLocalizedString_SqlCommandVariableParameterDescription">
+      <Output TaskParameter="Result" PropertyName="DeployParameterSqlScriptVariablesDescription" />
+    </GetPublishingLocalizedString>
+
+
+    <!--Get localized $(DeployParameterIISAppConnectionStringDescription) from the Task.dll if it wasn't bee set by user.-->
+    <GetPublishingLocalizedString
+      Condition="'$(DeployParameterIISAppConnectionStringDescription)'=='' And !$(DeployParameterAutoDescriptionbyTags)"
+      ID="PublishLocalizedString_DatabaseConnectionStringParameterDescription">
+      <Output TaskParameter="Result" PropertyName="DeployParameterIISAppConnectionStringDescription" />
+    </GetPublishingLocalizedString>
+
+    <!--if $(DeployParameterAutoDescriptionbyTags), we turn off the description.-->
+    <DeployParameterIISAppConnectionStringDescription Condition="'$(DeployParameterIISAppConnectionStringDescription)'!='' And $(DeployParameterAutoDescriptionbyTags)"></DeployParameterIISAppConnectionStringDescription>
+
+    <ItemGroup  Condition="!$(DisableAllVSGeneratedMSDeployParameter)">
+      <_VsPublish_DatabaseToPackage_DeclareParameters Include="@(_DatabasesToPackage->'$(DeployParameterPrefix)%(DestinationGroup)-Deployment Connection String')"
+                                                      Condition="'%(_DatabasesToPackage.Identity)' !=''  And '%(_DatabasesToPackage.SourceProvider)' != 'DbCodeFirst' ">
+        <Kind>ProviderPath</Kind>
+        <Scope>%(_DatabasesToPackage.SourceProvider)</Scope>
+        <Match>^%(_DatabasesToPackage.SourcePath_RegExExcaped)$</Match>
+        <Description>$(DeployParameterIISAppConnectionStringDescription)</Description>
+        <DefaultValue>%(_DatabasesToPackage.DestinationPath)</DefaultValue>
+        <Value>%(_DatabasesToPackage.DestinationPath)</Value>
+        <Tags>$(MsDeployDatabaseTag)</Tags>
+      </_VsPublish_DatabaseToPackage_DeclareParameters>
+
+      
+      <_VsPublish_DatabaseToPackage_DeclareParameters Include="@(_DatabasesToPackage_SqlVariables->'$(DeployParameterPrefix)Sql script variable %24(%(Identity)) in %(DestinationGroup) scripts')"
+                                                      Condition="$(EnableSqlScriptVariableParameterize) And '%(_DatabasesToPackage_SqlVariables.Identity)' !=''">
+        <Kind>$(MsDeploySqlCommandVariableKind)</Kind>
+        <Scope>^%(_DatabasesToPackage_SqlVariables.SourcePath_RegExExcaped)$</Scope>
+        <Match>%(_DatabasesToPackage_SqlVariables.Identity)</Match>
+        <Description>$(DeployParameterSqlScriptVariablesDescription)</Description>
+        <DefaultValue>%(_DatabasesToPackage_SqlVariables.Value)</DefaultValue>
+        <Value>%(_DatabasesToPackage_SqlVariables.Value)</Value>
+        <Tags>sql</Tags>
+      </_VsPublish_DatabaseToPackage_DeclareParameters>
+
+      <!--Work around the TSData script when there are Sqlcommand variable that declare as Empty string-->
+      <_VsPublish_DatabaseToPackage_DeclareParameters Include="@(_DatabasesToPackage_SqlVariables->'$(DeployParameterPrefix)Sql script variable %24(%(Identity)) in %(DestinationGroup) scripts')"
+                                                      Condition="$(EnableSqlScriptVariableParameterize) and '%(_DatabasesToPackage_SqlVariables.Identity)' !='' and ('%(_DatabasesToPackage_SqlVariables.Value)' == '') and ('%(_DatabasesToPackage_SqlVariables.IsDeclared)' == 'true') ">
+        <Element>parameterValidation</Element>
+        <Kind>AllowEmpty</Kind>
+      </_VsPublish_DatabaseToPackage_DeclareParameters>
+
+      <MsDeployDeclareParameters Include="@(_VsPublish_DatabaseToPackage_DeclareParameters)">
+        <Priority>$(VsSQLDatabaseScriptParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+    <CallTarget Targets="$(AfterAddDeclareParametersItemsForDatabaseScript)" RunEachTargetSeparately="false" Condition="'$(AfterAddDeclareParametersItemsForDatabaseScript)' != ''" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- AddDatabasesToSourceManifest  -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <WriteItemsToSourceManifestDependsOn>
+      $(WriteItemsToSourceManifestDependsOn);
+      AddDatabasesToSourceManifest;
+    </WriteItemsToSourceManifestDependsOn>
+  </PropertyGroup>
+  <PropertyGroup>
+    <BeforeAddDatabasesToSourceManifest Condition="'$(BeforeAddDatabasesToSourceManifest)'==''">
+    </BeforeAddDatabasesToSourceManifest>
+    <AfterAddDatabasesToSourceManifest Condition="'$(AfterAddDatabasesToSourceManifest)'==''">
+    </AfterAddDatabasesToSourceManifest>
+    <AddDatabasesToSourceManifestDependsOn>
+      $(BeforeAddDatabasesToSourceManifest);
+      CollectDatabasesToPublish;
+    </AddDatabasesToSourceManifestDependsOn>
+    <AddDatabasesToSourceManifestAfterTargets>
+      $(AddDatabasesToSourceManifestAfterTargets);
+      AddIisSettingAndFileContentsToSourceManifest;
+    </AddDatabasesToSourceManifestAfterTargets>
+  </PropertyGroup>
+  <Target Name="AddDatabasesToSourceManifest"
+          DependsOnTargets="$(AddDatabasesToSourceManifestDependsOn)">
+
+    <ItemGroup>
+      <MsDeploySourceManifest Include="@(_DatabasesToSourceManifest)" Condition="'%(_DatabasesToSourceManifest.Identity)' != 'DbCodeFirst'"/>
+    </ItemGroup>
+
+    <CallTarget Targets="$(AfterAddDatabasesToSourceManifest)" RunEachTargetSeparately="false" Condition="'$(AfterAddDatabasesToSourceManifest)' != ''" />
+  </Target>
+
+  
+
+
+  <!--***********************************************************************-->
+  <!--GenerateSampleDeployScript task-->
+  <!--***********************************************************************-->
+  <PropertyGroup>
+    <GenerateSampleDeployScriptDependsOn Condition="'$(GenerateSampleDeployScriptDependsOn)'==''">
+      GetMSDeployInstalledVersionPath;
+      GenerateMsDeployManifestSettings;
+      GenerateMsdeployManifestFiles;
+    </GenerateSampleDeployScriptDependsOn>
+    <GenerateSampleDeployScriptAfterTargets>
+      $(GenerateSampleDeployScriptAfterTargets);
+      PackageUsingManifest;
+    </GenerateSampleDeployScriptAfterTargets>
+  </PropertyGroup>
+
+  <Target Condition="$(GenerateSampleDeployScript)"
+          Name="GenerateSampleDeployScript"
+          DependsOnTargets="$(GenerateSampleDeployScriptDependsOn)"
+          AfterTargets="$(GenerateSampleDeployScriptAfterTargets)">
+
+    <!--Get Localized string before displaying message-->
+    <GetPublishingLocalizedString
+       Importance="Low"
+       ID="PublishLocalizedString_GenerateSampleMsdeployBatchScript"
+       LogType="Message" />
+    <!--<Message Text="GenerateSampleDeployScript the package..." Importance="low"/>-->
+
+    <PropertyGroup>
+      <!--
+        MSDeployPublishSourceType can be 
+        SingleFilePackage(a single ziped file package)
+        Manifest(a file with Iis VDir info plus file pathes)
+        RawIisVDir(Let MSDeploy published all files underneath the phisical path)
+        ArchiveDir(a folder genearated by package with all files to be transferred)
+      -->
+      <!--So far, if we see the single file package, we pick it up; otherwise, we GenerateSampleDeployScript from Iis vdir -->
+      <GenerateSampleDeployScriptSourceType>manifest</GenerateSampleDeployScriptSourceType>
+      <GenerateSampleDeployScriptSourceFileName>@(_MSDeploySourceManifest->'%(FileName)%(Extension)')</GenerateSampleDeployScriptSourceFileName>
+      <GenerateSampleDeployScriptSourceType Condition="$(_CreatePackage) And $(PackageAsSingleFile)">package</GenerateSampleDeployScriptSourceType>
+      <GenerateSampleDeployScriptSourceFileName Condition="$(_CreatePackage) And $(PackageAsSingleFile)">@(_MSDeployPackageFile->'%(FileName)%(Extension)')</GenerateSampleDeployScriptSourceFileName>
+      <GenerateSampleDeployScriptSourceType Condition="$(_CreatePackage) And !$(PackageAsSingleFile)">archiveDir</GenerateSampleDeployScriptSourceType>
+      <GenerateSampleDeployScriptSourceFileName Condition="$(_CreatePackage) And !$(PackageAsSingleFile)">@(_MSDeployArchiveDir->'%(FileName)%(Extension)')</GenerateSampleDeployScriptSourceFileName>
+      <GenerateSampleDeployScriptSourceRoot>%25RootPath%25$(GenerateSampleDeployScriptSourceFileName)</GenerateSampleDeployScriptSourceRoot>
+      <GenerateSampleDeployScriptDestinationType>%25_Destination%25</GenerateSampleDeployScriptDestinationType>
+      <GenerateSampleDeployScriptDestinationRoot></GenerateSampleDeployScriptDestinationRoot>
+      <GenerateSampleDeployScriptParameters>@(_MSDeploySampleParametersValue->'%25RootPath%25%(FileName)%(Extension)')</GenerateSampleDeployScriptParameters>
+      <_ScriptGenerateSampleDeployScriptReadMeLocation>%25RootPath%25$(GenerateSampleDeployScriptReadMeFileName)</_ScriptGenerateSampleDeployScriptReadMeLocation>
+      <_MSdeployFwdLink>http://go.microsoft.com/?linkid=9278654</_MSdeployFwdLink>
+      <_SampleDeployCmdFwdLink>http://go.microsoft.com/fwlink/?LinkID=183544</_SampleDeployCmdFwdLink>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_MsDeployDeclareParametersNotExclude Include="@(MsDeployDeclareParameters)" Condition="'%(ExcludeFromSetParameter)' != true and '%(MsDeployDeclareParameters.Identity)' !=''" />
+    </ItemGroup>
+
+    <SortParametrsByPriority Parameters="@(_MsDeployDeclareParametersNotExclude)"
+                             OptimisticParameterDefaultValue="$(EnableOptimisticParameterDefaultValue)"
+                             OptimisticParameterMetadataName="Value"
+                             >
+      <Output TaskParameter="Result" ItemName="_SortedMsDeployDeclareParameters"/>
+    </SortParametrsByPriority>
+
+    <RemoveDuplicates Inputs="@(_SortedMsDeployDeclareParameters)">
+      <Output TaskParameter="Filtered" ItemName="_SampleSetParametersFiltered"/>
+    </RemoveDuplicates>
+
+    <ItemGroup>
+      <MsDeploySourceProviderSetting Remove="@(MsDeploySourceProviderSetting)" />
+      <MsDeploySourceProviderSetting Include="$(GenerateSampleDeployScriptSourceType)">
+        <Path>$(GenerateSampleDeployScriptSourceRoot)</Path>
+        <EncryptPassword>$(DeployEncryptKey)</EncryptPassword>
+      </MsDeploySourceProviderSetting>
+      <MsDeployDestinationProviderSetting Remove="@(MsDeployDestinationProviderSetting)" />
+      <MsDeployDestinationProviderSetting Include="$(GenerateSampleDeployScriptDestinationType)">
+        <Path>$(GenerateSampleDeployScriptDestinationRoot)</Path>
+        <EncryptPassword>$(DeployEncryptKey)</EncryptPassword>
+      </MsDeployDestinationProviderSetting>
+    </ItemGroup>
+
+    <!--Debug/Diagnostic message is not localized-->
+    <Message Text="GenerateSampleDeployScript MsDeploySourceProviderSetting is @(MsDeploySourceProviderSetting)" Condition="$(EnablePackageProcessLoggingAndAssert)" />
+    <Message Text="GenerateSampleDeployScript MsDeployDestinationProviderSetting is @(MsDeployDestinationProviderSetting)" Condition="$(EnablePackageProcessLoggingAndAssert)"/>
+
+    <!--Generate the command line  script for straight deploy-->
+    <MSdeploy
+        PreviewCommandLineOnly="True"
+        Verb="sync"
+        Source="@(MsDeploySourceProviderSetting)"
+        Destination="@(MsDeployDestinationProviderSetting)"
+        DisableLink="$(PublishDisableLinks)"
+        EnableLink="$(PublishEnableLinks)"
+        SkipRuleItems="@(MsDeploySkipRules)"
+        ExePath="%25MSDeployPath%25">
+      <Output TaskParameter="CommandLine" PropertyName="_SampleDeployScript" />
+    </MSdeploy>
+
+    <MSdeploy
+      PreviewCommandLineOnly="True"
+      Verb="sync"
+      Source="@(MsDeploySourceProviderSetting)"
+      Destination="@(MsDeployDestinationProviderSetting)"
+      DisableLink="$(PublishDisableLinks)"
+      EnableLink="$(PublishEnableLinks)"
+      SkipRuleItems="@(MsDeploySkipRules)"
+      ImportSetParametersItems="%25_DeploySetParametersFile%25"
+      ExePath="%25MSDeployPath%25">
+      <Output TaskParameter="CommandLine" PropertyName="_SampleDeployScriptOnSetParametersFile" />
+    </MSdeploy>
+    <!--Generate the command line script for the what-if msdeploy-->
+    <MSdeploy
+      PreviewCommandLineOnly="True"
+      WhatIf="True"
+      Verb="sync"
+      Source="@(MsDeploySourceProviderSetting)"
+      Destination="@(MsDeployDestinationProviderSetting)"
+      DisableLink="$(PublishDisableLinks)"
+      EnableLink="$(PublishEnableLinks)"
+      SkipRuleItems="@(MsDeploySkipRules)"
+      ImportSetParametersItems="%25_DeploySetParametersFile%25"
+      ExePath="%25MSDeployPath%25">
+      <Output TaskParameter="CommandLine" PropertyName="_SampleDeployScriptOnSetParametersFileWithWhatIf" />
+    </MSdeploy>
+
+
+    <!--Generate the Set Parameter file-->
+    <ExportParametersFile
+      Parameters="@(_SampleSetParametersFiltered)"
+      OptimisticParameterDefaultValue="$(EnableOptimisticParameterDefaultValue)"
+      SetParameterFile="$(GenerateSampleParametersValueLocation)"
+      GenerateFileEvenIfEmpty="True"
+      />
+
+    <ItemGroup>
+      <FileWrites Include="$(GenerateSampleParametersValueLocation)" />
+    </ItemGroup>
+
+
+
+
+    <!--Now write the sample batch file. Note this relies on the fact that the Batch file should be under the same location as the package and manifestfiles -->
+    <!--Note that by default Command line file only support the ANSI. Even if we code it against utf-8, the cmd.exe won't be able to handle it.
+    Only the package and setparameters.xml file name matter.  You change the deploy parameters into setparameters.xml which support utf-8 properly.-->
+    <WriteLinesToFile File="$(GenerateSampleDeployScriptLocation)"
+                      Overwrite="True"
+                      Encoding="us-ascii"
+                      Lines="@rem ---------------------------------------------------------------------------------
+@rem Copyright 2008 Microsoft Corporation. All rights reserved.
+@rem This is provided as sample to deploy the package using msdeploy.exe
+@rem For information about IIS Web Deploy technology,
+@rem please visit $(_MSdeployFwdLink)
+@rem Note: This batch file assumes the package and setparametsrs.xml are in the same folder with this file
+@rem ---------------------------------------------------------------------------------
+@if %_echo%!==! echo off
+setlocal
+@rem ---------------------------------------------------------------------------------
+@rem Please Make sure you have Web Deploy install in your machine. 
+@rem Alternatively, you can explicit set the MsDeployPath to the location it is on your machine
+@rem set MSDeployPath=&quot;$(MSDeployPath)&quot;
+@rem ---------------------------------------------------------------------------------
+                      
+@rem ---------------------------------------------------------------------------------
+@rem if user does not set MsDeployPath environment variable, we will try to retrieve it from registry.
+@rem ---------------------------------------------------------------------------------
+if &quot;%MSDeployPath%&quot; == &quot;&quot; (
+for /F &quot;usebackq tokens=1,2,*&quot; %%h  in (`reg query &quot;HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy&quot; /s  ^| findstr -i &quot;InstallPath&quot;`) do (
+if /I &quot;%%h&quot; == &quot;InstallPath&quot; ( 
+if /I &quot;%%i&quot; == &quot;REG_SZ&quot; ( 
+if not &quot;%%j&quot; == &quot;&quot; ( 
+if &quot;%%~dpj&quot; == &quot;%%j&quot; ( 
+set MSDeployPath=%%j
+))))))
+
+@rem ------------------------------------------
+$(_GenerateSampleDeployScript_Set_MSDeployPath)
+@rem ------------------------------------------
+
+                      
+if not exist &quot;%MSDeployPath%msdeploy.exe&quot; (
+echo. msdeploy.exe is not found on this machine. Please install Web Deploy before execute the script. 
+echo. Please visit $(_MSdeployFwdLink)
+goto :usage
+)
+
+set RootPath=%~dp0
+if /I &quot;%_DeploySetParametersFile%&quot; == &quot;&quot; (
+set _DeploySetParametersFile=$(GenerateSampleDeployScriptParameters)
+)
+
+@rem ------------------------------------------
+$(_GenerateSampleDeployScript_Set_DeploySetParametersFile)
+@rem ------------------------------------------
+
+                      
+set _ArgTestDeploy=
+set _ArgDestinationType=auto
+set _ArgComputerNameWithQuote=&quot;&quot;
+set _ArgUserNameWithQuote=&quot;&quot;
+set _ArgPasswordWithQuote=&quot;&quot;
+set _ArgEncryptPasswordWithQuote=&quot;&quot;
+set _ArgIncludeAclsWithQuote=&quot;False&quot;
+set _ArgAuthTypeWithQuote=&quot;&quot;
+set _ArgtempAgentWithQuote=&quot;&quot;
+set _ArgLocalIIS=
+set _ArgLocalIISVersion=
+set _HaveArgMSDeployAdditonalFlags=
+                      
+                      
+@rem ---------------------------------------------------------------------------------
+@rem Simple Parse the arguments
+@rem ---------------------------------------------------------------------------------
+:NextArgument
+set _ArgCurrent=%~1
+set _ArgFlagFirst=%_ArgCurrent:~0,1%
+set _ArgFlag=%_ArgCurrent:~0,3%
+set _ArgValue=%_ArgCurrent:~3%
+
+if /I &quot;%_ArgFlag%&quot; == &quot;&quot; goto :GetStarted
+if /I &quot;%_ArgFlag%&quot; == &quot;~0,3&quot; goto :GetStarted
+if /I &quot;%_ArgFlag%&quot; == &quot;/T&quot; set _ArgTestDeploy=true&amp;goto :ArgumentOK
+if /I &quot;%_ArgFlag%&quot; == &quot;/Y&quot; set _ArgTestDeploy=false&amp;goto :ArgumentOK
+if /I &quot;%_ArgFlag%&quot; == &quot;/L&quot; set _ArgLocalIIS=true&amp;goto :ArgumentOK
+
+if /I &quot;%_ArgFlag%&quot; == &quot;/M:&quot; set _ArgComputerNameWithQuote=&quot;%_ArgValue%&quot;&amp;goto :ArgumentOK
+if /I &quot;%_ArgFlag%&quot; == &quot;/U:&quot; set _ArgUserNameWithQuote=&quot;%_ArgValue%&quot;&amp;goto :ArgumentOK
+if /I &quot;%_ArgFlag%&quot; == &quot;/P:&quot; set _ArgPasswordWithQuote=&quot;%_ArgValue%&quot;&amp;goto :ArgumentOK
+if /I &quot;%_ArgFlag%&quot; == &quot;/E:&quot; set _ArgEncryptPasswordWithQuote=&quot;%_ArgValue%&quot;&amp;goto :ArgumentOK
+if /I &quot;%_ArgFlag%&quot; == &quot;/I:&quot; set _ArgIncludeAclsWithQuote=&quot;%_ArgValue%&quot;&amp;goto :ArgumentOK
+if /I &quot;%_ArgFlag%&quot; == &quot;/A:&quot; set _ArgAuthTypeWithQuote=&quot;%_ArgValue%&quot;&amp;goto :ArgumentOK
+if /I &quot;%_ArgFlag%&quot; == &quot;/G:&quot; set _ArgtempAgentWithQuote=&quot;%_ArgValue%&quot;&amp;goto :ArgumentOK
+
+@rem Any addition flags, pass through to the msdeploy
+if &quot;%_HaveArgMSDeployAdditonalFlags%&quot; == &quot;&quot; (
+goto :Assign_ArgMsDeployAdditionalFlags
+)
+set _ArgMsDeployAdditionalFlags=%_ArgMsDeployAdditionalFlags:&amp;=^&amp;% %_ArgCurrent:&amp;=^&amp;%
+set _HaveArgMSDeployAdditonalFlags=1
+goto :ArgumentOK
+
+
+:Assign_ArgMsDeployAdditionalFlags
+set _ArgMsDeployAdditionalFlags=%_ArgCurrent:&amp;=^&amp;%
+set _HaveArgMSDeployAdditonalFlags=1
+goto :ArgumentOK
+
+:ArgumentOK
+shift
+goto :NextArgument
+
+:GetStarted
+@rem ------------------------------------------
+$(_GenerateSampleDeployScript_AfterParseArguments)
+@rem ------------------------------------------
+if /I &quot;%_ArgTestDeploy%&quot; == &quot;&quot; goto :usage
+if /I &quot;%_ArgDestinationType%&quot; == &quot;&quot;  goto :usage
+
+set _Destination=%_ArgDestinationType%
+if not %_ArgComputerNameWithQuote% == &quot;&quot; set _Destination=%_Destination%,computerName=%_ArgComputerNameWithQuote%
+if not %_ArgUserNameWithQuote% == &quot;&quot; set _Destination=%_Destination%,userName=%_ArgUserNameWithQuote%
+if not %_ArgPasswordWithQuote% == &quot;&quot; set _Destination=%_Destination%,password=%_ArgPasswordWithQuote%
+if not %_ArgAuthTypeWithQuote% == &quot;&quot; set _Destination=%_Destination%,authtype=%_ArgAuthTypeWithQuote%
+if not %_ArgEncryptPasswordWithQuote% == &quot;&quot; set _Destination=%_Destination%,encryptPassword=%_ArgEncryptPasswordWithQuote%
+if not %_ArgIncludeAclsWithQuote% == &quot;&quot; set _Destination=%_Destination%,includeAcls=%_ArgIncludeAclsWithQuote%
+if not %_ArgtempAgentWithQuote% == &quot;&quot; set _Destination=%_Destination%,tempAgent=%_ArgtempAgentWithQuote%
+
+@rem ------------------------------------------
+$(_GenerateSampleDeployScript_AfterSet_Destination)
+@rem ------------------------------------------
+
+                      
+@rem ---------------------------------------------------------------------------------
+@rem add -whatif when -T is specified                      
+@rem ---------------------------------------------------------------------------------
+if /I &quot;%_ArgTestDeploy%&quot; NEQ &quot;false&quot; (
+set _MsDeployAdditionalFlags=-whatif %_MsDeployAdditionalFlags%
+)
+
+@rem ------------------------------------------
+$(_GenerateSampleDeployScript_AfterSet_WhatIf)
+@rem ------------------------------------------
+
+@rem ---------------------------------------------------------------------------------
+@rem add flags for IISExpress when -L is specified                      
+@rem ---------------------------------------------------------------------------------
+
+if /I &quot;%_ArgLocalIIS%&quot; == &quot;true&quot; (
+call :SetIISExpressArguments
+)
+if /I &quot;%_ArgLocalIIS%&quot; == &quot;true&quot; (
+if not exist &quot;%IISExpressPath%%IISExpressManifest%&quot; (
+echo. IISExpress is not found on this machine. Please install through Web Platform Installer before execute the script. 
+echo. or remove /L flag
+echo. Please visit $(_MSdeployFwdLink)
+goto :usage
+)
+if not exist &quot;%IISExpressUserProfileDirectory%&quot; (
+echo. %IISExpressUserProfileDirectory% is not exists
+echo. IISExpress is found on the machine. But the user have run IISExpress at least once.
+echo. Please visit $(_MSdeployFwdLink) for detail
+goto :usage
+)
+                      
+set _MsDeployAdditionalFlags=%_MsDeployAdditionalFlags% -appHostConfigDir:%IISExpressUserProfileDirectory% -WebServerDir:&quot;%IISExpressPath%&quot; -webServerManifest:&quot;%IISExpressManifest%&quot;
+)
+
+@rem ---------------------------------------------------------------------------------
+@rem check the existence of the package file
+@rem ---------------------------------------------------------------------------------
+if not exist &quot;$(GenerateSampleDeployScriptSourceRoot)&quot; (
+echo &quot;$(GenerateSampleDeployScriptSourceRoot)&quot; does not exist. 
+echo This batch file relies on this deploy source file^(s^) in the same folder.
+goto :usage
+)
+
+@rem ---------------------------------------------
+$(_GenerateSampleDeployScript_BeforeExecuteMsDeployExe)
+@rem ---------------------------------------------
+
+@rem ---------------------------------------------------------------------------------
+@rem Execute msdeploy.exe command line
+@rem ---------------------------------------------------------------------------------
+call :CheckParameterFile
+echo. Start executing msdeploy.exe
+echo -------------------------------------------------------
+if  not exist &quot;%_DeploySetParametersFile%&quot; (
+set _MSDeployCommandline=$(_SampleDeployScript)
+) else (
+set _MSDeployCommandline=$(_SampleDeployScriptOnSetParametersFile)
+)
+
+if &quot;%_HaveArgMSDeployAdditonalFlags%&quot; == &quot;&quot; (
+goto :MSDeployWithOutArgMsDeployAdditionalFlag
+) 
+goto :MSDeployWithArgMsDeployAdditionalFlag
+goto :eof
+
+@rem ---------------------------------------------------------------------------------
+@rem MSDeployWithArgMsDeployAdditionalFlag
+@rem ---------------------------------------------------------------------------------
+:MSDeployWithArgMsDeployAdditionalFlag
+echo. %_MSDeployCommandline% %_MsDeployAdditionalFlags% %_ArgMsDeployAdditionalFlags:&amp;=^&amp;%
+%_MSDeployCommandline% %_MsDeployAdditionalFlags% %_ArgMsDeployAdditionalFlags:&amp;=^&amp;%
+goto :eof
+
+@rem ---------------------------------------------------------------------------------
+@rem MSDeployWithOutArgMsDeployAdditionalFlag
+@rem ---------------------------------------------------------------------------------
+:MSDeployWithOutArgMsDeployAdditionalFlag
+echo. %_MSDeployCommandline% %_MsDeployAdditionalFlags%
+%_MSDeployCommandline% %_MsDeployAdditionalFlags%
+goto :eof
+
+@rem ---------------------------------------------------------------------------------
+@rem Find and set IISExpress argument.
+@rem ---------------------------------------------------------------------------------
+:SetIISExpressArguments
+                      
+if &quot;%IISExpressPath%&quot; == &quot;&quot; (
+for /F &quot;usebackq tokens=1,2,*&quot; %%h  in (`reg query &quot;HKLM\SOFTWARE\Microsoft\IISExpress&quot; /s  ^| findstr -i &quot;InstallPath&quot;`) do (
+if /I &quot;%%h&quot; == &quot;InstallPath&quot; ( 
+if /I &quot;%%i&quot; == &quot;REG_SZ&quot; ( 
+if not &quot;%%j&quot; == &quot;&quot; ( 
+if &quot;%%~dpj&quot; == &quot;%%j&quot; ( 
+set IISExpressPath=%%j
+))))))
+
+if &quot;%IISExpressPath%&quot; == &quot;&quot; (
+for /F &quot;usebackq tokens=1,2,*&quot; %%h  in (`reg query &quot;HKLM\SOFTWARE\Wow6432Node\Microsoft\IISExpress&quot; /s  ^| findstr -i &quot;InstallPath&quot;`) do (
+if /I &quot;%%h&quot; == &quot;InstallPath&quot; ( 
+if /I &quot;%%i&quot; == &quot;REG_SZ&quot; ( 
+if not &quot;%%j&quot; == &quot;&quot; ( 
+if &quot;%%~dpj&quot; == &quot;%%j&quot; ( 
+set IISExpressPath=%%j
+))))))
+
+if &quot;%PersonalDocumentFolder%&quot; == &quot;&quot; (
+for /F &quot;usebackq tokens=2*&quot; %%i  in (`reg query &quot;HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders&quot; /v Personal`) do (
+set PersonalDocumentFolder=%%j
+))
+
+if &quot;%IISExpressManifest%&quot; == &quot;&quot; (
+for /F &quot;usebackq tokens=1,2,*&quot; %%h  in (`reg query &quot;HKLM\SOFTWARE\Microsoft\IISExpress&quot; /s  ^| findstr -i &quot;Manifest&quot;`) do (
+if /I &quot;%%h&quot; == &quot;Manifest&quot; ( 
+if /I &quot;%%i&quot; == &quot;REG_SZ&quot; ( 
+if not &quot;%%j&quot; == &quot;&quot; ( 
+set IISExpressManifest=%%j
+)))))
+
+if &quot;%IISExpressManifest%&quot; == &quot;&quot; (
+for /F &quot;usebackq tokens=1,2,*&quot; %%h  in (`reg query &quot;HKLM\SOFTWARE\Wow6432Node\Microsoft\IISExpress&quot; /s  ^| findstr -i &quot;Manifest&quot;`) do (
+if /I &quot;%%h&quot; == &quot;Manifest&quot; ( 
+if /I &quot;%%i&quot; == &quot;REG_SZ&quot; ( 
+if not &quot;%%j&quot; == &quot;&quot; ( 
+set IISExpressManifest=%%j
+)))))
+                      
+set IISExpressUserProfileDirectory=&quot;%PersonalDocumentFolder%\IISExpress\config&quot;
+
+@rem ---------------------------------------------
+$(_GenerateSampleDeployScript_AfterSetIISexpressRelatedVariable)
+@rem ---------------------------------------------
+
+goto :eof                      
+                      
+@rem ---------------------------------------------------------------------------------
+@rem CheckParameterFile -- check if the package's setparamters.xml exists or not
+@rem ---------------------------------------------------------------------------------
+:CheckParameterFile
+if exist &quot;%_DeploySetParametersFile%&quot; (
+echo SetParameters from:
+echo &quot;%_DeploySetParametersFile%&quot;
+echo You can change IIS Application Name, Physical path, connectionString
+echo or other deploy parameters in the above file.
+) else (
+echo SetParamterFiles does not exist in package location.
+echo Use package embedded defaultValue to deploy.
+)
+echo -------------------------------------------------------
+goto :eof
+
+@rem ---------------------------------------------------------------------------------
+@rem Usage
+@rem ---------------------------------------------------------------------------------
+:usage
+echo =========================================================
+if not exist &quot;$(_ScriptGenerateSampleDeployScriptReadMeLocation)&quot; (
+echo Usage:%~nx0 [/T^|/Y] [/M:ComputerName] [/U:userName] [/P:password] [/G:tempAgent] [additional msdeploy flags ...]
+echo Required flags:
+echo /T  Calls msdeploy.exe with the &quot;-whatif&quot; flag, which simulates deployment. 
+echo /Y  Calls msdeploy.exe without the &quot;-whatif&quot; flag, which deploys the package to the current machine or destination server 
+echo Optional flags:  
+echo. By Default, this script deploy to the current machine where this script is invoked which will use current user credential without tempAgent. 
+echo.   Only pass these arguments when in advance scenario.
+echo /M:  Msdeploy destination name of remote computer or proxy-URL. Default is local.
+echo /U:  Msdeploy destination user name. 
+echo /P:  Msdeploy destination password.
+echo /G:  Msdeploy destination tempAgent. True or False. Default is false.
+echo /A:  specifies the type of authentication to be used. The possible values are NTLM and Basic. If the wmsvc provider setting is specified, the default authentication type is Basic; otherwise, the default authentication type is NTLM.
+echo /L:  Deploy to Local IISExpress User Instance.  
+
+echo.[additional msdeploy flags]: note: &quot; is required for passing = through command line.
+echo  &quot;-skip:objectName=setAcl&quot; &quot;-skip:objectName=dbFullSql&quot;
+echo.Alternative environment variable _MsDeployAdditionalFlags is also honored.
+echo.
+echo. Please make sure MSDeploy is installed in the box $(_MSdeployFwdLink)
+echo.
+echo In addition, you can change IIS Application Name, Physical path, 
+echo connectionString and other deploy parameters in the following file:
+echo &quot;%_DeploySetParametersFile%&quot;
+echo.
+echo For more information about this batch file, visit $(_SampleDeployCmdFwdLink) 
+) else (
+start notepad &quot;$(_ScriptGenerateSampleDeployScriptReadMeLocation)&quot;
+)
+echo =========================================================
+goto :eof
+"/>
+
+
+    <ItemGroup>
+      <FileWrites Include="$(GenerateSampleDeployScriptLocation)" />
+    </ItemGroup>
+
+    <!--Force evaluation of the $(GenerateSampleDeployScriptLocation)-->
+    <CreateProperty Value="$(GenerateSampleDeployScriptLocation)">
+      <Output TaskParameter="Value" PropertyName="_GenerateSampleDeployScriptLocation"/>
+    </CreateProperty>
+
+    <!--Generate localized readme.txt for this batch file-->
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpPrerequisites"
+      ArgumentCount="3"
+      Arguments="$(_MSdeployFwdLink);$(GenerateSampleDeployScriptSourceFileName);$(GenerateSampleParametersValueFileName)">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpSection1"
+      ArgumentCount="1"
+      Arguments="$([System.IO.Path]::GetFileName($(_GenerateSampleDeployScriptLocation)))">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpRequired">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpRequiredExplainedFlagT">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+    ID="PublishLocalizedString_SampleScriptHelpRequiredExplainedFlagY">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpOptional">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpOptionalExplainedFlagM">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpOptionalExplainedFlagUP">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpOptionalExplainedFlagG">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpOptionalExplainedFlagA">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpOptionalExplainedFlagL">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpOptionalExplainedAdditionalFlags">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpEnviroment">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpEnviromentExplained"
+      ArgumentCount="1"
+      Arguments="$(GenerateSampleParametersValueFileName)">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_SampleScriptHelpMoreInfo"
+      ArgumentCount="1"
+      Arguments="$(_SampleDeployCmdFwdLink)">
+      <Output TaskParameter="Result" ItemName="_PublishLocalizedString_SampleScriptHelpString" />
+    </GetPublishingLocalizedString>
+
+    <WriteLinesToFile File="$(GenerateSampleDeployScriptReadMeLocation)"
+                      Overwrite="True"
+                       Encoding="utf-8"
+                       Lines="@(_PublishLocalizedString_SampleScriptHelpString,'')" />
+
+
+    <ItemGroup>
+      <FileWrites Include="$(GenerateSampleDeployScriptReadMeLocation)" />
+    </ItemGroup>
+
+
+    <!--Get Localized string before displaying message where we generate the batch file-->
+    <GetPublishingLocalizedString
+       Importance="High"
+       ID="PublishLocalizedString_FinishGenerateSampleMsDeployBatchScript"
+       ArgumentCount="2"
+       Arguments="$(GenerateSampleDeployScriptLocation);$(GenerateSampleParametersValueLocation)"
+       LogType="Message" />
+
+    <!--<Message Importance="high"
+         Text="Sample script for deploying this package is generated at the following location:
+$(GenerateSampleDeployScriptLocation)
+For this sample script, you can change the deploy parameters by changing the following file:
+$(GenerateSampleParametersValueLocation)" />-->
+
+  </Target>
+
+
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingMSDeployCommonTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingMSDeployCommonTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingMSDeployCommonTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingMSDeployCommonTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+
+</Project>

BIN
nancy/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.Publishing.Tasks.dll


+ 4678 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.Publishing.targets

@@ -0,0 +1,4678 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.targets  
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard build process to deploy web application projects.
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <UsingTask TaskName="GetProjectProperties" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="TransformXml" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ParameterizeTransformXml" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="MSDeploy" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="VSMSDeploy" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CopyPipelineFiles"  AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="GetPipelineDestinationFileNameMatch"  AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="EscapeTextForRegularExpressions" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="RemoveTrailingSlash" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ConcatFullServiceUrlWithSiteName" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="IsCleanMSDeployPackageNeeded" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CheckPathAttributes" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CheckItemsCount" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CheckItemsForDuplication" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CreateProviderList" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CreateDacPac" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="GatherLinkExtensionsToBeExposedInVS" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="MapUriToIisWebServer" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ImportParametersFile" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ExportParametersFile" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="SortParametrsByPriority" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="RemoveEmptyDirectories" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="FilterByItems" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="ExportManifestFile" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="GetDeployManagedRuntimeVersion" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="NormalizeServiceUrl" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="SqlScriptPreprocessSqlVariables" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CollectFilesinFolder" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="GetLocalMachineRegistrySubKeyNames" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="EscapeXMLString" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="DetectRemoteProvider" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CheckRemoteFx45" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="PublishToolsVersionCheck" AssemblyFile="Microsoft.Web.Publishing.Tasks.dll"/>
+
+  <!-- The build process can be extended in a similar way as MS.Common.targets -->
+  <PropertyGroup>
+    <ImportByWildcardBeforeMicrosoftWebPublishingTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/>
+
+  <!--***************************************************************-->
+  <!-- Web Publish Pipeline Version/Supports
+       _WPPVersion: Version Stamp 
+       _WPPSupports: Function support list-->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <_WPPVersion>2.0</_WPPVersion>
+    <_WPPSupports>IISExpress;AspNetCompileMerge</_WPPSupports>
+    <_WPPWebPublishMethodSupports>WebMSDeployPublish;WebPackagePublish</_WPPWebPublishMethodSupports>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <_WPPSupports Include="$(_WPPSupports)" />
+  </ItemGroup>
+
+
+  <!--Generic mapping for the IISExpress Application Pools to IIS Application Pools common names-->
+  <ItemGroup>
+    <_IISApplicationPool Include="Clr4IntegratedAppPool">
+      <DestinationIISApplicationPool>ASP.NET v4.0</DestinationIISApplicationPool>
+    </_IISApplicationPool>
+    <_IISApplicationPool Include="Clr4ClassicAppPool">
+      <DestinationIISApplicationPool>ASP.NET v4.0 Classic</DestinationIISApplicationPool>
+    </_IISApplicationPool>
+    <_IISApplicationPool Include="Clr2IntegratedAppPool">
+      <DestinationIISApplicationPool>DefaultAppPool</DestinationIISApplicationPool>
+    </_IISApplicationPool>
+    <_IISApplicationPool Include="Clr2ClassicAppPool">
+      <DestinationIISApplicationPool>Classic .NET AppPool</DestinationIISApplicationPool>
+    </_IISApplicationPool>
+  </ItemGroup>
+  
+  
+  
+  <!--***************************************************************-->
+  <!-- Setting up properties which MS.Common.targets would normally setup -->
+  <!--***************************************************************-->
+  <PropertyGroup Condition="'$(BaseIntermediateOutputPath)'=='' ">
+    <BaseIntermediateOutputPath >obj\</BaseIntermediateOutputPath>
+    <BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
+  </PropertyGroup>
+
+  <PropertyGroup Condition=" '$(IntermediateOutputPath)' == '' ">
+    <IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' Or '$(PlatformName)' == ''">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
+    <IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
+    <IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
+  </PropertyGroup>
+
+  <!--***************************************************************-->
+  <!-- Global settings for Web publish pipeline -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <WebPublishPipelineProjectDirectory Condition="'$(WebPublishPipelineProjectDirectory)'==''">$(MSBuildProjectDirectory)</WebPublishPipelineProjectDirectory>
+    <WebPublishPipelineSourceRootDirectory Condition="'$(WebPublishPipelineSourceRootDirectory)'==''">$(WebPublishPipelineProjectDirectory)</WebPublishPipelineSourceRootDirectory>
+    <WebPublishPipelineTransformRootDirectory Condition="'$(WebPublishPipelineTransformRootDirectory)'==''"></WebPublishPipelineTransformRootDirectory>
+    <WebPublishPipelineProjectName Condition="'$(WebPublishPipelineProjectName)'==''">$(MSBuildProjectName)</WebPublishPipelineProjectName>
+    <WebPublishPipelineProjectFile Condition="'$(WebPublishPipelineProjectFile)'==''">$(MSBuildProjectFile)</WebPublishPipelineProjectFile>
+    <WebPublishPipeLineProjectFullPath Condition="'$(WebPublishPipelineProjectFullPath)'==''">$([System.IO.Path]::GetFullPath($([System.IO.Path]::Combine($(WebPublishPipelineProjectDirectory), $(WebPublishPipelineProjectFile)))))</WebPublishPipeLineProjectFullPath>
+    <IsDesktopBuild Condition="'$(IsDesktopBuild)'=='' And '$(TeamFoundationServerUrl)' != ''">False</IsDesktopBuild>
+    <WebPublishPipelineWAPProjectSettings Condition="'$(WebPublishPipelineWAPProjectSettings)' ==''">$(WebPublishPipeLineProjectFullPath)</WebPublishPipelineWAPProjectSettings>
+    <_WPPDefaultIntermediateOutputPathPathRoot Condition="'$(WebPublishPipelineProjectDirectory)' != '$(MSBuildProjectDirectory)'">$(MSBuildProjectDirectory)\</_WPPDefaultIntermediateOutputPathPathRoot>
+    <VerifyDatabaseSettingWithImport Condition="'$(VerifyDatabaseSettingWithImport)' == '' And '$(IgnoreDatabaseSettingOutOfSync)' == 'true'">False</VerifyDatabaseSettingWithImport>
+    <VerifyDatabaseSettingWithImport Condition="'$(VerifyDatabaseSettingWithImport)' == '' ">True</VerifyDatabaseSettingWithImport>
+    <_LocalDBVersionToUseForSqlExpress Condition="'$(_LocalDBVersionToUseForSqlExpress)' == ''">11.0</_LocalDBVersionToUseForSqlExpress>
+    <_PublishProfileSet>False</_PublishProfileSet>
+    <EnableWebPublishProfileFile>True</EnableWebPublishProfileFile>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(_WPPDefaultIntermediateOutputPath)' == ''">
+    <_WPPDefaultIntermediateOutputPath>$(IntermediateOutputPath)</_WPPDefaultIntermediateOutputPath>
+    <_WPPDefaultIntermediateOutputPath Condition="'$([System.IO.Path]::IsPathRooted($(IntermediateOutputPath)))' == 'False'">$(_WPPDefaultIntermediateOutputPathPathRoot)$(IntermediateOutputPath)</_WPPDefaultIntermediateOutputPath>
+    <_WPPDefaultIntermediateOutputFullPath>$([System.IO.Path]::GetFullPath($(_WPPDefaultIntermediateOutputPath)))</_WPPDefaultIntermediateOutputFullPath>
+  </PropertyGroup>
+
+  <!--***************************************************************
+  	If a publish profile is specified setup the properties to import the file
+  ***************************************************************-->
+  <PropertyGroup Condition="'$(PublishProfile)' != ''">
+    <_PublishProfileExtension>$([System.IO.Path]::GetExtension($(PublishProfile)))</_PublishProfileExtension>
+    <_PublishProfileDirectory>$([System.IO.Path]::GetDirectoryName($(PublishProfile)))</_PublishProfileDirectory>
+    <_PublishProfileName>$([System.IO.Path]::GetFileNameWithoutExtension($(PublishProfile)))</_PublishProfileName>
+    <_PublishProfileSet>True</_PublishProfileSet>
+    <DeployDefaultTarget Condition="'$(DeployDefaultTarget)'==''">WebPublish</DeployDefaultTarget>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <PublishProfileRootFolder Condition="'$(PublishProfileRootFolder)' == '' and '$(AppDesignerFolder)'!='' ">$(WebPublishPipelineProjectDirectory)\$(AppDesignerFolder)\PublishProfiles</PublishProfileRootFolder>
+    <PublishProfileRootFolder Condition="'$(PublishProfileRootFolder)' == '' and '$(MSBuildProjectExtension)' =='.vbproj' ">$(WebPublishPipelineProjectDirectory)\My Project\PublishProfiles</PublishProfileRootFolder>
+    <PublishProfileRootFolder Condition="'$(PublishProfileRootFolder)' == '' and '$(MSBuildProjectExtension)' =='.csproj' ">$(WebPublishPipelineProjectDirectory)\Properties\PublishProfiles</PublishProfileRootFolder>
+    <PublishProfileRootFolder Condition="'$(PublishProfileRootFolder)' == ''">$(WebPublishPipelineProjectDirectory)\__profiles</PublishProfileRootFolder>
+  </PropertyGroup>
+  
+  <PropertyGroup Condition="'$(_PublishProfileExtension)' == '' And '$(_PublishProfileDirectory)' == ''">
+    <PublishProfileName Condition="'$(PublishProfileName)' == '' ">$(_PublishProfileName)</PublishProfileName>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(PublishProfileName)' !='' And '$(WebPublishProfileFile)'==''">
+    <WebPublishProfileFile>$(PublishProfileRootFolder)\$(PublishProfileName).pubxml</WebPublishProfileFile>
+    <WebPublishProfileFile Condition="'$(_WebProjectType)' == 'WebSite'">$(WebPublishPipelineProjectDirectory)\App_Data\PublishProfiles\$(PublishProfileName).pubxml</WebPublishProfileFile>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="$(_PublishProfileSet) And '$(PublishProfileName)' =='' And '$(WebPublishProfileFile)'==''">
+    <WebPublishProfileFile Condition="'$([System.IO.Path]::IsPathRooted($(PublishProfile)))' == 'True'">$(PublishProfile)</WebPublishProfileFile>
+    <WebPublishProfileFile Condition="'$([System.IO.Path]::IsPathRooted($(PublishProfile)))' == 'False' And '$([System.IO.File]::Exists($(WebPublishPipelineProjectDirectory)\$(PublishProfile)))'">$(WebPublishPipelineProjectDirectory)\$(PublishProfile)</WebPublishProfileFile>
+    <WebPublishProfileFile Condition="'$(WebPublishProfileFile)'==''">$(PublishProfileRootFolder)\$(PublishProfile)</WebPublishProfileFile>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(PublishProfileName)' == '' And '$(WebPublishProfileFile)' !=''">
+    <PublishProfileName>$([System.IO.Path]::GetFileNameWithoutExtension($(WebPublishProfileFile)))</PublishProfileName>
+    <_PublishProfileName>$(PublishProfileName)</_PublishProfileName>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <_WebPublishProfileFileWillBeImported>false</_WebPublishProfileFileWillBeImported>
+    <_WebPublishProfileFileWillBeImported Condition="'$(EnableWebPublishProfileFile)'=='true' And '$(WebPublishProfileFile)' != '' And Exists($(WebPublishProfileFile))">true</_WebPublishProfileFileWillBeImported>
+  </PropertyGroup>
+
+  <Import Project="$(WebPublishProfileFile)" Condition="'$(_WebPublishProfileFileWillBeImported)'=='true'"/>
+
+  <PropertyGroup Condition="'$(_WebPublishProfileFileWillBeImported)'=='true'">
+    <WebPublishProfileCustomizeTargetFile Condition="'$(WebPublishProfileCustomizeTargetFile)'==''">$([System.IO.Path]::ChangeExtension($(WebPublishProfileFile), '.wpp.targets'))</WebPublishProfileCustomizeTargetFile>
+    <WebPublishProfileParametersXMLFile Condition="'$(WebPublishProfileParametersXMLFile)'==''">$([System.IO.Path]::ChangeExtension($(WebPublishProfileFile), '.parameters.xml'))</WebPublishProfileParametersXMLFile>
+  </PropertyGroup>
+
+  <Import Project="$(WebPublishProfileCustomizeTargetFile)" Condition="'$(WebPublishProfileCustomizeTargetFile)' != '' And Exists($(WebPublishProfileCustomizeTargetFile)) " />
+
+  <!--***************************************************************-->
+  <!-- If there is a file named $(WebPublishPipelineProjectName).wpp.targets it will automatically be imported. -->
+  <!-- This allows users to extend the build/publish process for the project -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <WebPublishPipelineCustomizeTargetFile Condition="'$(WebPublishPipelineCustomizeTargetFile)'==''">$(WebPublishPipelineProjectDirectory)\*.wpp.targets</WebPublishPipelineCustomizeTargetFile>
+    <WebPublishPipelineSolutionTargetFile Condition="'$(WebPublishPipelineSolutionTargetFile)'==''">$(WebPublishPipelineProjectDirectory)\..\wpp.deploysettings.targets</WebPublishPipelineSolutionTargetFile>
+  </PropertyGroup>
+  <Import Project="$(WebPublishPipelineCustomizeTargetFile)" Condition="'$(WebPublishPipelineCustomizeTargetFile)' != ''"/>
+  <Import Project="$(WebPublishPipelineSolutionTargetFile)" Condition="'$(WebPublishPipelineSolutionTargetFile)' != '' And Exists($(WebPublishPipelineSolutionTargetFile))"/>
+
+  <!--***************************************************************-->
+  <!--Globals settings for the Clean target -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <_WPPCleanTargets>
+      $(_WPPCleanTargets);
+      CleanWebsitesPackage;
+      CleanWebsitesWPPAllFilesInSingleFolder;
+      CleanWebPublishPipelineIntermediateOutput;
+    </_WPPCleanTargets>
+    <CleanDependsOn>
+      $(CleanDependsOn);
+      $(_WPPCleanTargets);
+    </CleanDependsOn>
+  </PropertyGroup>
+
+  <!-- Global settings for file collection -->
+  <PropertyGroup Condition="'$(WebPublishPipelineProjectDirectory)' == '$(MSBuildProjectDirectory)'">
+    <FilesToIncludeForPublish Condition="'$(FilesToIncludeForPublish)'==''">OnlyFilesToRunTheApp</FilesToIncludeForPublish>
+    <AlternativeProjectDirectory></AlternativeProjectDirectory>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(WebPublishPipelineProjectDirectory)' != '$(MSBuildProjectDirectory)'">
+    <FilesToIncludeForPublish Condition="'$(FilesToIncludeForPublish)'==''">AllFilesInProjectFolder</FilesToIncludeForPublish>
+    <AlternativeProjectDirectory>$(WebPublishPipelineProjectDirectory)</AlternativeProjectDirectory>
+    <AlternativeProjectDirectory Condition="!HasTrailingSlash('$(AlternativeProjectDirectory)')">$(AlternativeProjectDirectory)</AlternativeProjectDirectory>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <!-- For website project we will always exclude debug symbols from publishing. This can be overridden in the .pubxml file. -->
+    <ExcludeGeneratedDebugSymbol Condition="'$(ExcludeGeneratedDebugSymbol)'=='' And '$(_WebProjectType)' == 'WebSite'">True</ExcludeGeneratedDebugSymbol>
+    
+    <ExcludeGeneratedDebugSymbol Condition="'$(ExcludeGeneratedDebugSymbol)'=='' And '$(Configuration)' == 'Release'">True</ExcludeGeneratedDebugSymbol>
+    <ExcludeGeneratedDebugSymbol Condition="'$(ExcludeGeneratedDebugSymbol)'==''">False</ExcludeGeneratedDebugSymbol>
+
+    <!-- This will control whether XML files from ResolveAssemblyReference is published, default is true (to exclude) -->
+    <ExcludeXmlAssemblyFiles Condition=" '$(ExcludeXmlAssemblyFiles)'=='' ">true</ExcludeXmlAssemblyFiles>
+    
+    <ExcludeApp_Data Condition="'$(ExcludeApp_Data)'==''">False</ExcludeApp_Data>
+    <SkipApp_DataFolder Condition="'$(SkipApp_DataFolder)'==''">$(ExcludeApp_Data)</SkipApp_DataFolder>
+    <UseMsdeployExe Condition="'$(UseMsdeployExe)'==''">False</UseMsdeployExe>
+
+    <!-- Determines if Linked files should be collected during the PipelineCollectFilesPhase -->
+    <EnableCollectLinkFilesInProject Condition="'$(EnableCollectLinkFilesInProject)'==''">True</EnableCollectLinkFilesInProject>
+    <ExcludeLinkFilesInProject Condition="'$(ExcludeLinkFilesInProject)'==''">False</ExcludeLinkFilesInProject>
+
+    <!-- If $(CleanWPPAllFilesInSingleFolder) is explicit set, we should set $(_CleanWPPIfNeedTo) accordingly -->
+    <_CleanWPPIfNeedTo Condition="'$(_CleanWPPIfNeedTo)' == '' And '$(CleanWPPAllFilesInSingleFolder)'!=''">$(CleanWPPAllFilesInSingleFolder)</_CleanWPPIfNeedTo>
+    <CleanWPPAllFilesInSingleFolder Condition="'$(CleanWPPAllFilesInSingleFolder)'==''">False</CleanWPPAllFilesInSingleFolder>
+    
+    <IncludeIisSettings Condition="'$(IncludeIisSettings)'==''">False</IncludeIisSettings>
+    <!-- Determines if the files in @(ExcludeFilesFromPackage) will be excluded -->
+    <ExcludeFilesFromPackage Condition="'$(ExcludeFilesFromPackage)'==''">True</ExcludeFilesFromPackage>
+    <!-- Determines if the parameters.xml file will be merged into @(ParametersXMLFiles) -->
+    <ImportParametersFiles  Condition="'$(ImportParametersFiles)'==''">True</ImportParametersFiles>
+    <ImportParametersFile_DisableEscapeMSBuildVariable Condition="'$(ImportParametersFile_DisableEscapeMSBuildVariable)' == ''" >False</ImportParametersFile_DisableEscapeMSBuildVariable>
+    <ImportProjectParametersFiles Condition="'$(ImportProjectParametersFiles)'==''">True</ImportProjectParametersFiles>
+    <ImportProfileParametersFiles Condition="'$(ImportProfileParametersFiles)'==''">True</ImportProfileParametersFiles>
+    <ImportPublishingParameterValues  Condition="'$(ImportPublishingParameterValues)'==''">True</ImportPublishingParameterValues>
+    <EnableOptimisticParameterDefaultValue Condition="'$(EnableOptimisticParameterDefaultValue)'==''">True</EnableOptimisticParameterDefaultValue>
+    <ParameterApplicationPool Condition="'$(ParameterApplicationPool)'==''">True</ParameterApplicationPool>
+    <IIS6ParameterApplicationPool Condition="'$(IIS6ParameterApplicationPool)'==''">False</IIS6ParameterApplicationPool>
+    <!-- This allows disabling the generation of the MSDeploy parameters -->
+    <DisableAllVSGeneratedMSDeployParameter Condition="'$(DisableAllVSGeneratedMSDeployParameter)'==''">False</DisableAllVSGeneratedMSDeployParameter>
+    <!-- Setting this to false will disable the $(name) tokenization of connection strings in web.config when a package is created -->
+    <AutoParameterizationWebConfigConnectionStrings  Condition="'$(AutoParameterizationWebConfigConnectionStrings)'==''">True</AutoParameterizationWebConfigConnectionStrings>
+    <AutoParameterizationWebConfigCSNoDefaultValue  Condition="'$(AutoParameterizationWebConfigCSNoDefaultValue)'==''">False</AutoParameterizationWebConfigCSNoDefaultValue>
+    <AutoParameterizationWebConfigConnectionStringsIntermediateOutput Condition="'$(AutoParameterizationWebConfigConnectionStringsIntermediateOutput)'==''">CSAutoParameterize</AutoParameterizationWebConfigConnectionStringsIntermediateOutput>
+    <AutoParameterizationWebConfigConnectionStringsLocation Condition="'$(AutoParameterizationWebConfigConnectionStringsLocation)'==''">$(_WPPDefaultIntermediateOutputPath)$(AutoParameterizationWebConfigConnectionStringsIntermediateOutput)</AutoParameterizationWebConfigConnectionStringsLocation>
+
+    <_WPPLastBuildInfoIntermediateOutput Condition="'$(_WPPLastBuildInfoIntermediateOutput)'==''">_WPPLastBuildInfo.txt</_WPPLastBuildInfoIntermediateOutput>
+    <_WPPLastBuildInfoLocation Condition="'$(_WPPLastBuildInfoLocation)'==''">$(_WPPDefaultIntermediateOutputPath)$(_WPPLastBuildInfoIntermediateOutput)</_WPPLastBuildInfoLocation>
+
+    <InsertAdditionalWebCofigConnectionStrings Condition="'$(InsertAdditionalWebCofigConnectionStrings)' == ''">True</InsertAdditionalWebCofigConnectionStrings>
+    <InsertAdditionalWebCofigConnectionStringsIntermediateOutput Condition="'$(InsertAdditionalWebCofigConnectionStringsIntermediateOutput)'==''">InsertAdditionalCS</InsertAdditionalWebCofigConnectionStringsIntermediateOutput>
+    <InsertAdditionalWebCofigConnectionStringsLocation Condition="'$(InsertAdditionalWebCofigConnectionStringsLocation)'==''">$(_WPPDefaultIntermediateOutputPath)$(InsertAdditionalWebCofigConnectionStringsIntermediateOutput)</InsertAdditionalWebCofigConnectionStringsLocation>
+    <InsertAdditionalWebConfigConnectionStringProviderName Condition="'$(InsertAdditionalWebConfigConnectionStringProviderName)'==''">System.Data.SqlClient</InsertAdditionalWebConfigConnectionStringProviderName>
+    <InsertAdditionalWebConfigConnectionStringOnlyInRoot Condition="'$(InsertAdditionalWebConfigConnectionStringOnlyInRoot)'==''">True</InsertAdditionalWebConfigConnectionStringOnlyInRoot>
+
+    <!-- For added .sql files this property determines if the script will be contained in a transaction. -->
+    <SqlScriptSourceTransacted Condition="'$(SqlScriptSourceTransacted)'==''"></SqlScriptSourceTransacted>
+    <!-- For the automatically generated SQL script for legacy SQL publishing this determines if the generated script will be
+    transactional or not. -->
+    <AutoSqlScriptSourceTransacted Condition="'$(AutoSqlScriptSourceTransacted)'==''"></AutoSqlScriptSourceTransacted>
+
+    <DatabaseDeployIntermediateRelativePath Condition="'$(DatabaseDeployIntermediateRelativePath)'==''">Database</DatabaseDeployIntermediateRelativePath>
+    <DatabaseDeployIntermediateOutputPath Condition="'$(DatabaseDeployIntermediateOutputPath)'==''">$(_WPPDefaultIntermediateOutputPath)$(DatabaseDeployIntermediateRelativePath)</DatabaseDeployIntermediateOutputPath>
+    <_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile>$(AutoParameterizationWebConfigConnectionStringsLocation).parameters.xml</_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile>
+    
+    <!-- This is for backw compat that /p:DeployOnBuild=true without publish profile, it will fall back to package -->
+    <DeployDefaultTarget Condition="'$(DeployDefaultTarget)'==''">Package</DeployDefaultTarget>
+    <DeployTarget Condition="'$(DeployTarget)'==''">$(DeployDefaultTarget)</DeployTarget>
+    <RetryAttemptsForDeployment Condition="'$(RetryAttemptsForDeployment)'==''">2</RetryAttemptsForDeployment>
+    <DeployOnBuildDefault>False</DeployOnBuildDefault>
+    <DeployOnBuild Condition="'$(DeployOnBuild)'==''">$(DeployOnBuildDefault)</DeployOnBuild>
+    <EnableMSDeployBackup Condition=" '$(EnableMSDeployBackup)'=='' ">false</EnableMSDeployBackup>
+
+  </PropertyGroup>
+
+  <!-- Special flag for WAP to enable _CopyWebApplication to use Web Publishing Pipeline -->
+  <PropertyGroup>
+    <UseWPP_CopyWebApplication Condition="'$(UseWPP_CopyWebApplication)'==''">False</UseWPP_CopyWebApplication>
+  </PropertyGroup>
+  
+  <PropertyGroup>
+    <!-- Determines if the publish process will take a dependency on Build -->
+    <PipelineDependsOnBuild Condition="'$(PipelineDependsOnBuild)'=='' AND '$(BuildingInsideVisualStudio)' != 'true'">True</PipelineDependsOnBuild>
+    <PipelineDependsOnBuild Condition="'$(PipelineDependsOnBuild)'==''">False</PipelineDependsOnBuild>
+
+    <_DeployOnBuild>$(DeployOnBuild)</_DeployOnBuild>
+    <!-- When building in VS the publish process is handled directly in VS-->
+    <_DeployOnBuild Condition="'$(BuildingInsideVisualStudio)' == 'true'">False</_DeployOnBuild>
+
+    <!-- If _DeployOnBuild is true we should ensure that it executes after PrepareForRun -->
+     <PipelineDeployPhaseAfterTargets Condition="'$(PipelineDeployPhaseAfterTargets)' == '' And $(_DeployOnBuild) ">
+      PrepareForRun;
+    </PipelineDeployPhaseAfterTargets>    
+
+    <!-- We use the following property to detect BuildCircularDependency that we might introduce in the msbuild due to 
+    $(UseWPP_CopyWebApplication) and $(PipelineDependsOnBuild) both set to true.
+    Instead of letting msbuild failed error early with no message, we can capture it and provide a better error. -->
+    <WPPCopyWebApplicaitonPipelineCircularDependencyError>False</WPPCopyWebApplicaitonPipelineCircularDependencyError>
+    <WPPCopyWebApplicaitonPipelineCircularDependencyError Condition="$(UseWPP_CopyWebApplication) And !$(Disable_CopyWebApplication)  And $(PipelineDependsOnBuild) And !$(_DeployOnBuild)">True</WPPCopyWebApplicaitonPipelineCircularDependencyError>
+    <PipelineDependsOnBuild Condition="$(WPPCopyWebApplicaitonPipelineCircularDependencyError)">False</PipelineDependsOnBuild>
+
+    <!-- Setup the minimum set of targets required -->
+    <PipelineDependsOn>
+      $(PipelineDependsOn);
+      BeforeBuild;
+      BuildOnlySettings;
+      ResolveReferences;
+      PrepareResourceNames;
+      ComputeIntermediateSatelliteAssemblies;
+      GetCopyToOutputDirectoryItems;
+      _SGenCheckForOutputs;
+    </PipelineDependsOn>
+
+    <PipelineDependsOn Condition="$(PipelineDependsOnBuild) And !$(_DeployOnBuild)">
+      $(PipelineDependsOn);
+      Build;
+    </PipelineDependsOn>
+  
+    <PipelineDependsOn Condition="!$(PipelineDependsOnBuild) And !$(_DeployOnBuild)" >
+      $(PipelineDependsOn);
+      AfterBuild;
+    </PipelineDependsOn>
+  </PropertyGroup>
+
+  <!--***************************************************************-->
+  <!-- Settings relating to the web.config transform -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <ProjectConfigFileName Condition="'$(ProjectConfigFileName)'==''">Web.config</ProjectConfigFileName>
+    <_ProjectConfigFileExtension>$([System.IO.Path]::GetExtension($(ProjectConfigFileName)))</_ProjectConfigFileExtension>
+    <_ProjectConfigFilePrefix>$([System.IO.Path]::GetFileNameWithoutExtension($(ProjectConfigFileName)))</_ProjectConfigFilePrefix>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ProjectConfigTransformFileName Condition="'$(ProjectConfigTransformFileName)'==''">$(_ProjectConfigFilePrefix).$(Configuration)$(_ProjectConfigFileExtension)</ProjectConfigTransformFileName>
+    <TransformWebConfigEnabled Condition="'$(TransformWebConfigEnabled)'==''">true</TransformWebConfigEnabled>
+    <TransformWebConfigStackTraceEnabled Condition="'$(TransformWebConfigStackTraceEnabled)'==''">False</TransformWebConfigStackTraceEnabled>
+    <UseParameterizeToTransformWebConfig Condition="'$(UseParameterizeToTransformWebConfig)'==''">False</UseParameterizeToTransformWebConfig>
+    <TransformWebConfigIntermediateOutput Condition="'$(TransformWebConfigIntermediateOutput)'==''">TransformWebConfig</TransformWebConfigIntermediateOutput>
+    <TransformWebConfigIntermediateLocation Condition="'$(TransformWebConfigIntermediateLocation)'==''">$(_WPPDefaultIntermediateOutputPath)$(TransformWebConfigIntermediateOutput)</TransformWebConfigIntermediateLocation>
+    <_WebConfigTransformOutputParametersFile>$(TransformWebConfigIntermediateLocation).parameters.xml</_WebConfigTransformOutputParametersFile>
+
+    <ProjectProfileTransformFileName Condition="'$(ProjectProfileTransformFileName)'=='' And '$(PublishProfileName)' != '' ">$(_ProjectConfigFilePrefix).$(PublishProfileName)$(_ProjectConfigFileExtension)</ProjectProfileTransformFileName>
+
+    <!--if $(TransformWebConfigEnabled) is also enabled and the ConfigTransform and ProfileTransform happen to have same filename, we default $(ProfilefileTransformWebCofnigEnabled) to false so it doesn't do double transform-->
+    <ProfileTransformWebConfigEnabled Condition="'$(ProfileTransformWebConfigEnabled)'=='' And '$(TransformWebConfigEnabled)' == 'true' And ('$(ProjectProfileTransformFileName)' == '$(ProjectConfigTransformFileName)')">False</ProfileTransformWebConfigEnabled>
+    <ProfileTransformWebConfigEnabled Condition="'$(ProfileTransformWebConfigEnabled)'==''">true</ProfileTransformWebConfigEnabled>
+    <ProfileTransformWebConfigStackTraceEnabled Condition="'$(ProfileTransformWebConfigStackTraceEnabled)'==''">False</ProfileTransformWebConfigStackTraceEnabled>
+    <UseParameterizeToProfileTransformWebConfig Condition="'$(UseParameterizeToProfileTransformWebConfig)'==''">False</UseParameterizeToProfileTransformWebConfig>
+    <ProfileTransformWebConfigIntermediateOutput Condition="'$(ProfileTransformWebConfigIntermediateOutput)'==''">ProfileTransformWebConfig</ProfileTransformWebConfigIntermediateOutput>
+    <ProfileTransformWebConfigIntermediateLocation Condition="'$(ProfileTransformWebConfigIntermediateLocation)'==''">$(_WPPDefaultIntermediateOutputPath)$(ProfileTransformWebConfigIntermediateOutput)</ProfileTransformWebConfigIntermediateLocation>
+    <_ProfileWebConfigTransformOutputParametersFile>$(ProfileTransformWebConfigIntermediateLocation).parameters.xml</_ProfileWebConfigTransformOutputParametersFile>
+    
+    <ParameterizeTransformXmlUseXPath Condition="'$(ParameterizeTransformXmlUseXPath)'==''">True</ParameterizeTransformXmlUseXPath>
+  </PropertyGroup>
+
+  <!--***************************************************************-->
+  <!-- Overwrite WAP default for _CopyWebApplication -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <!-- Required in case the WAP project doesn't exist -->
+    <WebProjectOutputDirInsideProjectDefault>True</WebProjectOutputDirInsideProjectDefault>
+    <WebProjectOutputDirInsideProjectDefault  Condition="('$(OutDir)' != '$(OutputPath)') Or ('$(IsDesktopBuild)' == 'False')" >False</WebProjectOutputDirInsideProjectDefault>
+    <WebProjectOutputDirInsideProject Condition="'$(WebProjectOutputDirInsideProject)' == ''">$(WebProjectOutputDirInsideProjectDefault)</WebProjectOutputDirInsideProject>
+    <CleanWebProjectOutputDir>True</CleanWebProjectOutputDir>
+    <CleanWebProjectOutputDir Condition="$(WebProjectOutputDirInsideProject)" >False</CleanWebProjectOutputDir>
+  </PropertyGroup>
+
+  <!--***************************************************************-->
+  <!-- Global settings for where the web package will be created for Team Build -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <!--We need the following in case WAP project does not exist-->
+    <DefaultPackageOutputDir Condition="'$(DefaultPackageOutputDir)'=='' And !$(WebProjectOutputDirInsideProject) ">$(OutDir)_PublishedWebsites\$(WebPublishPipelineProjectName)_Package</DefaultPackageOutputDir>
+    <DefaultPackageOutputDir Condition="'$(DefaultPackageOutputDir)'==''">$(_WPPDefaultIntermediateOutputPath)Package</DefaultPackageOutputDir>
+    <DefaultPackageFileName Condition="'$(DefaultPackageFileName)'==''">$(WebPublishPipelineProjectName).zip</DefaultPackageFileName>
+    <DefaultMSDeployDestinationSite Condition="'$(DefaultMSDeployDestinationSite)'==''">Default Web Site</DefaultMSDeployDestinationSite>
+    <DefaultMsDeployAltSuffix Condition="'$(DefaultMsDeployAltSuffix)'==''">_deploy</DefaultMsDeployAltSuffix>
+    <DefaultMSDeployDestinationApplicationName Condition="'$(DefaultMSDeployDestinationApplicationName)'==''">$(WebPublishPipelineProjectName)</DefaultMSDeployDestinationApplicationName>
+    <DefaultDeployIisAppPath Condition="'$(DefaultDeployIisAppPath)'==''">$(DefaultMSDeployDestinationSite)/$(DefaultMSDeployDestinationApplicationName)$(DefaultMsDeployAltSuffix)</DefaultDeployIisAppPath>
+    <DefaultDeployIisRootAppPath Condition="'$(DefaultDeployIisRootAppPath)'==''">$(DefaultMSDeployDestinationApplicationName)$(DefaultMsDeployAltSuffix)</DefaultDeployIisRootAppPath>
+  </PropertyGroup>
+
+  <!--***************************************************************-->
+  <!--Global setting for controling the package creation process -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <PackageAsSingleFile Condition="'$(PackageAsSingleFile)'==''">True</PackageAsSingleFile>
+    <!-- DesktopBuildPackageLocation is been set by VS UI -->
+    <PackageLocation Condition="'$(PackageLocation)'=='' and !(('$(OutDir)' != '$(OutputPath)') Or ('$(IsDesktopBuild)' == 'False')) ">$(DesktopBuildPackageLocation)</PackageLocation>
+    <PackageFileName Condition="'$(PackageFileName)'=='' And $(PackageAsSingleFile) And '$(PackageLocation)' != ''">$(PackageLocation)</PackageFileName>
+    <PackageFileName Condition="'$(PackageFileName)'!='' And $(PackageAsSingleFile) And '$([System.IO.Path]::GetExtension($(PackageFileName)))' == '' ">$(PackageFileName)\$(DefaultPackageFileName)</PackageFileName>  
+    <PackageFileName Condition="'$(PackageFileName)'==''">$(DefaultPackageOutputDir)\$(DefaultPackageFileName)</PackageFileName>
+    <PackageArchiveRootDir Condition="'$(PackageArchiveRootDir)'=='' And !$(PackageAsSingleFile) And '$(PackageLocation)' != ''">$(PackageLocation)</PackageArchiveRootDir>
+    <PackageArchiveRootDir Condition="'$(PackageArchiveRootDir)'==''">$(DefaultPackageOutputDir)</PackageArchiveRootDir>
+    <PackageTempRootDir Condition="'$(PackageTempRootDir)'==''">$(_WPPDefaultIntermediateOutputPath)Package</PackageTempRootDir>
+    <!-- This will determine if the published content will be marked as an IIS application or simply a folder -->
+    <DeployAsIisApp Condition="'$(DeployAsIisApp)'==''">true</DeployAsIisApp>
+    <IncludeSetAclProviderOnDestination Condition="'$(IncludeSetAclProviderOnDestination)'==''">True</IncludeSetAclProviderOnDestination>
+    <MarkApp_DataWritableOnDestination Condition="'$(MarkApp_DataWritableOnDestination)'==''">True</MarkApp_DataWritableOnDestination>
+    <IgnoreDeployManagedRuntimeVersion Condition="'$(IgnoreDeployManagedRuntimeVersion)'==''">False</IgnoreDeployManagedRuntimeVersion>
+    <DeployDefaultTargetFrameworkVersion Condition="'$(DeployDefaultTargetFrameworkVersion)'==''">$(TargetFrameworkVersion)</DeployDefaultTargetFrameworkVersion>
+    <DeployManagedRuntimeVersion Condition="'$(DeployManagedRuntimeVersion)'==''"></DeployManagedRuntimeVersion>
+    <DeployEnable32bitAppOnWin64 Condition="'$(DeployEnable32bitAppOnWin64)'==''"></DeployEnable32bitAppOnWin64>
+    <DeployManagedPipelineMode Condition="'$(DeployManagedPipelineMode)'==''"></DeployManagedPipelineMode>    
+    <!-- Determines if the deploy.cmd file will be written out -->
+    <GenerateSampleDeployScript Condition="'$(GenerateSampleDeployScript)'==''">True</GenerateSampleDeployScript>
+    <PackageLogDir Condition="'$(PackageLogDir)'==''">$(DefaultPackageOutputDir)\Log</PackageLogDir>
+    <EnablePackageProcessLoggingAndAssert Condition="'$(EnablePackageProcessLoggingAndAssert)'==''">False</EnablePackageProcessLoggingAndAssert>
+    <!-- PackageTraceLevel 3 different levels:  Error, Warning, Info (From System.Diagnostic.TraceLevel, Default to Info) -->
+    <PackageTraceLevel Condition="'$(PackageTraceLevel)'==''">Info</PackageTraceLevel>
+    <_CreatePackage Condition="'$(_CreatePackage)'==''" >True</_CreatePackage>
+    <_UseDefaultLinkExtensionValue>False</_UseDefaultLinkExtensionValue>
+    <_UseDefaultLinkExtensionValue Condition="'$(PackageEnableLinks)'=='' and '$(PackageDisableLinks)'==''">True</_UseDefaultLinkExtensionValue>
+    <PackageEnableLinks Condition="$(_UseDefaultLinkExtensionValue)"></PackageEnableLinks>
+    <PackageDisableLinks Condition="$(_UseDefaultLinkExtensionValue)">AppPoolExtension;ContentExtension;CertificateExtension</PackageDisableLinks>
+    <PackageEnableLinks Condition="'$(IncludeAppPool)'=='true' and $(_UseDefaultLinkExtensionValue)">AppPoolExtension</PackageEnableLinks>
+    <PackageDisableLinks Condition="'$(IncludeAppPool)'=='true' and $(_UseDefaultLinkExtensionValue)">ContentExtension;CertificateExtension</PackageDisableLinks>
+    <ProjectParametersXMLFile Condition="'$(ProjectParametersXMLFile)'=='' And Exists('$(MSBuildProjectDirectory)\Parameters.xml')">$(MSBuildProjectDirectory)\Parameters.xml</ProjectParametersXMLFile>
+    <ProjectParametersXMLFile Condition="'$(ProjectParametersXMLFile)'==''">$(WebPublishPipelineProjectDirectory)\Parameters.xml</ProjectParametersXMLFile>
+    <EnableProjectDeployParameterPrefix Condition="'$(EnableProjectDeployParameterPrefix)'==''">False</EnableProjectDeployParameterPrefix>
+    <DeployParameterPrefix Condition="$(EnableProjectDeployParameterPrefix) and '$(DeployParameterPrefix)'==''">$(WebPublishPipelineProjectName) </DeployParameterPrefix>
+    <DeployParameterIISAppName Condition="'$(DeployParameterIISAppName)'==''">$(DeployParameterPrefix)IIS Web Application Name</DeployParameterIISAppName>
+    <DeployParameterIISAppPoolName Condition="'$(DeployParameterIISAppPoolName)'==''">$(DeployParameterPrefix)IIS Web Application Pool Name</DeployParameterIISAppPoolName>
+    <DeployParameterApp_DataWritePermission Condition="'$(DeployParameterApp_DataWritePermission)'==''">$(DeployParameterPrefix)Add write permission to App_Data Folder</DeployParameterApp_DataWritePermission>
+    <DeployParameterIISAppPhysicalPath Condition="'$(DeployParameterIISAppPhysicalPath)'==''">$(DeployParameterPrefix)Web Application Physical Path</DeployParameterIISAppPhysicalPath>
+    
+    <DeployParameterAutoDescriptionbyTags Condition="'$(DeployParameterAutoDescriptionbyTags)'==''">True</DeployParameterAutoDescriptionbyTags>
+    <DeployParameterIISAppNameDescription Condition="'$(DeployParameterIISAppNameDescription)'==''"></DeployParameterIISAppNameDescription>
+    <DeployParameterIISAppPoolNameDescription Condition="'$(DeployParameterIISAppPoolNameDescription)'==''"></DeployParameterIISAppPoolNameDescription>
+    <DeployParameterIISAppPhysicalPathDescription Condition="'$(DeployParameterIISAppPhysicalPathDescription)'==''"></DeployParameterIISAppPhysicalPathDescription>
+    <DeployParameterIISAppConnectionStringDescription Condition="'$(DeployParameterIISAppConnectionStringDescription)'==''"></DeployParameterIISAppConnectionStringDescription>
+    <DeployParameterSqlScriptVariablesDescription Condition="'$(DeployParameterSqlScriptVariablesDescription)'==''"></DeployParameterSqlScriptVariablesDescription>
+    
+    <MsDeployDatabaseTag Condition="'$(MsDeployDatabaseTag)'==''">SqlConnectionString</MsDeployDatabaseTag>
+    <MsDeploySqlCommandVariableKind Condition="'$(MsDeploySqlCommandVariableKind)'==''">SqlCommandVariable</MsDeploySqlCommandVariableKind>
+    
+    <!-- Properties relating to checking SQL scripts for commands which MSDeploy does not support -->
+    <MsdeploySqlUnsupportedCommand Condition="'$(MsdeploySqlUnsupportedCommand)'==''">:Connect;:!!;:Exit;:Help;:r;:Quit;</MsdeploySqlUnsupportedCommand>
+    <CheckSqlScriptForUnsupportedCommands Condition="'$(CheckSqlScriptForUnsupportedCommands)'==''">True</CheckSqlScriptForUnsupportedCommands>
+
+    <!-- The following attributes will be preserved from connection string in web.config to the dest connection string on publish -->
+    <UpdateFromConnectionStringAttributes Condition="'$(UpdateFromConnectionStringAttributes)' == ''">MultipleActiveResultSets;App;</UpdateFromConnectionStringAttributes>
+   
+    <!-- Determines if unsupported SQL commands should be treated an an error or warning -->
+    <TreadSqlScriptUnsupportedCommandsAsWarning Condition="'$(TreadSqlScriptUnsupportedCommandsAsWarning)'==''">False</TreadSqlScriptUnsupportedCommandsAsWarning>
+    <_PackageTempDir Condition ="'$(_PackageTempDir)' == '' ">$(PackageTempRootDir)\PackageTmp</_PackageTempDir>
+    <WPPAllFilesInSingleFolder Condition="'$(WPPAllFilesInSingleFolder)' == ''">$(_PackageTempDir)</WPPAllFilesInSingleFolder>
+    <IsWPPAllFilesInSingleFolder>False</IsWPPAllFilesInSingleFolder>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <EnableSqlScriptVariableParameterize Condition="'$(EnableSqlScriptVariableParameterize)'==''">True</EnableSqlScriptVariableParameterize>
+    <!-- The default BatchDelimiter is "Go", "" is the same for ManagedBatchParser.Parser -->
+    <SqlScriptPreProcessBatchDelimiter Condition="'$(SqlScriptPreProcessBatchDelimiter)'==''"></SqlScriptPreProcessBatchDelimiter>
+    <SqlScriptPreProcessResolveIncludes Condition="'$(SqlScriptPreProcessResolveIncludes)'==''">False</SqlScriptPreProcessResolveIncludes>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ProjectParametersXMLFiles Condition="Exists($(ProjectParametersXMLFile))" Include="$(ProjectParametersXMLFile)" />
+    <WebPublishProfileParametersXMLFiles Condition="'$(WebPublishProfileParametersXMLFile)' != '' And Exists($(WebPublishProfileParametersXMLFile))" Include="$(WebPublishProfileParametersXMLFile)" />
+    <ParametersXMLFiles Include="@(ProjectParametersXMLFiles)" />
+    <ProfileParametersXMLFiles  Include="@(WebPublishProfileParametersXMLFiles)" />
+  </ItemGroup>
+
+  <!--***************************************************************-->
+  <!-- Properties relating to the publish destination -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <DeployIisAppPath Condition="'$(DeployIisAppPath)'==''"></DeployIisAppPath>
+    <RemoteSitePhysicalPath Condition="'$(RemoteSitePhysicalPath)'==''"></RemoteSitePhysicalPath>
+    <DefaultDeployIisAppPhysicalPath Condition="'$(DefaultDeployIisAppPhysicalPath)'==''">$(WebPublishPipelineProjectDirectory)$(DefaultMsDeployAltSuffix)</DefaultDeployIisAppPhysicalPath>
+      <DeployIisAppPhysicalPath Condition="'$(DeployIisAppPhysicalPath)'==''"></DeployIisAppPhysicalPath>
+    <_DestinationIisAppPhysicalPath>$(DeployIisAppPhysicalPath)</_DestinationIisAppPhysicalPath>
+    <_DestinationIisAppPhysicalPath Condition="'$(_DestinationIisAppPhysicalPath)'==''">$(DefaultDeployIisAppPhysicalPath)</_DestinationIisAppPhysicalPath>
+    <!-- If it is not set the default value will be taken from $(LocalIisVersion)-->
+    <DestinationIisVersion Condition="'$(DestinationIisVersion)'==''"></DestinationIisVersion>
+    <DestinationUseIis Condition="'$(DestinationUseIis)' ==''"></DestinationUseIis>
+    <PublishEnableLinks Condition="'$(PublishEnableLinks)'==''">$(PackageEnableLinks)</PublishEnableLinks>
+    <PublishDisableLinks Condition="'$(PublishDisableLinks)'==''">$(PackageDisableLinks)</PublishDisableLinks>
+    <DeployEncryptKey Condition="'$(DeployEncryptKey)'==''"></DeployEncryptKey>
+    <SkipExtraFilesOnServer Condition="'$(SkipExtraFilesOnServer)'==''">False</SkipExtraFilesOnServer>
+    <MsDeployServiceUrl Condition="$(MsDeployServiceUrl)==''"></MsDeployServiceUrl>
+  </PropertyGroup>
+
+  <!-- Determines the order in which the related MSDeploy parametes will show up in the
+       IIS manager UI when the package is imported. The lower the numberered items are shown first.
+       Default is 0.Any integer number is allowed.
+       These values are placed in the MSDeployParameterPriority item list -->
+  <PropertyGroup>
+    <VsIisAppParametersPriority Condition="'$(VsIisAppParametersPriority)'==''">-100</VsIisAppParametersPriority>
+    <VsContentPathParametersPriority Condition="'$(VsContentPathParametersPriority)'==''">-80</VsContentPathParametersPriority>
+    <VsDestinationVDirParametersPriority Condition="'$(VsDestinationVDirParametersPriority)'==''">-70</VsDestinationVDirParametersPriority>
+    <VsSetAclPriority Condition="'$(VsSetAclPriority)'==''">-60</VsSetAclPriority>
+    <UserProfileParametersFileParametersPriority Condition="'$(UserProfileParametersFileParametersPriority)' == ''" >-55</UserProfileParametersFileParametersPriority>
+    <UserParametersFileParametersPriority Condition="'$(UserParametersFileParametersPriority)'==''">-50</UserParametersFileParametersPriority>
+    <UserWebConfigParametersPriority Condition="'$(UserWebConfigParametersPriority)'==''">-40</UserWebConfigParametersPriority>
+    <VsSQLDatabaseScriptParametersPriority Condition="'$(VsSQLDatabaseScriptParametersPriority)'==''">60</VsSQLDatabaseScriptParametersPriority>
+    <VsWebConfigAutoCsParametersPriority Condition="'$(VsWebConfigAutoCsParametersPriority)'==''">100</VsWebConfigAutoCsParametersPriority>
+  </PropertyGroup>
+
+  <!--***************************************************************-->
+  <!-- Properties relating to where the source manifest and related files will be created. -->
+  <!--***************************************************************-->
+  <ItemGroup>
+    <_MSDeployPackageFile Include="$(PackageFileName)" />
+    <_MSDeployArchiveDir Include="$(PackageArchiveRootDir)\Archive" />
+    <_MSDeployPackageLocation Condition="$(PackageAsSingleFile)" Include="$(PackageFileName)" />
+    <_MSDeployPackageLocation Condition="!$(PackageAsSingleFile)" Include="@(_MSDeployArchiveDir)" />
+  </ItemGroup>
+
+  <PropertyGroup>
+    <GenerateSampleDeployScriptLocation Condition="$(GenerateSampleDeployScript) And '$(GenerateSampleDeployScriptLocation)'==''">@(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).deploy.cmd')</GenerateSampleDeployScriptLocation>
+
+    <PackageSourceManifest Condition="'$(PackageSourceManifest)'==''">@(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).SourceManifest.xml')</PackageSourceManifest>
+    <UseDeclareParametersXMLInMsDeploy Condition="'$(UseDeclareParametersXMLInMsDeploy)'==''">$(UseMsdeployExe)</UseDeclareParametersXMLInMsDeploy>
+    <PackageParametersFile Condition="'$(PackageParametersFile)'==''">@(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).Package.Parameters.xml')</PackageParametersFile>
+    <PublishParametersFile Condition="'$(PublishParametersFile)'==''">@(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).Publish.Parameters.xml')</PublishParametersFile>
+    <GenerateSampleDeployScriptLocation Condition="$(GenerateSampleDeployScript) And '$(GenerateSampleDeployScriptLocation)'==''">@(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).deploy.cmd')</GenerateSampleDeployScriptLocation>
+    <GenerateSampleDeployScriptReadMeFileName Condition="$(GenerateSampleDeployScript) And '$(GenerateSampleDeployScriptReadMeLocation)'==''">@(_MSDeployPackageLocation->'%(FileName).deploy-readme.txt')</GenerateSampleDeployScriptReadMeFileName>
+    <GenerateSampleDeployScriptReadMeLocation Condition="$(GenerateSampleDeployScript) And '$(GenerateSampleDeployScriptReadMeLocation)'==''">@(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).deploy-readme.txt')</GenerateSampleDeployScriptReadMeLocation>
+    <GenerateSampleParametersValueLocationDefault Condition="'$(GenerateSampleParametersValueLocationDefault)'==''">@(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).SetParameters.xml')</GenerateSampleParametersValueLocationDefault>
+    <GenerateSampleParametersValueLocation Condition="$(GenerateSampleDeployScript) And '$(GenerateSampleParametersValueLocation)'==''">$(GenerateSampleParametersValueLocationDefault)</GenerateSampleParametersValueLocation>
+    <GenerateSampleParametersValueFileName Condition="$(GenerateSampleDeployScript)">@(_MSDeployPackageLocation->'%(FileName).SetParameters.xml')</GenerateSampleParametersValueFileName>
+  </PropertyGroup>
+  
+  <!-- This will ensure that all values in the ExcludeFromPackageFiles have the
+       FromTarget metadata.
+       
+       To exclude files from publish in the .pubxml you can include something like the following
+       <ExcludeFromPackageFiles Include="Default.aspx">
+         <FromTarget>Project</FromTarget>
+       </ExcludeFromPackageFiles>
+      
+       You can exclude a file in the following way.
+       <ExcludeFromPackageFolders Include="SampleExclude">
+         <FromTarget>Project</FromTarget>
+       </ExcludeFromPackageFolders>
+  -->
+  <ItemDefinitionGroup>
+    <ExcludeFromPackageFiles>
+      <FromTarget>Unknown</FromTarget>
+    </ExcludeFromPackageFiles>
+    <ExcludeFromPackageFolders>
+      <FromTarget>Unknown</FromTarget>
+    </ExcludeFromPackageFolders>
+  </ItemDefinitionGroup>
+
+  <!--********************************************************************-->
+  <!-- This will ensure that all values have the required metadata -->
+  <!--********************************************************************-->
+  <ItemDefinitionGroup>
+    <FilesForPackagingFromProject>
+      <DestinationRelativePath></DestinationRelativePath>
+      <Exclude>False</Exclude>
+      <FromTarget>Unknown</FromTarget>
+      <Category>Run</Category>
+      <ProjectFileType>Default</ProjectFileType>
+    </FilesForPackagingFromProject>
+  </ItemDefinitionGroup>
+
+
+  <ItemDefinitionGroup>
+    <FilesForFileCopy>
+      <DestinationRelativePath></DestinationRelativePath>
+      <Exclude>False</Exclude>
+      <FromTarget>Unknown</FromTarget>
+      <Category>Run</Category>
+      <ProjectFileType>Default</ProjectFileType>
+    </FilesForFileCopy>
+  </ItemDefinitionGroup>
+
+  <!-- ReplaceRule(string RuleName, 
+  string objectName, 
+  string scopeAttributeName, 
+  string scopeAttributeValue, 
+  string targetAttributeName, 
+  string match, 
+  string replace);-->
+  <ItemDefinitionGroup>
+    <MsDeployReplaceRules>
+      <ObjectName></ObjectName>
+      <ScopeAttributeName></ScopeAttributeName>
+      <ScopeAttributeValue></ScopeAttributeValue>
+      <TargetAttributeName></TargetAttributeName>
+      <Match></Match>
+      <Replace></Replace>
+    </MsDeployReplaceRules>
+  </ItemDefinitionGroup>
+
+  <!--
+  DeploymentSkipRule(string skipAction, string objectName, string absolutePath, string XPath);-->
+  <ItemDefinitionGroup>
+    <MsDeploySkipRules>
+      <SkipAction></SkipAction>
+      <ObjectName></ObjectName>
+      <AbsolutePath></AbsolutePath>
+      <XPath></XPath>
+      <KeyAttribute></KeyAttribute>
+      <!--Source, Destination, Both(the default)-->
+      <Apply></Apply>
+    </MsDeploySkipRules>
+  </ItemDefinitionGroup>
+
+  <!--
+  DeploymentParameter(string name, string type, string scope, string match, string description, string defaultValue); -->
+  <ItemDefinitionGroup>
+    <MsDeployDeclareParameters>
+      <Kind></Kind>
+      <Scope></Scope>
+      <Match></Match>
+      <Description></Description>
+      <DefaultValue></DefaultValue>
+      <Tags></Tags>
+      <ExcludeFromSetParameter></ExcludeFromSetParameter>
+    </MsDeployDeclareParameters>
+  </ItemDefinitionGroup>
+
+  <!--
+  DeploymentParameter(string name, string value);  -->
+  <ItemDefinitionGroup>
+    <MsDeploySimpleSetParameters>
+      <Value></Value>
+    </MsDeploySimpleSetParameters>
+  </ItemDefinitionGroup>
+
+  <!--
+  DeploymentParameter(string type, string scope, string match, string value);  -->
+  <ItemDefinitionGroup>
+    <MsDeploySetParameters>
+      <Kind></Kind>
+      <Scope></Scope>
+      <Match></Match>
+      <Value></Value>
+      <Description></Description>
+      <DefaultValue></DefaultValue>
+      <Tags></Tags>
+    </MsDeploySetParameters>
+  </ItemDefinitionGroup>
+  
+  <!-- 
+  DeploymentParameter(string type, string scope, string match, string value);  -->
+  <ItemDefinitionGroup>
+    <MsDeploySourceProviderSetting>
+      <Path></Path>
+      <ComputerName></ComputerName>
+      <!--<Wmsvc></Wmsvc>  Not supported yet-->
+      <UserName></UserName>
+      <Password></Password>
+      <EncryptPassword></EncryptPassword>
+      <IncludeAcls></IncludeAcls>
+      <authType></authType>
+      <prefetchPayload></prefetchPayload>
+    </MsDeploySourceProviderSetting>
+  </ItemDefinitionGroup>
+
+  <ItemDefinitionGroup>
+    <MsDeployDestinationProviderSetting>
+      <Path></Path>
+      <ComputerName></ComputerName>
+      <!--<Wmsvc></Wmsvc>  Not supported yet-->
+      <UserName></UserName>
+      <Password></Password>
+      <EncryptPassword></EncryptPassword>
+      <IncludeAcls></IncludeAcls>
+      <authType></authType>
+      <prefetchPayload></prefetchPayload>
+    </MsDeployDestinationProviderSetting>
+  </ItemDefinitionGroup>
+
+  <!-- AdditionalProviderSettings denote the additionProviderSetting need to be set in the manifest files-->
+  <ItemDefinitionGroup>
+    <MsDeploySourceManifest>
+      <Path>Unknown</Path>
+      <AdditionalProviderSettings></AdditionalProviderSettings>
+    </MsDeploySourceManifest>
+  </ItemDefinitionGroup>
+
+  <ItemDefinitionGroup>
+    <SqlCommandVariableMetaData>
+      <Value/>
+      <IsDeclared/>
+      <SourcePath/>
+      <SourcePath_RegExExcaped/>
+      <DestinationGroup/>
+    </SqlCommandVariableMetaData>
+  </ItemDefinitionGroup>
+
+  <!-- Import the .targets file which defines how files are collected. -->
+  <!--
+  In $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\Web\CollectFiles
+  Microsoft.Web.Publishing.AllFilesInProjectFolder.targets
+  Microsoft.Web.Publishing.AllFilesInTheProject.targets
+  Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets
+  MyCustomized.targets
+  -->
+  <!-- This property determines what .targets file will be imported for file collection -->
+  <PropertyGroup Condition="'$(FilesToIncludeTargetFile)'==''">
+    <FilesToIncludeTargetFile Condition="Exists('$(MSBuildThisFileDirectory)\CollectFiles\$(FilesToIncludeForPublish).targets')">$(MSBuildThisFileDirectory)\CollectFiles\$(FilesToIncludeForPublish).targets</FilesToIncludeTargetFile>
+    <FilesToIncludeTargetFile Condition="'$(FilesToIncludeTargetFile)'==''">$(MSBuildThisFileDirectory)\CollectFiles\Microsoft.Web.Publishing.$(FilesToIncludeForPublish).targets</FilesToIncludeTargetFile>
+  </PropertyGroup>
+  <Import Condition="'$(FilesToIncludeTargetFile)' != '' And Exists($(FilesToIncludeTargetFile))"
+    Project="$(FilesToIncludeTargetFile)" />
+
+  <!-- Import the .targets file which defines the publish steps. This is based off $(WebPublishMethod) -->
+  <!--
+  In $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\Web\Deploy
+  Microsoft.Web.Publishing.FTP.targets
+  Microsoft.Web.Publishing.FPSE.targets
+  MyCustomized.targets
+  -->
+  <!-- This is the target file for the way to customize for collection files -->
+  <PropertyGroup Condition="'$(DeployTargetFile)'=='' and '$(WebPublishMethod)' != ''">
+    <DeployTargetFile Condition="Exists('$(MSBuildThisFileDirectory)\Deploy\$(WebPublishMethod).targets')">$(MSBuildThisFileDirectory)\Deploy\$(WebPublishMethod).targets</DeployTargetFile>
+    <DeployTargetFile Condition="'$(DeployTargetFile)'==''">$(MSBuildThisFileDirectory)\Deploy\Microsoft.Web.Publishing.Deploy.$(WebPublishMethod).targets</DeployTargetFile>
+  </PropertyGroup>
+  <Import Condition="'$(DeployTargetFile)'!='' And Exists($(DeployTargetFile))"
+           Project="$(DeployTargetFile)"/>
+
+  <!-- Import AspNetCompile and Merge into the target -->
+  <!-- Loop in AspnetCompilerMergeTarget if need to-->
+  <PropertyGroup Condition="'$(AspNetCompileMerge)' == ''">
+    <AspNetCompileMerge>False</AspNetCompileMerge>
+    <AspnetCompileMerge Condition="'$(PrecompileBeforePublish)' == 'true'">True</AspnetCompileMerge>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(Web_Publishing_AspNetCompileMerge_targets)' == ''">
+    <Web_Publishing_AspNetCompileMerge_targets>Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets</Web_Publishing_AspNetCompileMerge_targets>
+  </PropertyGroup>
+
+  <Import Condition="'$(Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported)' != 'True' And '$(AspNetCompileMerge)' == 'true'"
+          Project="$(Web_Publishing_AspNetCompileMerge_targets)"/>
+
+
+
+  <!--***************************************************************-->
+  <!-- Import Common MSDeploy target/tasks to support /t:Package -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <Microsoft_Web_Publishing_MSDeploy_Common_targets Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets)' == ''">Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets</Microsoft_Web_Publishing_MSDeploy_Common_targets>
+  </PropertyGroup>
+  <Import Project="$(Microsoft_Web_Publishing_MSDeploy_Common_targets)" Condition="'$(Microsoft_Web_Publishing_MSDeploy_Common_targets_Imported)' != 'true' And Exists($(Microsoft_Web_Publishing_MSDeploy_Common_targets))"/>
+
+
+  <!--********************************************************************-->
+  <!-- ExcludeApp_Data -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ExcludeApp_DataDependsOn Condition="'$(ExcludeApp_DataDependsOn)'==''">
+    </ExcludeApp_DataDependsOn>
+  </PropertyGroup>
+
+  <Target Name="ExcludeApp_Data"
+          DependsOnTargets="$(ExcludeApp_DataDependsOn)"
+          Condition="$(ExcludeApp_Data)">
+
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_ExcludeAllFilesUnderFolder"
+      ArgumentCount="1"
+      Arguments="App_Data"
+      LogType="Message" />
+
+    <!-- This excludes the files in the App_Data folder -->
+    <ItemGroup>
+      <ExcludeFromPackageFolders Include="App_Data">
+        <FromTarget>ExcludeApp_Data</FromTarget>
+      </ExcludeFromPackageFolders>
+    </ItemGroup>
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- ExcludeGeneratedDebugSymbol -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ExcludeGeneratedDebugSymbolDependsOn Condition="'$(ExcludeGeneratedDebugSymbolDependsOn)'==''">
+    </ExcludeGeneratedDebugSymbolDependsOn>
+  </PropertyGroup>
+  <Target Name="ExcludeGeneratedDebugSymbol"
+          DependsOnTargets="$(ExcludeGeneratedDebugSymbolDependsOn)"
+          Condition="$(ExcludeGeneratedDebugSymbol)">
+
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_ExcludeAllDebugSymbols"
+      LogType="Message" />
+
+    <ItemGroup>
+      <ExcludeFromPackageFiles Include="@(FilesForPackagingFromProject)" Condition="'%(FilesForPackagingFromProject.Extension)'=='.pdb'">
+        <FromTarget>ExcludeGeneratedDebugSymbol</FromTarget>
+      </ExcludeFromPackageFiles>
+    </ItemGroup>
+  </Target>
+
+  <PropertyGroup>
+    <ExcludeXmlAssemblyFilesDependsOn>
+      @(ExcludeXmlAssemblyFilesDependsOn);
+    </ExcludeXmlAssemblyFilesDependsOn>
+  </PropertyGroup>
+  <Target Name="ExcludeXmlAssemblyFiles" Condition=" '$(ExcludeXmlAssemblyFiles)'=='true' " DependsOnTargets="@(ExcludeXmlAssemblyFilesDependsOn)">    
+    <ItemGroup>
+      <ExcludeFromPackageFiles Include="%(_ReferenceRelatedPaths.FullPath)" Condition="'%(_ReferenceRelatedPaths.Extension)'=='.xml'">
+        <FromTarget>ExcludeXmlAssemblyFiles</FromTarget>
+      </ExcludeFromPackageFiles>
+    </ItemGroup>
+  </Target>
+
+  <!--********************************************************************
+  ExcludeFilesByExtension
+    If $(FilesToIncludeForPublish) is set to OnlyFilesToRunTheApp then you can exclude files by their extension.
+    
+    You can exlude all files with a given extension, by adding that extension to
+    the WebPublishExtnsionsToExcludeItem ItemGroup before this target executes.
+  
+    You can disable this functionality by setting $(EnableExcludeFilesByExtension) to false.
+  
+    By default the extensions listed in $(WebPublishExtensionsToExclude) will be excluded. 
+    You can override this property if you need to publish files with one of those extensions.
+  ********************************************************************-->
+  <PropertyGroup>
+    <EnableExcludeFilesByExtension Condition=" '$(EnableExcludeFilesByExtension)'=='' and '$(FilesToIncludeForPublish)'=='OnlyFilesToRunTheApp' ">true</EnableExcludeFilesByExtension>
+    <ExcludeFilesByExtensionDependsOn>$(ExcludeFilesByExtensionDependsOn);</ExcludeFilesByExtensionDependsOn>
+    <WebPublishExtensionsToExclude Condition=" '$(WebPublishExtensionsToExclude)'=='' ">.tt;.settings</WebPublishExtensionsToExclude>
+  </PropertyGroup>
+  <ItemGroup>
+    <WebPublishExtnsionsToExcludeItem Include="$(WebPublishExtensionsToExclude)"/>
+  </ItemGroup>
+  <Target Name="ExcludeFilesByExtension" DependsOnTargets="$(ExcludeFilesByExtensionDependsOn)"
+          Outputs="%(WebPublishExtnsionsToExcludeItem.Identity)" Condition=" '$(EnableExcludeFilesByExtension)'=='true' ">
+    <!-- this target will execute once per value in @(WebPublishExtnsionsToExcludeItem) -->
+    <Message Text="ExcludeFilesByExtension" Importance="high"/>
+    <PropertyGroup>
+      <_ExtToExclude>%(WebPublishExtnsionsToExcludeItem.Identity)</_ExtToExclude>
+    </PropertyGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\ExcludeFilesByExtension.txt"
+                      Lines="Excluding files with extension '$(_ExtToExclude)' from the publish/package operation"
+                      Overwrite="True" />
+    
+    <ItemGroup>
+      <ExcludeFromPackageFiles Include="@(FilesForPackagingFromProject)"
+                               Condition="'%(FilesForPackagingFromProject.Extension)'=='$(_ExtToExclude)'">
+        <FromTarget>ExcludeFilesByExtension</FromTarget>
+      </ExcludeFromPackageFiles>
+    </ItemGroup>
+  </Target>
+  
+  <!--**********************************************************************-->
+  <!-- ExcludeFilesFromPackage-->
+  <!--**********************************************************************-->
+  <PropertyGroup>
+    <ExcludeFilesFromPackageDependsOn>
+      $(ExcludeFilesFromPackageDependsOn);
+      ExcludeApp_Data;
+      ExcludeGeneratedDebugSymbol;
+      ExcludeXmlAssemblyFiles;
+      ExcludeFilesByExtension;
+    </ExcludeFilesFromPackageDependsOn>
+  </PropertyGroup>
+  <Target Name="ExcludeFilesFromPackage" DependsOnTargets="$(ExcludeFilesFromPackageDependsOn)"
+          Condition="$(ExcludeFilesFromPackage)">
+
+    <!--Add the exclude Folder into the list (Note that ItemGroup doesn't work in this scenario.
+        Note that this is specify in the DestinationRelativePath in the item.Spec-->
+    <CreateItem Include="@(ExcludeFromPackageFolders->'$(AlternativeProjectDirectory)%(Identity)\**')"
+                AdditionalMetadata="FromTarget=%(FromTarget)">
+      <Output TaskParameter="Include" ItemName="ExcludeFromPackageFiles"/>
+    </CreateItem>
+
+    <MakeDir Condition="$(EnablePackageProcessLoggingAndAssert) And !Exists($(PackageLogDir))"
+             Directories="$(PackageLogDir)" />
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\ExcludeFromPackageFiles.txt"
+                      Lines="@(ExcludeFromPackageFiles->'
+                      Files:%(Identity) 
+                      FromTarget:%(FromTarget)
+                      DestinationRelativePath:%(DestinationRelativePath)')"
+                      Overwrite="True" />
+
+    <!-- This will exclude files if the DestinationRelativePath is found in @(ExcludeFromPackageFiles) -->
+    <FilterByItems PipelineItems="@(FilesForPackagingFromProject)"
+                   SourceMetadataName="DestinationRelativePath"
+                   FilterRootFolder="$(AlternativeProjectDirectory)"
+                   FilterBaseOnRelativePath="True"
+                   Filter="@(ExcludeFromPackageFiles)">
+      <Output TaskParameter="InFilter" ItemName="_NeedtoMarkasExclude_FilesForPackagingFromProject"/>
+    </FilterByItems>
+
+
+    <!--This exclude if the filter item's DestinationRelativePath is specified.  
+        This is useful for case like Reference Dll and pdb where the source is not under the current project.-->
+    <FilterByItems PipelineItems="@(FilesForPackagingFromProject)"
+                       SourceMetadataName="DestinationRelativePath"
+                       FilterRootFolder="$(AlternativeProjectDirectory)"
+                       FilterBaseOnRelativePath="True"
+                       FilterMetadataName="DestinationRelativePath"
+                       Filter="@(ExcludeFromPackageFiles)">
+      <Output TaskParameter="InFilter" ItemName="_NeedtoMarkasExclude_FilesForPackagingFromProject"/>
+    </FilterByItems>
+
+    <FilterByItems PipelineItems="@(FilesForPackagingFromProject)"
+                       SourceMetadataName="FullPath"
+                       FilterBaseOnRelativePath="False"
+                       FilterMetadataName="FullPath"
+                       Filter="@(ExcludeFromPackageFiles)">
+      <Output TaskParameter="InFilter" ItemName="_NeedtoMarkasExclude_FilesForPackagingFromProject"/>
+    </FilterByItems>
+
+    <ItemGroup>
+      <FilesForPackagingFromProject Remove="@(_NeedtoMarkasExclude_FilesForPackagingFromProject)" />
+      <FilesForPackagingFromProject Include="@(_NeedtoMarkasExclude_FilesForPackagingFromProject)">
+        <Exclude>True</Exclude>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\AfterExcludeFilesFilesList.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)')" Overwrite="True" />
+
+    <CallTarget Targets="$(OnAfterExcludeFilesFromPackage)" RunEachTargetSeparately="False" />
+  </Target>
+
+  <!--Target ImportParametersFiles-->
+  <Target Name="ImportParametersFiles" DependsOnTargets="$(ImportParametersFilesDependsOn)"
+          Condition="$(ImportParametersFiles)">
+
+    <ExportParametersFile
+      Condition=" $(EnablePackageProcessLoggingAndAssert)"
+      Parameters="@(MsDeployDeclareParameters)"
+      DeclareParameterFile="$(PackageLogDir)\BeforeImportParametersFiles.parameters.xml"
+      GenerateFileEvenIfEmpty="True"
+      />
+    <ImportParametersFile  Files="@(ParametersXMLFiles)" 
+                           DisableEscapeMSBuildVariable="$(ImportParametersFile_DisableEscapeMSBuildVariable)">
+      <Output TaskParameter="Result" ItemName="_ImportedMSDeployDeclareParameters"/>
+    </ImportParametersFile>
+
+    <ItemGroup>
+      <!-- Use %(Identity) to force msbuild not to batch based on %(DefaultValue) -->
+      <MsDeployDeclareParameters Include="@(_ImportedMSDeployDeclareParameters)"
+                                 Condition="'$(ImportProjectParametersFiles)' == 'true' And '%(_ImportedMSDeployDeclareParameters.Identity)' !=''">
+        <Value>%(_ImportedMSDeployDeclareParameters.DefaultValue)</Value>
+        <Priority>$(UserParametersFileParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+    <ImportParametersFile  Files="@(ProfileParametersXMLFiles)" DisableEscapeMSBuildVariable="$(ImportParametersFile_DisableEscapeMSBuildVariable)">
+      <Output TaskParameter="Result" ItemName="_ImportedProfileMSDeployDeclareParameters"/>
+    </ImportParametersFile>
+
+    <ItemGroup>
+      <!-- Use %(Identity) to force msbuild not to batch based on %(DefaultValue)-->
+      <MsDeployDeclareParameters Include="@(_ImportedProfileMSDeployDeclareParameters)"
+                                 Condition="'$(ImportProfileParametersFiles)' == 'true' And '%(_ImportedProfileMSDeployDeclareParameters.Identity)' !=''">
+        <Value>%(_ImportedProfileMSDeployDeclareParameters.DefaultValue)</Value>
+        <Priority>$(UserProfileParametersFileParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+    <ExportParametersFile
+      Condition=" $(EnablePackageProcessLoggingAndAssert)"
+      Parameters="@(MsDeployDeclareParameters)"
+      DeclareParameterFile="$(PackageLogDir)\AfterImportParametersFiles.parameters.xml"
+      GenerateFileEvenIfEmpty="True"
+      />
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Target ImportPublishingParameterValues-->
+  <!--**********************************************************************-->
+  <Target Name="ImportPublishingParameterValues" DependsOnTargets="$(ImportPublishingParameterValuesDependsOn)"
+          Condition="$(ImportPublishingParameterValues)">
+
+    <ItemGroup Condition="'$(AutoParameterizationWebConfigCSNoDefaultValue)' == 'false'">
+      <MsDeployDeclareParameters Include="@(MSDeployParameterValue)"  Condition="'%(MSDeployParameterValue.Identity)' !='' And '%(MSDeployParameterValue.UpdateDestWebConfig)' !='False'">
+        <Value>%(MSDeployParameterValue.ParameterValue)</Value>
+        <DefaultValue>%(MSDeployParameterValue.ParameterValue)</DefaultValue>
+        <Description>%(MSDeployParameterValue.Description)</Description>
+        <Priority>%(MSDeployParameterValue.ParameterPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+    <ItemGroup Condition="'$(AutoParameterizationWebConfigCSNoDefaultValue)' != 'false'">
+      <MsDeployDeclareParameters Include="@(MSDeployParameterValue)"  Condition="'%(MSDeployParameterValue.Identity)' !='' And '%(MSDeployParameterValue.UpdateDestWebConfig)' !='False'">
+        <Value>%(MSDeployParameterValue.ParameterValue)</Value>
+        <Description>%(MSDeployParameterValue.Description)</Description>
+        <Priority>%(MSDeployParameterValue.ParameterPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+  </Target>
+  
+  <!--Target ValidateGlobalSettings -->
+  <PropertyGroup>
+    <ValidateGlobalSettingsDependsOn>
+      $(ValidateGlobalSettingsDependsOn);
+      GetProjectWebProperties;
+    </ValidateGlobalSettingsDependsOn>
+  </PropertyGroup>
+  <Target Name="ValidateGlobalSettings"
+          DependsOnTargets="$(ValidateGlobalSettingsDependsOn)" Condition="'$(ValidateGlobalSettings)' != 'False'">
+
+    <GetPublishingLocalizedString
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="WPPAllFilesInSingleFolder;$(WPPAllFilesInSingleFolder)"
+          Condition="'$(WPPAllFilesInSingleFolder)' == ''  Or 
+          $([System.String]::IsNullOrWhiteSpace($(WPPAllFilesInSingleFolder)))"
+          LogType="Error" />
+
+    <Error Text="Target ValidateGlobalSettings Failed"
+       Condition="'$(WPPAllFilesInSingleFolder)' == ''  Or 
+          $([System.String]::IsNullOrWhiteSpace($(WPPAllFilesInSingleFolder)))"
+       />
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target ValidateGlobalPackageSetting -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ValidateGlobalPackageSettingDependsOn>
+      $(ValidateGlobalPackageSettingDependsOn);
+      GetProjectWebProperties;
+      ValidateGlobalSettings;
+    </ValidateGlobalPackageSettingDependsOn>
+  </PropertyGroup>
+
+  <Target Name="ValidateGlobalPackageSetting"
+          DependsOnTargets="$(ValidateGlobalPackageSettingDependsOn)" Condition="$(_CreatePackage)">
+
+    <GetPublishingLocalizedString
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="PackageAsSingleFile;$(PackageAsSingleFile)"
+          LogType="Message" />
+    
+    <GetPublishingLocalizedString
+      Condition="$(PackageAsSingleFile)"
+          ID="PublishLocalizedString_CheckingForValidMsBuildPropertyValue"
+          ArgumentCount="2"
+          Arguments="PackageFileName;$(PackageFileName)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="!$(PackageAsSingleFile)"
+          ID="PublishLocalizedString_CheckingForValidMsBuildPropertyValue"
+          ArgumentCount="2"
+          Arguments="PackageArchiveRootDir;$(PackageArchiveRootDir)"
+          LogType="Message" />
+    
+    <PropertyGroup>
+      <_CheckPackageLocation Condition="$(PackageAsSingleFile)">$(PackageFileName)</_CheckPackageLocation>
+      <_CheckPackageLocation Condition="!$(PackageAsSingleFile)">$(PackageArchiveRootDir)</_CheckPackageLocation>
+      <_CheckPackageLocationArchiveDir Condition="!$(PackageAsSingleFile)">$(PackageArchiveRootDir)\Archive</_CheckPackageLocationArchiveDir>
+    </PropertyGroup>
+
+    <CheckPathAttributes Path="$(_CheckPackageLocation)" Condition="'$(_CheckPackageLocation)' != ''">
+      <Output TaskParameter="IsExists" PropertyName="_CheckPackageLocationExists" />
+      <Output TaskParameter="IsFolder" PropertyName="_CheckPackageLocationIsFolder" />
+    </CheckPathAttributes>
+
+    <CheckPathAttributes Condition="'$(_CheckPackageLocationArchiveDir)' != ''" Path="$(_CheckPackageLocationArchiveDir)">
+      <Output TaskParameter="IsExists" PropertyName="_CheckPackageLocationArchiveDirExists" />
+      <Output TaskParameter="IsFolder" PropertyName="_CheckPackageLocationArchiveDirIsFolder" />
+    </CheckPathAttributes>
+
+    <!-- Check on valid location-->
+    <GetPublishingLocalizedString
+       Condition="$(PackageAsSingleFile) And $(_CheckPackageLocationExists) And $(_CheckPackageLocationIsFolder)"
+       ID="PublishLocalizedString_ErrorPackageAsFilePointToAnExistingFolder"
+       ArgumentCount="1"
+       Arguments="$(PackageFileName)"
+       LogType="Error" />
+    <!-- "You can't package as a single file to be the same name as an existing folder. Please delete the folder before packaging. Alternative,you can call msbuild with /t:CleanWebsitesPackage target to remove it." />-->
+
+    <GetPublishingLocalizedString
+       Condition="!$(PackageAsSingleFile) And $(_CheckPackageLocationExists) And !$(_CheckPackageLocationIsFolder)"
+       ID="PublishLocalizedString_ErrorPackageAsFolderPointToAnExistingFile"
+       ArgumentCount="1"
+       Arguments="$(PackageArchiveRootDir)"
+       LogType="Error" />
+    <!-- "'$(PackageArchiveRootDir)' exist as a file. You can't package as an archive directory to be the same as an existing file. Please delete the file before packaging. Alternative,you can call msbuild with /t:CleanWebsitesPackage target to remove it." />-->
+    
+    <GetPublishingLocalizedString
+       Condition="!$(PackageAsSingleFile) And $(_CheckPackageLocationArchiveDirExists) And !$(_CheckPackageLocationArchiveDirIsFolder)"
+       ID="PublishLocalizedString_ErrorPackageAsFolderPointToAnExistingFile"
+       ArgumentCount="1"
+       Arguments="$(PackageArchiveRootDir)\Archive"
+       LogType="Error" />
+    <!-- "'$(PackageArchiveRootDir)\Archive' exist as a file. You can't package as an archive directory to be the same as an existing file. Please delete the file before packaging.   Alternative,you can call msbuild with /t:CleanWebsitesPackage target to clean it." />-->
+
+    <!--Check on the IIS version compatibility-->
+    <GetPublishingLocalizedString
+       Condition="$(DestinationUseIis) And ($(DestinationIisVersion) &lt; '7') And $(_DeploymentUseIis) And ($(LocalIisVersion) &gt;= '7')"
+       ID="PublishLocalizedString_ErrorCannotDeployFromIIS7AboveToLowerIIS"
+       ArgumentCount="3"
+       Arguments="$(IncludeIisSettings);$(DestinationIisVersion);$(LocalIisVersion)"
+       LogType="Error" />
+    <!-- "Deploy with IIS Setting from a IIS 7 or above to a lower verstion of IIS server is not supported. To fix the problem, please set the %24(IncludeIisSettings) to false. Your current setting are %24(IncludeIisSettings) is $(IncludeIisSettings), %24(DestinationIisVersion) is $(DestinationIisVersion) and %24(LocalIisVersion) is  $(LocalIisVersion)." />-->
+
+    <Error Text="Target ValidateGlobalPackageSetting Failed"
+       Condition="(!$(PackageAsSingleFile) And $(_CheckPackageLocationExists) And !$(_CheckPackageLocationIsFolder)) 
+       Or ($(PackageAsSingleFile) And $(_CheckPackageLocationExists) And $(_CheckPackageLocationIsFolder))
+       Or (!$(PackageAsSingleFile) And $(_CheckPackageLocationArchiveDirExists) And !$(_CheckPackageLocationArchiveDirIsFolder))
+       Or ($(DestinationUseIis) And ($(DestinationIisVersion) &lt; '7') And $(_DeploymentUseIis) And ($(LocalIisVersion) &gt;= '7'))"
+       />    
+  </Target>
+
+  <Target Name="ProcessItemToExcludeFromDeployment">
+    <ItemGroup>
+      <ExcludeFromPackageFiles Condition="'$(ExcludeFilesFromDeployment)'!=''" Include="$(ExcludeFilesFromDeployment)" />
+      <ExcludeFromPackageFolders Condition="'$(ExcludeFoldersFromDeployment)'!=''" Include="$(ExcludeFoldersFromDeployment)" />
+    </ItemGroup>
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Target WPPCopyWebApplicaitonPipelineCircularDependencyError -->
+  <!--********************************************************************-->
+  <Target Name="WPPCopyWebApplicaitonPipelineCircularDependencyError" Condition="$(WPPCopyWebApplicaitonPipelineCircularDependencyError)">
+    <GetPublishingLocalizedString
+       Condition="$(WPPCopyWebApplicaitonPipelineCircularDependencyError)"
+       ID="PublishLocalizedString_ErrorUseWPP_CopyWebApplicationAndPipelineDependsOnBuildBothTrue"
+       LogType="Error" />
+
+    <Error Text="Target WPPCopyWebApplicaitonPipelineCircularDependencyError failed"
+           Condition ="$(WPPCopyWebApplicaitonPipelineCircularDependencyError)" />
+    <!--
+    "These two Properties are not compatable  %24(UseWPP_CopyWebApplication) and  %24(PipelineDependsOnBuild) both are True.  
+            Please correct the problem by either set %24(Disable_CopyWebApplication) to true or set %24(PipelineDependsOnBuild) to false to break the circular build dependency.
+            Detail: %24(UseWPP_CopyWebApplication) make the publsih pipeline (WPP) to be Part of the build and %24(PipelineDependsOnBuild) make the WPP depend on build thus cause the build circular build dependency.  " />
+            -->
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target _CleanWPPIfNeedTo -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <_CleanWPPIfNeedToDependsOn>
+      $(_CleanWPPIfNeedToDependsOn);
+      ValidateGlobalSettings;
+    </_CleanWPPIfNeedToDependsOn>
+  </PropertyGroup>
+  <Target Name="_CleanWPPIfNeedTo" Condition="'$(_CleanWPPIfNeedTo)' != 'False'" DependsOnTargets="$(_CleanWPPIfNeedToDependsOn)">
+    <PropertyGroup>
+      <_IsSameWPPBuildInfoAsLastBuildInfo>True</_IsSameWPPBuildInfoAsLastBuildInfo>
+      <_IsSameWPPBuildInfoAsLastBuildInfo Condition="!Exists($(_WPPLastBuildInfoLocation))">False</_IsSameWPPBuildInfoAsLastBuildInfo>
+    </PropertyGroup>
+   
+    <!-- This is the tracking property -->
+    <PropertyGroup>
+      <_WPPCurrentBuildInfo>$(_WPPCurrentBuildInfo);PlatformName=$(PlatformName);Configuration=$(Configuration);WPPAllFilesInSingleFolder=$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)));WebPublishProfileFile=$(WebPublishProfileFile)</_WPPCurrentBuildInfo>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_WPPCurrentBuildInfoItems Include="$(_WPPCurrentBuildInfo)" />
+    </ItemGroup>
+
+    <ReadLinesFromFile  Condition="$(_IsSameWPPBuildInfoAsLastBuildInfo)"
+                        File="$(_WPPLastBuildInfoLocation)">
+      <Output TaskParameter="Lines" ItemName="_WPPLastBuildInfo"/>
+    </ReadLinesFromFile>
+
+    <PropertyGroup Condition="$(_IsSameWPPBuildInfoAsLastBuildInfo)">
+      <_IsSameWPPBuildInfoAsLastBuildInfo Condition="'@(_WPPLastBuildInfo)' != '@(_WPPCurrentBuildInfoItems)'" >False</_IsSameWPPBuildInfoAsLastBuildInfo>
+    </PropertyGroup>
+
+    <Message  Text="_WPPLastBuildInfoLocation is $(_WPPLastBuildInfoLocation)
+              _WPPCurrentBuildInfo is @(_WPPCurrentBuildInfoItems)
+              _WPPLastBuildInfo is @(_WPPLastBuildInfo)
+              _IsSameWPPBuildInfoAsLastBuildInfo is $(_IsSameWPPBuildInfoAsLastBuildInfo)" 
+              Importance="Low"/>
+
+    <CallTarget Condition="!$(_IsSameWPPBuildInfoAsLastBuildInfo)"
+              Targets="$(_WPPCleanTargets)"
+              RunEachTargetSeparately="false" />
+    <PropertyGroup>
+      <_WPPLastBuildInfoLocationDirectory>$([System.IO.Path]::GetDirectoryName($(_WPPLastBuildInfoLocation)))</_WPPLastBuildInfoLocationDirectory>
+    </PropertyGroup>
+
+    <MakeDir Directories="$(_WPPLastBuildInfoLocationDirectory)" Condition="!Exists($(_WPPLastBuildInfoLocationDirectory))"/>
+
+    <WriteLinesToFile  File="$(_WPPLastBuildInfoLocation)"
+                        Lines="@(_WPPCurrentBuildInfoItems)"
+                        Overwrite="true"
+                        Encoding="Unicode"/>
+    
+  </Target>
+  <!--********************************************************************-->
+  <!-- Target PipelineCollectFilesPhase -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <OnBeforePipelineCollectFilesPhase>
+      $(OnBeforePipelineCollectFilesPhase);
+      _CleanWPPIfNeedTo;
+    </OnBeforePipelineCollectFilesPhase>
+    <OnAfterPipelineCollectFilesPhase>
+      $(OnAfterPipelineCollectFilesPhase);
+      ExcludeFilesFromPackage;
+      ImportParametersFiles;
+    </OnAfterPipelineCollectFilesPhase>
+    <PipelineCollectFilesPhaseDependsOn>
+      $(OnBeforePipelineCollectFilesPhase);
+      $(PipelineCollectFilesPhaseDependsOn);
+      WPPCopyWebApplicaitonPipelineCircularDependencyError;
+      ProcessItemToExcludeFromDeployment;
+      GetProjectWebProperties;
+      ValidateGlobalSettings;
+      ValidateGlobalPackageSetting;
+      $(PipelineDependsOn);
+      $(PublishPipelineCollectFilesCore);
+    </PipelineCollectFilesPhaseDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PipelineCollectFilesPhase"
+          Outputs="@(FilesForPackagingFromProject)"
+          DependsOnTargets="$(PipelineCollectFilesPhaseDependsOn)">
+
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_WebPublishPipelineCollectFilesPhase"
+      LogType="Message" />
+
+    <MakeDir Condition="$(EnablePackageProcessLoggingAndAssert) And !Exists('$(PackageLogDir)')"
+             Directories="$(PackageLogDir)" />
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\PreExcludePipelineCollectFilesPhaseFileList.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)')" Overwrite="True" />
+
+    <CheckItemsForDuplication
+      Condition="$(EnablePackageProcessLoggingAndAssert)"
+      Items="@(FilesForPackagingFromProject)"
+      TraceLevel="Error"
+      MetadataToVerify="DestinationRelativePath">
+      <Output TaskParameter="HasDuplicate"  PropertyName="_FilesForPackagingDestinationRelativePathHasDuplicate"/>
+    </CheckItemsForDuplication>
+
+    <CheckItemsForDuplication
+      Condition="$(EnablePackageProcessLoggingAndAssert)"
+      Items="@(FilesForPackagingFromProject)"
+      TraceLevel="Warning">
+      <Output TaskParameter="HasDuplicate"  PropertyName="_FilesForPackagingIdentityHasDuplicate"/>
+    </CheckItemsForDuplication>
+
+    <CallTarget Targets="$(OnAfterPipelineCollectFilesPhase)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target TransformWebConfig -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <TransformWebConfigBeforeTargets>
+      $(TransformWebConfigBeforeTargets);
+      MarkWebConfigAssistFilesAsExclude;
+    </TransformWebConfigBeforeTargets>
+    <TransformWebConfigDependsOn>
+      $(OnBeforeTransformWebConfig);
+      $(TransformWebConfigDependsOn);
+      PreTransformWebConfig;
+      TransformWebConfigCore;
+      ParameterizeTransformWebConfigCore;
+      PostTransformWebConfig;
+    </TransformWebConfigDependsOn>
+  </PropertyGroup>
+
+  <Target Name="TransformWebConfig"
+          DependsOnTargets="$(TransformWebConfigDependsOn)"
+          BeforeTargets="$(TransformWebConfigBeforeTargets)">
+
+
+    <CallTarget Targets="$(OnAfterTransformWebConfig)" RunEachTargetSeparately="False" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target CollectWebConfigsToTransform -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectWebConfigsToTransformDependsOn>
+      $(OnBeforeCollectWebConfigsToTransform);
+      $(CollectWebConfigsToTransformDependsOn);
+      PipelineCollectFilesPhase;
+    </CollectWebConfigsToTransformDependsOn>
+  </PropertyGroup>
+
+  <Target Name="CollectWebConfigsToTransform" DependsOnTargets="$(CollectWebConfigsToTransformDependsOn)" Condition="'$(CollectWebConfigsToTransform)' != 'false'">
+    <!-- Gather Sources, Transforms, and Destinations for the TransformXml task -->
+    <ItemGroup Condition="'$(ProjectConfigTransformFileName)'!=''">
+      <WebConfigsToTransform Include="@(FilesForPackagingFromProject)"
+                             Condition="'%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)'">
+        <TransformFile>$([System.String]::new($(WebPublishPipelineProjectDirectory)\$([System.IO.Path]::GetDirectoryName($([System.String]::new(%(DestinationRelativePath)))))).TrimEnd('\'))\$(ProjectConfigTransformFileName)</TransformFile>
+        <TransformOriginalFolder>$(TransformWebConfigIntermediateLocation)\original</TransformOriginalFolder>
+        <TransformFileFolder>$(TransformWebConfigIntermediateLocation)\assist</TransformFileFolder>
+        <TransformOutputFile>$(TransformWebConfigIntermediateLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
+        <TransformScope>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))</TransformScope>
+      </WebConfigsToTransform>
+      <_WebConfigsToTransformOuputs Include="@(WebConfigsToTransform->'%(TransformOutputFile)')" />
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectWebConfigsToTransform)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target PreTransformWebConfig -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PreTransformWebConfigDependsOn>
+      CollectWebConfigsToTransform;
+    </PreTransformWebConfigDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PreTransformWebConfig"
+          DependsOnTargets="$(PreTransformWebConfigDependsOn)">
+
+    <ItemGroup>
+      <!-- Gather all the web.config files which do not have a transform file -->
+      <_TempNoTransformWebConfigToTransform Include="@(WebConfigsToTransform)"
+                                            Condition="!Exists(%(TransformFile))" />
+      <!-- Remove all these files -->
+      <WebConfigsToTransform Remove="@(_TempNoTransformWebConfigToTransform)"/>
+    </ItemGroup>
+    
+    <PropertyGroup>
+      <_WebConfigsToTransformOuputsDirectories>@(_WebConfigsToTransformOuputs->'%(RootDir)%(Directory)')</_WebConfigsToTransformOuputsDirectories>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_WebConfigsToTransformOuputsDirectories Include="$(_WebConfigsToTransformOuputsDirectories)" />
+    </ItemGroup>
+
+    <PropertyGroup>
+      <_MessageArguments>@(WebConfigsToTransform->'%(DestinationRelativePath)', ', ')</_MessageArguments>
+    </PropertyGroup>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_FoundApplicationConfigForTransformation"
+      ArgumentCount="1"
+      Arguments="$(_MessageArguments)"
+      LogType="Message"
+      Condition="'$(_MessageArguments)'!=''"/>
+
+    <!-- Make sure required directories exist -->
+    <MakeDir Directories="@(_WebConfigsToTransformOuputsDirectories)" Condition="!Exists(%(Identity))"/>
+
+    <PropertyGroup>
+      <_WebConfigTransformOutput>@(WebConfigsToTransform->'%(TransformOutputFile)')</_WebConfigTransformOutput>
+      <_WebConfigTransformOutput Condition="$(UseParameterizeToTransformWebConfig)">$(_WebConfigTransformOutput);$(_WebConfigTransformOutputParametersFile)</_WebConfigTransformOutput>
+    </PropertyGroup>
+
+    <!-- Remove the output file if there is change on $(UseParameterizeToTransformWebConfig)-->
+    <Delete Files="@(WebConfigsToTransform->'%(TransformOutputFile)');$(_WebConfigTransformOutputParametersFile)"
+            Condition="(!$(UseParameterizeToTransformWebConfig) And Exists($(_WebConfigTransformOutputParametersFile))) 
+                       Or ($(UseParameterizeToTransformWebConfig) And !Exists($(_WebConfigTransformOutputParametersFile)))"
+            ContinueOnError="true"/>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) And ('@(WebConfigsToTransform)'!='') And !%(Exclude)"
+                      Encoding="utf-8"
+                      Overwrite="True"
+                      File="$(PackageLogDir)\PreTransformWebConfig.Log"
+                      Lines="@(WebConfigsToTransform->' 
+           Transforming  input: %(Identity) 
+                      with:  %(TransformFile)
+                      output: %(TransformOutputFile)
+                      ')" />
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      Overwrite="False"
+                      File="$(PackageLogDir)\PreTransformWebConfig.Log"
+                      Lines="_WebConfigTransformOutput: $(_WebConfigTransformOutput)" />
+
+    <!-- Copy the original web.config -->
+    <CopyPipelineFiles PipelineItems="@(WebConfigsToTransform)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="%(TransformOriginalFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                       Condition="'@(WebConfigsToTransform)' != ''">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedWebConfigsToTransform"/>
+    </CopyPipelineFiles>
+
+    <!-- Delete the updated web.config files -->
+    <Delete Files="@(_UpdatedWebConfigsToTransform->'%(TransformOutputFile)')" />
+
+    <!--Copy the transform file-->
+    <CopyPipelineFiles PipelineItems="@(WebConfigsToTransform->'%(TransformFile)')"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="%(TransformFileFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                       Condition="'@(WebConfigsToTransform)' != ''">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedWebConfigsTransformFile"/>
+    </CopyPipelineFiles>
+
+    <!-- Delete the updated web.config files -->
+    <Delete Files="@(_UpdatedWebConfigsTransformFile->'%(TransformOutputFile)')" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target TransformWebConfigCore -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <TransformWebConfigCoreDependsOn>
+      PreTransformWebConfig;
+    </TransformWebConfigCoreDependsOn>
+  </PropertyGroup>
+
+  <Target Name="TransformWebConfigCore"
+          DependsOnTargets="$(TransformWebConfigCoreDependsOn)"
+          Inputs="@(WebConfigsToTransform);%(TransformFile)"
+          Outputs="$(_WebConfigTransformOutput)"
+          Condition="@(WebConfigsToTransform)!='' And $(TransformWebConfigEnabled) And !$(UseParameterizeToTransformWebConfig)">
+
+    <!-- Execute transformations -->
+    <TransformXml Source="@(WebConfigsToTransform)"
+                  Transform="%(TransformFile)"
+                  Destination="%(TransformOutputFile)"
+                  Condition="!%(Exclude)"
+                  StackTrace="$(TransformWebConfigStackTraceEnabled)"
+                  SourceRootPath="$(WebPublishPipelineSourceRootDirectory)"
+                  TransformRootPath="$(WebPublishPipelineTransformRootDirectory)"/>
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target ParameterizeTransformWebConfigCore -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ParameterizeTransformWebConfigCoreDependsOn>
+      PreTransformWebConfig;
+    </ParameterizeTransformWebConfigCoreDependsOn>
+  </PropertyGroup>
+  <Target Name="ParameterizeTransformWebConfigCore"
+          DependsOnTargets="$(TransformWebConfigCoreDependsOn)"
+          Inputs="@(WebConfigsToTransform);%(TransformFile)"
+          Outputs="%(TransformOutputFile)"
+          Condition="$(TransformWebConfigEnabled) And $(UseParameterizeToTransformWebConfig)">
+
+    <!-- Remove the output files -->
+    <Delete Files="@(WebConfigsToTransform->'%(TransformOutputFile)');$(_WebConfigTransformOutputParametersFile)" />
+
+    <!-- Execute transformations -->
+    <ParameterizeTransformXml
+      Source="@(WebConfigsToTransform)"
+      IsSourceAFile="True"
+      Transform="%(TransformFile)"
+      IsTransformAFile="True"
+      Destination="%(TransformOutputFile)"
+      IsDestinationAFile="True"
+      Scope="%(TransformScope)"
+      EnableTokenizeParameters="True"
+      UseXpathToFormParameter="$(ParameterizeTransformXmlUseXPath)"
+      StackTrace="$(TransformWebConfigStackTraceEnabled)"
+      SourceRootPath="$(WebPublishPipelineSourceRootDirectory)"
+      TransformRootPath="$(WebPublishPipelineTransformRootDirectory)"
+      Condition="!%(Exclude)">
+      <!-- Created the DeclareParameters for later after DB import is included-->
+      <Output TaskParameter="DeclareParameters" ItemName="_ParameterizeTransformWebConfig"/>
+    </ParameterizeTransformXml>
+
+
+    <!-- Set GenerateFileEvenIfEmpty to true to make sure incremental build works-->
+    <ExportParametersFile
+      Parameters="@(_ParameterizeTransformWebConfig)"
+      DeclareParameterFile="$(_WebConfigTransformOutputParametersFile)"
+      GenerateFileEvenIfEmpty="True"
+      />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target PostTransformWebConfig -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PostTransformWebConfigDependsOn>
+      TransformWebConfigCore;
+      ParameterizeTransformWebConfigCore;
+    </PostTransformWebConfigDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PostTransformWebConfig"
+          DependsOnTargets="$(PostTransformWebConfigDependsOn)">
+
+    <ItemGroup>
+      <!-- Remove untransformed Web.configs from the pipeline -->
+      <FilesForPackagingFromProject Remove="@(WebConfigsToTransform)" Condition="'@(WebConfigsToTransform)'!='' And !%(WebConfigsToTransform.Exclude) And Exists(%(WebConfigsToTransform.TransformOutputFile))"/>
+      <!-- Add the transformed Web.configs at the new loction to the pipeline-->
+      <FilesForPackagingFromProject Include="@(WebConfigsToTransform->'%(TransformOutputFile)')" Condition="'@(WebConfigsToTransform)'!='' And !%(WebConfigsToTransform.Exclude) And Exists(%(WebConfigsToTransform.TransformOutputFile))"/>
+    </ItemGroup>
+
+    <GetPublishingLocalizedString
+       Importance="High"
+       Condition="'@(WebConfigsToTransform)'!='' And !%(WebConfigsToTransform.Exclude) And Exists(%(WebConfigsToTransform.TransformOutputFile))"
+       ID="PublishLocalizedString_TransformConfigUsingTransformFileToTransformOutputFile"
+       ArgumentCount="3"
+       Arguments="@(WebConfigsToTransform->'%(Identity)');%(TransformFile); %(TransformOutputFile)"
+       LogType="Message" />
+    <!-- "Transformed @(WebConfigsToTransform) using %(TransformFile) into %(TransformOutputFile)" />-->
+
+    <ImportParametersFile  Files="$(_WebConfigTransformOutputParametersFile)"
+                           DisableEscapeMSBuildVariable="$(ImportParametersFile_DisableEscapeMSBuildVariable)"
+                           Condition="$(UseParameterizeToTransformWebConfig) and Exists($(_WebConfigTransformOutputParametersFile))">
+      <Output TaskParameter="Result" ItemName="_ImportParameterizeTransformWebConfig"/>
+    </ImportParametersFile>
+
+    <ItemGroup>
+      <MsDeployDeclareParameters Include="@(_ImportParameterizeTransformWebConfig)"
+                                 Condition="!$(DisableAllVSGeneratedMSDeployParameter) And '%(_ImportParameterizeTransformWebConfig.Identity)' !=''">
+        <Value>%(_ImportParameterizeTransformWebConfig.DefaultValue)</Value>
+        <Priority>$(UserWebConfigParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+    <MakeDir Condition="$(EnablePackageProcessLoggingAndAssert) And !Exists('$(PackageLogDir)')"
+             Directories="$(PackageLogDir)" />
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\AfterTransformWebConfig.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)')" Overwrite="True" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target MarkWebConfigAssistFilesAsExclude -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <MarkWebConfigAssistFilesAsExcludeDependsOn>
+      $(OnBeforeMarkWebConfigAssistFilesAsExclude);
+      $(MarkWebConfigAssistFilesAsExcludeDependsOn);
+    </MarkWebConfigAssistFilesAsExcludeDependsOn>
+  </PropertyGroup>
+
+  <Target Name="MarkWebConfigAssistFilesAsExclude"
+          DependsOnTargets="$(MarkWebConfigAssistFilesAsExcludeDependsOn)"
+          Condition="'$(MarkWebConfigAssistFilesAsExclude)' != 'false'">
+
+    <ItemGroup Condition="'$(ProjectConfigFileName)' != '' ">
+      <_AllProjectConfigsInFiles Include="@(FilesForPackagingFromProject)"
+                             Condition="'%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)'" />
+    </ItemGroup>
+
+
+      <!-- Mark all the assistent file whose DependsOn is web.config to Exclude -->
+    <FilterByItems PipelineItems="@(FilesForPackagingFromProject)"
+                   SourceMetadataName="DependentUpon"
+                   FilterMetadataName="DestinationRelativePath"
+                 Filter="@(_AllProjectConfigsInFiles)"
+                 Condition="$(ExcludeTransformAssistFilesFromPublish)"
+                   >
+      <Output TaskParameter="InFilter" ItemName="_NeedtoMarkasExclude_ConfigAssistFiles"/>
+    </FilterByItems>
+
+    <ItemGroup>
+      <!-- Mark all the assistent file whose DependsOn is web.config to Exclude -->
+      <FilesForPackagingFromProject Remove="@(_NeedtoMarkasExclude_ConfigAssistFiles)" Condition="$(ExcludeTransformAssistFilesFromPublish)">
+      </FilesForPackagingFromProject>
+      <FilesForPackagingFromProject Include="@(_NeedtoMarkasExclude_ConfigAssistFiles)" Condition="$(ExcludeTransformAssistFilesFromPublish)">
+        <Exclude>True</Exclude>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+    
+    <CallTarget Targets="$(OnAfterMarkWebConfigAssistFilesAsExclude)" RunEachTargetSeparately="False" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target ProfileTransformWebConfig -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ProfileTransformWebConfigBeforeTargets>
+      $(ProfileTransformWebConfigBeforeTargets);
+      MarkWebConfigAssistFilesAsExclude;
+    </ProfileTransformWebConfigBeforeTargets>
+    <ProfileTransformWebConfigAfterTargets>
+      $(ProfileTransformWebConfigAfterTargets);
+      TransformWebConfig;
+    </ProfileTransformWebConfigAfterTargets>
+    <ProfileTransformWebConfigDependsOn>
+      $(OnBeforeProfileTransformWebConfig);
+      $(ProfileTransformWebConfigDependsOn);
+      PreProfileTransformWebConfig;
+      ProfileTransformWebConfigCore;
+      ParameterizeProfileTransformWebConfigCore;
+      PostProfileTransformWebConfig;
+    </ProfileTransformWebConfigDependsOn>
+  </PropertyGroup>
+
+  <Target Name="ProfileTransformWebConfig"
+          DependsOnTargets="$(ProfileTransformWebConfigDependsOn)"
+          Condition="'$(ProfileTransformWebConfig)' != 'false'  And '$(PublishProfileName)' != ''"
+          BeforeTargets="$(ProfileTransformWebConfigBeforeTargets)"
+          AfterTargets="$(ProfileTransformWebConfigAfterTargets)">
+
+    <CallTarget Targets="$(OnAfterProfileTransformWebConfig)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target CollectFilesForProfileTransformWebConfigs -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CollectFilesForProfileTransformWebConfigsDependsOn>
+      $(OnBeforeCollectFilesForProfileTransformWebConfigs);
+      $(CollectFilesForProfileTransformWebConfigsDependsOn);
+      PipelineCollectFilesPhase;
+    </CollectFilesForProfileTransformWebConfigsDependsOn>
+  </PropertyGroup>
+
+  <Target Name="CollectFilesForProfileTransformWebConfigs" DependsOnTargets="$(CollectFilesForProfileTransformWebConfigsDependsOn)" Condition="'$(CollectFilesForProfileTransformWebConfigs)' != 'false' And '$(PublishProfileName)' != ''">
+
+    <!-- Gather Sources, Transforms, and Destinations for the TransformXml task -->
+    <ItemGroup Condition="'$(ProjectProfileTransformFileName)'!=''">
+      <ProfileWebConfigsToTransform Include="@(FilesForPackagingFromProject)"
+                             Condition="'%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)'">
+        <TransformFile>$(WebPublishPipelineProjectDirectory)\$([System.IO.Path]::GetDirectoryName($([System.String]::new(%(DestinationRelativePath)))))\$(ProjectProfileTransformFileName)</TransformFile>
+        <TransformOriginalFolder>$(ProfileTransformWebConfigIntermediateLocation)\original</TransformOriginalFolder>
+        <TransformFileFolder>$(ProfileTransformWebConfigIntermediateLocation)\assist</TransformFileFolder>
+        <TransformOutputFile>$(ProfileTransformWebConfigIntermediateLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
+        <TransformScope>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))</TransformScope>
+      </ProfileWebConfigsToTransform>
+      <_ProfileWebConfigsToTransformOuputs Include="@(ProfileWebConfigsToTransform->'%(TransformOutputFile)')" />
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterCollectFilesForProfileTransformWebConfigs)" RunEachTargetSeparately="False" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PreProfileTransformWebConfig -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PreProfileTransformWebConfigDependsOn>
+      CollectFilesForProfileTransformWebConfigs;
+    </PreProfileTransformWebConfigDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PreProfileTransformWebConfig"
+          DependsOnTargets="$(PreProfileTransformWebConfigDependsOn)">
+
+
+    <ItemGroup>
+      <!-- Gather all the web.config which doesn't have the transform file -->
+      <_TempNoTrnasformFileForProfileWebConfigsToTransform Include="@(ProfileWebConfigsToTransform)"
+                                            Condition="!Exists(%(TransformFile))" />
+
+      <!-- Remove all the web.config doesn't have transform file -->
+      <ProfileWebConfigsToTransform Remove="@(_TempNoTrnasformFileForProfileWebConfigsToTransform)"/>
+    </ItemGroup>
+
+    <PropertyGroup>
+      <_ProfileWebConfigsToTransformOuputsDirectories>@(_ProfileWebConfigsToTransformOuputs->'%(RootDir)%(Directory)')</_ProfileWebConfigsToTransformOuputsDirectories>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_ProfileWebConfigsToTransformOuputsDirectories Include="$(_ProfileWebConfigsToTransformOuputsDirectories)" />
+    </ItemGroup>
+
+    <!-- Debugging messages -->
+    <PropertyGroup>
+      <_MessageArguments>@(ProfileWebConfigsToTransform->'%(DestinationRelativePath)', ', ')</_MessageArguments>
+    </PropertyGroup>
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_FoundApplicationConfigForTransformation"
+      ArgumentCount="1"
+      Arguments="$(_MessageArguments)"
+      LogType="Message" 
+      Condition="'$(_MessageArguments)'!=''"/>
+
+    <!-- Make sure required directories exist -->
+    <MakeDir Directories="@(_ProfileWebConfigsToTransformOuputsDirectories)" Condition="!Exists(%(Identity))"/>
+
+    <PropertyGroup>
+      <_ProfileWebConfigTransformOutput>@(ProfileWebConfigsToTransform->'%(TransformOutputFile)')</_ProfileWebConfigTransformOutput>
+      <_ProfileWebConfigTransformOutput Condition="$(UseParameterizeToProfileTransformWebConfig)">$(_ProfileWebConfigTransformOutput);$(_ProfileWebConfigTransformOutputParametersFile)</_ProfileWebConfigTransformOutput>
+    </PropertyGroup>
+
+    <!-- Remove the output file if there is change on $(UseParameterizeToProfileTransformWebConfig)-->
+    <Delete Files="@(ProfileWebConfigsToTransform->'%(TransformOutputFile)');$(_ProfileWebConfigTransformOutputParametersFile)"
+            Condition="(!$(UseParameterizeToProfileTransformWebConfig) And Exists($(_ProfileWebConfigTransformOutputParametersFile))) 
+                       Or ($(UseParameterizeToProfileTransformWebConfig) And !Exists($(_ProfileWebConfigTransformOutputParametersFile)))"
+            ContinueOnError="true"/>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) And ('@(ProfileWebConfigsToTransform)'!='') And !%(Exclude)"
+                      Encoding="utf-8"
+                      Overwrite="True"
+                      File="$(PackageLogDir)\PreProfileTransformWebConfig.Log"
+                      Lines="@(ProfileWebConfigsToTransform->' 
+           Transforming  input: %(Identity) 
+                      with:  %(TransformFile)
+                      output: %(TransformOutputFile)
+                      ')" />
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      Overwrite="False"
+                      File="$(PackageLogDir)\PreProfileTransformWebConfig.Log"
+                      Lines="_ProfileWebConfigTransformOutput: $(_ProfileWebConfigTransformOutput)" />
+
+    <!-- Copy the original web.config -->
+    <CopyPipelineFiles PipelineItems="@(ProfileWebConfigsToTransform)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="%(TransformOriginalFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                           Condition="'@(ProfileWebConfigsToTransform)' != ''">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedProfileWebConfigsToTransform"/>
+    </CopyPipelineFiles>
+
+    <!-- Delete those web.config have been updated if existed-->
+    <Delete Files="@(_UpdatedProfileWebConfigsToTransform->'%(TransformOutputFile)')" />
+
+
+    <!--Copy the TransformFile-->
+    <CopyPipelineFiles PipelineItems="@(ProfileWebConfigsToTransform->'%(TransformFile)')"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="%(TransformFileFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                           Condition="'@(ProfileWebConfigsToTransform)' != ''">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedProfileWebConfigsTransformFile"/>
+    </CopyPipelineFiles>
+
+    <!-- Delete those web.config have been updated if existed-->
+    <Delete Files="@(_UpdatedProfileWebConfigsTransformFile->'%(TransformOutputFile)')" />
+  </Target>
+
+  <!--Target ProfileTransformWebConfigCore -->
+  <PropertyGroup>
+    <ProfileTransformWebConfigCoreDependsOn>
+      PreProfileTransformWebConfig;
+    </ProfileTransformWebConfigCoreDependsOn>
+  </PropertyGroup>
+
+  <Target Name="ProfileTransformWebConfigCore"
+          DependsOnTargets="$(ProfileTransformWebConfigCoreDependsOn)"
+          Inputs="@(ProfileWebConfigsToTransform);%(TransformFile)"
+          Outputs="$(_ProfileWebConfigTransformOutput)"
+          Condition="'@(ProfileWebConfigsToTransform)' != '' And $(ProfileTransformWebConfigEnabled) And !$(UseParameterizeToProfileTransformWebConfig)">
+
+    <!-- Execute transformations -->
+    <TransformXml Source="@(ProfileWebConfigsToTransform)"
+                  Transform="%(TransformFile)"
+                  Destination="%(TransformOutputFile)"
+                  Condition="!%(Exclude)"
+                  StackTrace="$(ProfileTransformWebConfigStackTraceEnabled)"
+                  SourceRootPath="$(WebPublishPipelineSourceRootDirectory)"
+                  TransformRootPath="$(WebPublishPipelineTransformRootDirectory)"/>
+
+  </Target>
+
+  <!--Target ParameterizeProfileTransformWebConfigCore -->
+  <PropertyGroup>
+    <ParameterizeProfileTransformWebConfigCoreDependsOn>
+      PreProfileTransformWebConfig;
+    </ParameterizeProfileTransformWebConfigCoreDependsOn>
+  </PropertyGroup>
+  <Target Name="ParameterizeProfileTransformWebConfigCore"
+          DependsOnTargets="$(ProfileTransformWebConfigCoreDependsOn)"
+          Inputs="@(ProfileWebConfigsToTransform);%(TransformFile)"
+          Outputs="%(TransformOutputFile)"
+          Condition="$(ProfileTransformWebConfigEnabled) And $(UseParameterizeToProfileTransformWebConfig)">
+
+    <!-- Remove all the output file -->
+    <Delete Files="@(ProfileWebConfigsToTransform->'%(TransformOutputFile)');$(_ProfileWebConfigTransformOutputParametersFile)" />
+
+    <!-- Execute transformations -->
+    <ParameterizeTransformXml
+      Source="@(ProfileWebConfigsToTransform)"
+      IsSourceAFile="True"
+      Transform="%(TransformFile)"
+      IsTransformAFile="True"
+      Destination="%(TransformOutputFile)"
+      IsDestinationAFile="True"
+      Scope="%(TransformScope)"
+      EnableTokenizeParameters="True"
+      UseXpathToFormParameter="$(ParameterizeTransformXmlUseXPath)"
+      StackTrace="$(ProfileTransformWebConfigStackTraceEnabled)"
+      SourceRootPath="$(WebPublishPipelineSourceRootDirectory)"
+      TransformRootPath="$(WebPublishPipelineTransformRootDirectory)"
+      Condition="!%(Exclude)">
+      <!-- Created the DeclareParameters for later after DB import is included-->
+      <Output TaskParameter="DeclareParameters" ItemName="_ParameterizeProfileTransformWebConfig"/>
+    </ParameterizeTransformXml>
+
+
+    <!-- Set GenerateFileEvenIfEmpty to true to make sure incremental build works-->
+    <ExportParametersFile
+      Parameters="@(_ParameterizeProfileTransformWebConfig)"
+      DeclareParameterFile="$(_ProfileWebConfigTransformOutputParametersFile)"
+      GenerateFileEvenIfEmpty="True"
+      />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PostProfileTransformWebConfig -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PostProfileTransformWebConfigDependsOn>
+      ProfileTransformWebConfigCore;
+      ParameterizeProfileTransformWebConfigCore;
+    </PostProfileTransformWebConfigDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PostProfileTransformWebConfig"
+          DependsOnTargets="$(PostProfileTransformWebConfigDependsOn)">
+
+    <ItemGroup>
+      <!--Remove untransformed Web.configs from the pipeline-->
+      <FilesForPackagingFromProject Remove="@(ProfileWebConfigsToTransform)" Condition="'@(ProfileWebConfigsToTransform)'!='' And !%(ProfileWebConfigsToTransform.Exclude) And Exists(%(ProfileWebConfigsToTransform.TransformOutputFile))"/>
+      <!--Add the transformed Web.configs at the new loction to the pipeline-->
+      <FilesForPackagingFromProject Include="@(ProfileWebConfigsToTransform->'%(TransformOutputFile)')" Condition="'@(ProfileWebConfigsToTransform)'!='' And !%(ProfileWebConfigsToTransform.Exclude) And Exists(%(ProfileWebConfigsToTransform.TransformOutputFile))"/>
+    </ItemGroup>
+
+
+    <GetPublishingLocalizedString
+       Importance="High"
+       Condition="'@(ProfileWebConfigsToTransform)'!='' And !%(ProfileWebConfigsToTransform.Exclude) And Exists(%(ProfileWebConfigsToTransform.TransformOutputFile))"
+       ID="PublishLocalizedString_TransformConfigUsingTransformFileToTransformOutputFile"
+       ArgumentCount="3"
+       Arguments="@(ProfileWebConfigsToTransform->'%(Identity)');%(TransformFile); %(TransformOutputFile)"
+       LogType="Message" />
+    <!-- "Transformed @(ProfileWebConfigsToTransform) using %(TransformFile) into %(TransformOutputFile)" />-->
+
+    <ImportParametersFile  Files="$(_ProfileWebConfigTransformOutputParametersFile)" 
+                           DisableEscapeMSBuildVariable="$(ImportParametersFile_DisableEscapeMSBuildVariable)"
+                           Condition="$(UseParameterizeToProfileTransformWebConfig) and Exists($(_ProfileWebConfigTransformOutputParametersFile))">
+      <Output TaskParameter="Result" ItemName="_ImportParameterizeProfileTransformWebConfig"/>
+    </ImportParametersFile>
+
+    <ItemGroup>
+      <MsDeployDeclareParameters Include="@(_ImportParameterizeProfileTransformWebConfig)"
+                                 Condition="!$(DisableAllVSGeneratedMSDeployParameter) And '%(_ImportParameterizeProfileTransformWebConfig.Identity)' !=''">
+        <Value>%(_ImportParameterizeProfileTransformWebConfig.DefaultValue)</Value>
+        <Priority>$(UserWebConfigParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+    <MakeDir Condition="$(EnablePackageProcessLoggingAndAssert) And !Exists('$(PackageLogDir)')"
+             Directories="$(PackageLogDir)" />
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\AfterProfileTransformWebConfig.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)')" Overwrite="True" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Target PreInsertAdditionalWebCofigConnectionStrings -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PreInsertAdditionalWebCofigConnectionStringsDependsOn>
+      ProfileTransformWebConfig;
+    </PreInsertAdditionalWebCofigConnectionStringsDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PreInsertAdditionalWebCofigConnectionStrings"
+          DependsOnTargets="$(PreInsertAdditionalWebCofigConnectionStringsDependsOn)">
+    <ItemGroup>
+      <_WebConfigsToInsertAdditionalCS Include="@(FilesForPackagingFromProject)"
+                             Condition="$(InsertAdditionalWebConfigConnectionStringOnlyInRoot) 
+                                         And '%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)' 
+                                         And !%(FilesForPackagingFromProject.Exclude)
+                                         And '%(DestinationRelativePath)' == '$(ProjectConfigFileName)'">
+        <TransformOriginalFolder>$(InsertAdditionalWebCofigConnectionStringsLocation)\original</TransformOriginalFolder>
+        <TransformFileFolder>$(InsertAdditionalWebCofigConnectionStringsLocation)\assist</TransformFileFolder>
+        <TransformOutputFile>$(InsertAdditionalWebCofigConnectionStringsLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
+        <TransformScope>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))</TransformScope>
+      </_WebConfigsToInsertAdditionalCS>
+      <_WebConfigsToInsertAdditionalCS Include="@(FilesForPackagingFromProject)"
+                             Condition="!$(InsertAdditionalWebConfigConnectionStringOnlyInRoot) 
+                                         And '%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)' 
+                                         And !%(FilesForPackagingFromProject.Exclude)">
+        <TransformOriginalFolder>$(InsertAdditionalWebCofigConnectionStringsLocation)\original</TransformOriginalFolder>
+        <TransformFileFolder>$(InsertAdditionalWebCofigConnectionStringsLocation)\assist</TransformFileFolder>
+        <TransformOutputFile>$(InsertAdditionalWebCofigConnectionStringsLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
+        <TransformScope>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))</TransformScope>
+      </_WebConfigsToInsertAdditionalCS>
+        <_WebConfigsToInsertAdditionalCSOuputFiles Include="@(_WebConfigsToInsertAdditionalCS->'%(TransformOutputFile)')">
+      </_WebConfigsToInsertAdditionalCSOuputFiles>
+    </ItemGroup>
+
+    <PropertyGroup>
+      <_WebConfigsToInsertAdditionalCSOuputDirectories>@(_WebConfigsToInsertAdditionalCSOuputFiles->'%(RootDir)%(Directory)')</_WebConfigsToInsertAdditionalCSOuputDirectories>
+      <_WebConfigsToInsertAdditionalCSOuput>@(_WebConfigsToInsertAdditionalCS->'%(TransformOutputFile)');</_WebConfigsToInsertAdditionalCSOuput>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_WebConfigsToInsertAdditionalCSOuputDirectories Include="$(_WebConfigsToInsertAdditionalCSOuputDirectories)" />
+    </ItemGroup>
+
+    <MakeDir Directories="@(_WebConfigsToInsertAdditionalCSOuputDirectories)" Condition="!Exists(%(Identity))"/>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) And ('@(_WebConfigsToInsertAdditionalCS)'!='') And !%(Exclude)"
+                      Encoding="utf-8"
+                      Overwrite="True"
+                      File="$(PackageLogDir)\PreInsertAdditionalWebCofigConnectionStrings.Log"
+                      Lines="@(_WebConfigsToInsertAdditionalCS->'
+    InsertAdditionalCSTransform   input: %(Identity) 
+                      output: %(TransformOutputFile)
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)
+                      ')" />
+    
+    <!--Copy the original web.config-->
+    <CopyPipelineFiles PipelineItems="@(_WebConfigsToInsertAdditionalCS)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="%(TransformOriginalFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                       Condition="'@(_WebConfigsToInsertAdditionalCS)' != ''">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedWebConfigsToInsertAdditionalCS"/>
+    </CopyPipelineFiles>
+
+    <!-- Delete those web.config have been updated if existed-->
+    <Delete Files="@(_UpdatedWebConfigsToInsertAdditionalCS->'%(TransformOutputFile)')" />
+
+    <ItemGroup>
+      <_InsertAdditionalConnectionStringNamesPrepare Include="@(_ConnectionStringsToInsert)">
+        <ConnectionStringName>%(_ConnectionStringsToInsert.Identity)</ConnectionStringName>
+        <ConnectionString>%(_ConnectionStringsToInsert.Identity)_ConnectionString</ConnectionString>
+      </_InsertAdditionalConnectionStringNamesPrepare>
+      <_InsertAdditionalConnectionStringNames Include="@(_InsertAdditionalConnectionStringNamesPrepare)">
+        <TransformXMLFragement>
+          &lt;add
+          name=&quot;%(_InsertAdditionalConnectionStringNamesPrepare.ConnectionStringName)&quot;&#13;&#10;
+          connectionString=&quot;%(_InsertAdditionalConnectionStringNamesPrepare.ConnectionString)&quot;&#13;&#10;
+          providerName=&quot;$(InsertAdditionalWebConfigConnectionStringProviderName)&quot;&#13;&#10;
+          xdt:Transform=&quot;InsertIfMissing&quot; &#13;&#10;
+          xdt:Locator=&quot;Match(name)&quot;&#13;&#10;
+          xdt:SupressWarnings=&quot;True&quot;&#13;&#10;
+          /&gt;
+        </TransformXMLFragement>
+      </_InsertAdditionalConnectionStringNames>
+    </ItemGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) And ('@(_InsertAdditionalConnectionStringNames)'!='') "
+                  Encoding="utf-8"
+                  Overwrite="True"
+                  File="$(PackageLogDir)\InsertAdditionalConnectionStringName.Log"
+                  Lines="@(_InsertAdditionalConnectionStringNames->'
+    _InsertAdditionalConnectionStringNames   
+                      TransformXML: %(TransformXML) 
+                      ConnectionString: %(ConnectionString)
+                      TransformXMLFragement: %(TransformXMLFragement)
+                      ')" />
+
+    <PropertyGroup>
+      <_WebConfigsToInsertAdditionalCS_Transform>&lt;?xml version=&quot;1.0&quot;?&gt;
+        &lt;configuration xmlns:xdt=&quot;http://schemas.microsoft.com/XML-Document-Transform&quot;&gt;
+        &lt;connectionStrings xdt:Transform=&quot;InsertIfMissing&quot; xdt:SupressWarnings=&quot;True&quot;&gt;
+        @(_InsertAdditionalConnectionStringNames->'%(TransformXMLFragement)', '')
+        &lt;/connectionStrings&gt;
+        &lt;/configuration&gt;
+      </_WebConfigsToInsertAdditionalCS_Transform>
+    </PropertyGroup>
+    
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target InsertAdditionalWebCofigConnectionStringsCore -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <InsertAdditionalWebCofigConnectionStringsCoreDependsOn>
+    </InsertAdditionalWebCofigConnectionStringsCoreDependsOn>
+  </PropertyGroup>
+
+  <Target Name="InsertAdditionalWebCofigConnectionStringsCore"
+          Inputs="@(_WebConfigsToInsertAdditionalCS)"
+          Outputs="%(TransformOutputFile)"
+          DependsOnTargets="$(InsertAdditionalWebCofigConnectionStringsCoreDependsOn)">
+
+    <!-- First Delete the output parameter file-->
+    <!-- Remove the output file if there is change on $(UseParameterizeToTransformWebConfig)-->
+    <Delete Files="@(_WebConfigsToInsertAdditionalCS->'%(TransformOutputFile)')"/>
+
+    
+    <PropertyGroup>
+      <_WebConfigToInsertAdditionalCS_Identity>%(_WebConfigsToInsertAdditionalCS.Identity)</_WebConfigToInsertAdditionalCS_Identity>
+      <_WebConfigToInsertAdditionalCS_TransformOutputFile>%(_WebConfigsToInsertAdditionalCS.TransformOutputFile)</_WebConfigToInsertAdditionalCS_TransformOutputFile>
+      <_WebConfigsToInsertAdditionalCS_TransformScope>%(_WebConfigsToInsertAdditionalCS.TransformScope)</_WebConfigsToInsertAdditionalCS_TransformScope>
+    </PropertyGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                  Encoding="utf-8"
+                  Overwrite="False"
+                  File="$(PackageLogDir)\InsertAdditionalConnectionStringName.Log"
+                  Lines="_WebConfigToInsertAdditionalCS_Identity: $(_WebConfigToInsertAdditionalCS_Identity) 
+                      _WebConfigToInsertAdditionalCS_TransformOutputFile: $(_WebConfigToInsertAdditionalCS_TransformOutputFile)
+                      _WebConfigsToInsertAdditionalCS_TransformScope: $(_WebConfigsToInsertAdditionalCS_TransformScope)
+                      _WebConfigsToInsertAdditionalCS_Transform: $(_WebConfigsToInsertAdditionalCS_Transform)
+                      " />
+    
+    <!-- Now we use the tokenize transform to auto parameterize the web.config-->
+    <ParameterizeTransformXml
+      Source="$(_WebConfigToInsertAdditionalCS_Identity)"
+      IsSourceAFile="True"
+      Transform="$(_WebConfigsToInsertAdditionalCS_Transform)"
+      IsTransformAFile="False"
+      Destination="$(_WebConfigToInsertAdditionalCS_TransformOutputFile)"
+      IsDestinationAFile="True"
+      Scope="$(_WebConfigsToInsertAdditionalCS_TransformScope)"
+      StackTrace="$(TransformWebConfigStackTraceEnabled)"
+      SourceRootPath="$(WebPublishPipelineSourceRootDirectory)">
+    </ParameterizeTransformXml>
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PostInsertAdditionalWebCofigConnectionStrings -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PostInsertAdditionalWebCofigConnectionStringsDependsOn>
+    </PostInsertAdditionalWebCofigConnectionStringsDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PostInsertAdditionalWebCofigConnectionStrings"
+          DependsOnTargets="$(PostInsertAdditionalWebCofigConnectionStringsDependsOn)">
+
+    <ItemGroup>
+      <!-- Remove untransformed Web.configs from the pipeline -->
+      <FilesForPackagingFromProject Remove="@(_WebConfigsToInsertAdditionalCS)" Condition="'@(_WebConfigsToInsertAdditionalCS)'!='' And !%(_WebConfigsToInsertAdditionalCS.Exclude) And Exists(%(_WebConfigsToInsertAdditionalCS.TransformOutputFile))"/>
+      <!-- Add the transformed Web.configs at the new loction to the pipeline -->
+      <FilesForPackagingFromProject Include="@(_WebConfigsToInsertAdditionalCS->'%(TransformOutputFile)')" Condition="'@(_WebConfigsToInsertAdditionalCS)'!='' And !%(_WebConfigsToInsertAdditionalCS.Exclude) And Exists(%(_WebConfigsToInsertAdditionalCS.TransformOutputFile))"/>
+    </ItemGroup>
+
+    <GetPublishingLocalizedString
+       Importance="High"
+       Condition="'@(_WebConfigsToInsertAdditionalCS)'!='' And !%(_WebConfigsToInsertAdditionalCS.Exclude) And Exists(%(_WebConfigsToInsertAdditionalCS.TransformOutputFile))"
+       ID="PublishLocalizedString_InsertAdditionalConnectionStringTransformConfigToTransformOutputFile"
+       ArgumentCount="2"
+       Arguments="@(_WebConfigsToInsertAdditionalCS->'%(Identity)');%(TransformOutputFile)"
+       LogType="Message" />
+    <!-- "Auto ConnectionString Transformed @(_WebConfigsToInsertAdditionalCS) into %(TransformOutputFile)" />-->
+
+    
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\PostInsertAdditionalWebCofigConnectionStrings.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)')" Overwrite="True" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target InsertAdditionalWebCofigConnectionStrings-->
+  <!--**********************************************************************-->
+  <PropertyGroup>
+    <InsertAdditionalWebCofigConnectionStringsDependsOn>
+      $(OnBeforeInsertAdditionalWebCofigConnectionStrings);
+      $(InsertAdditionalWebCofigConnectionStringsDependsOn);
+      TransformWebConfig;
+      ProfileTransformWebConfig;
+      PreInsertAdditionalWebCofigConnectionStrings;
+      InsertAdditionalWebCofigConnectionStringsCore;
+      PostInsertAdditionalWebCofigConnectionStrings;
+    </InsertAdditionalWebCofigConnectionStringsDependsOn>
+    <InsertAdditionalWebCofigConnectionStringsBeforeTargets>
+      $(InsertAdditionalWebCofigConnectionStringsBeforeTargets);
+      PreAutoParameterizationWebConfigConnectionStrings;
+      AutoParameterizationWebConfigConnectionStrings;
+    </InsertAdditionalWebCofigConnectionStringsBeforeTargets>
+  </PropertyGroup>
+  <Target Name="InsertAdditionalWebCofigConnectionStrings" 
+          DependsOnTargets="$(InsertAdditionalWebCofigConnectionStringsDependsOn)"
+          BeforeTargets="$(InsertAdditionalWebCofigConnectionStringsBeforeTargets)"
+          Condition="$(InsertAdditionalWebCofigConnectionStrings) And '@(_ConnectionStringsToInsert)' != ''">
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PreAutoParameterizationWebConfigConnectionStrings -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PreAutoParameterizationWebConfigConnectionStringsDependsOn>
+      PipelineTransformPhase;
+    </PreAutoParameterizationWebConfigConnectionStringsDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PreAutoParameterizationWebConfigConnectionStrings"
+          DependsOnTargets="$(PreAutoParameterizationWebConfigConnectionStringsDependsOn)">
+    <ItemGroup>
+      <_WebConfigsToAutoParmeterizeCS Include="@(FilesForPackagingFromProject)"
+                             Condition="'%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)' And !%(FilesForPackagingFromProject.Exclude)">
+        <TransformOriginalFolder>$(AutoParameterizationWebConfigConnectionStringsLocation)\original</TransformOriginalFolder>
+        <TransformFileFolder>$(AutoParameterizationWebConfigConnectionStringsLocation)\assist</TransformFileFolder>
+        <TransformOutputFile>$(AutoParameterizationWebConfigConnectionStringsLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
+        <TransformScope>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))</TransformScope>
+      </_WebConfigsToAutoParmeterizeCS>
+      <_WebConfigsToAutoParmeterizeCSOuputFiles Include="@(_WebConfigsToAutoParmeterizeCS->'%(TransformOutputFile)')">
+      </_WebConfigsToAutoParmeterizeCSOuputFiles>
+    </ItemGroup>
+
+    <PropertyGroup>
+      <_WebConfigsToAutoParmeterizeCSOuputDirectories>@(_WebConfigsToAutoParmeterizeCSOuputFiles->'%(RootDir)%(Directory)')</_WebConfigsToAutoParmeterizeCSOuputDirectories>
+      <_WebConfigsToAutoParmeterizeCSOuput>@(_WebConfigsToAutoParmeterizeCS->'%(TransformOutputFile)');$(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile)</_WebConfigsToAutoParmeterizeCSOuput>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_WebConfigsToAutoParmeterizeCSOuputDirectories Include="$(_WebConfigsToAutoParmeterizeCSOuputDirectories)" />
+    </ItemGroup>
+
+    <!-- Remove the output file if there is change on $(UseParameterizeToTransformWebConfig)-->
+    <Delete Files="@(_WebConfigsToAutoParmeterizeCS->'%(TransformOutputFile)');$(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile)"
+            Condition="!Exists($(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile))"
+            ContinueOnError="true"/>
+
+    <MakeDir Directories="@(_WebConfigsToAutoParmeterizeCSOuputDirectories)" Condition="!Exists(%(Identity))"/>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert) And ('@(_WebConfigsToAutoParmeterizeCS)'!='') And !%(Exclude)"
+                      Encoding="utf-8"
+                      Overwrite="True"
+                      File="$(PackageLogDir)\PreAutoParameterizationWebConfigConnectionStrings.Log"
+                      Lines="@(_WebConfigsToAutoParmeterizeCS->'
+    AutoCSTransform   input: %(Identity) 
+                      output: %(TransformOutputFile)
+                      ')" />
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      Overwrite="False"
+                      File="$(PackageLogDir)\PreAutoParameterizationWebConfigConnectionStrings.Log"
+                      Lines="_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile: $(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile)" />
+
+
+    <!--Copy the original web.config-->
+    <CopyPipelineFiles PipelineItems="@(_WebConfigsToAutoParmeterizeCS)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="%(TransformOriginalFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                       Condition="'@(_WebConfigsToAutoParmeterizeCS)' != ''">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedWebConfigsToAutoParmeterizeCS"/>
+    </CopyPipelineFiles>
+
+    <!-- Delete those web.config have been updated if existed-->
+    <Delete Files="@(_UpdatedWebConfigsToAutoParmeterizeCS->'%(TransformOutputFile)')" />
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target AutoParameterizationWebConfigConnectionStringsCore -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <AutoParameterizationWebConfigConnectionStringsCoreDependsOn>
+    </AutoParameterizationWebConfigConnectionStringsCoreDependsOn>
+  </PropertyGroup>
+
+  <Target Name="AutoParameterizationWebConfigConnectionStringsCore"
+          Inputs="@(_WebConfigsToAutoParmeterizeCS)"
+          Outputs="$(_WebConfigsToAutoParmeterizeCSOuput)"
+          DependsOnTargets="$(AutoParameterizationWebConfigConnectionStringsCoreDependsOn)">
+
+    <!-- First Delete the output parameter file-->
+    <!-- Remove the output file if there is change on $(UseParameterizeToTransformWebConfig)-->
+    <Delete Files="@(_WebConfigsToAutoParmeterizeCS->'%(TransformOutputFile)');$(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile)"/>
+
+    <GetPublishingLocalizedString
+      ID="PublishLocalizedString_WebConfigConnectionStringParameterDescription">
+      <Output TaskParameter="Result" PropertyName="_PublishLocalizedString_WebConfigConnectionStringParameterDescription" />
+    </GetPublishingLocalizedString>
+
+    <PropertyGroup>
+      <DeployParameterWebConfigConnectionStringName Condition="'$(DeployParameterWebConfigConnectionStringName)'==''">$(DeployParameterPrefix)%24(name)-$(ProjectConfigFileName) Connection String</DeployParameterWebConfigConnectionStringName>
+      <DeployParameterWebConfigConnectionStringDescription Condition="'$(DeployParameterWebConfigConnectionStringDescription)'==''">%24(name) $(_PublishLocalizedString_WebConfigConnectionStringParameterDescription)</DeployParameterWebConfigConnectionStringDescription>
+    </PropertyGroup>
+
+    <!-- Description might have the xml special character, we need to escape it. -->
+    <EscapeXMLString
+      Source="$(DeployParameterWebConfigConnectionStringDescription)" >
+      <Output TaskParameter="Result" PropertyName="_EscapedDeployParameterWebConfigConnectionStringDescription" />
+    </EscapeXMLString>
+
+    <!-- We need another escape otherwise, the following CreateProperty for the transformation  will evaluate it to lost the escape-->
+    <EscapeXMLString
+      Source="$(_EscapedDeployParameterWebConfigConnectionStringDescription)" >
+      <Output TaskParameter="Result" PropertyName="_EscapedDeployParameterWebConfigConnectionStringDescription2" />
+    </EscapeXMLString>
+
+    <!-- First create the Tokenized Transformation in line -->
+    <CreateProperty Value="
+      &lt;?xml version=&quot;1.0&quot;?&gt;
+        &lt;configuration xmlns:xdt=&quot;http://schemas.microsoft.com/XML-Document-Transform&quot;&gt;
+          &lt;connectionStrings&gt;
+            &lt;add
+              connectionString=&quot;{% token='%24(ReplacableToken_%23(parameter)_%23(tokennumber))' xpathlocator='name' parameter='$(DeployParameterWebConfigConnectionStringName)' description='$(_EscapedDeployParameterWebConfigConnectionStringDescription2)' defaultValue='%24(connectionString)' tags='$(MsDeployDatabaseTag)' %}&quot;
+              xdt:Transform=&quot;SetTokenizedAttributes(connectionString)&quot; xdt:SupressWarnings=&quot;True&quot; /&gt;
+          &lt;/connectionStrings&gt;
+        &lt;/configuration&gt;
+        " >
+      <Output TaskParameter="Value" PropertyName="_AutoParameterizeCSTransformWithDefaultValue"/>
+    </CreateProperty>
+
+    <!-- First create the Tokenized Transformation in line without Default Value -->
+    <CreateProperty Value="
+      &lt;?xml version=&quot;1.0&quot;?&gt;
+        &lt;configuration xmlns:xdt=&quot;http://schemas.microsoft.com/XML-Document-Transform&quot;&gt;
+          &lt;connectionStrings&gt;
+            &lt;add
+              connectionString=&quot;{% token='%24(ReplacableToken_%23(parameter)_%23(tokennumber))' xpathlocator='name' parameter='$(DeployParameterWebConfigConnectionStringName)' description='$(_EscapedDeployParameterWebConfigConnectionStringDescription2)'  tags='$(MsDeployDatabaseTag)' %}&quot;
+              xdt:Transform=&quot;SetTokenizedAttributes(connectionString)&quot; xdt:SupressWarnings=&quot;True&quot; /&gt;
+          &lt;/connectionStrings&gt;
+        &lt;/configuration&gt;
+        " >
+      <Output TaskParameter="Value" PropertyName="_AutoParameterizeCSTransformNoDefaultValue"/>
+    </CreateProperty>
+
+
+    <PropertyGroup>
+      <_AutoParameterizeCSTransform>$(_AutoParameterizeCSTransformWithDefaultValue)</_AutoParameterizeCSTransform>
+      <_AutoParameterizeCSTransform Condition="$(AutoParameterizationWebConfigCSNoDefaultValue)">$(_AutoParameterizeCSTransformNoDefaultValue)</_AutoParameterizeCSTransform>
+      <_AutoParameterizeCSUseXPath Condition="'$(_AutoParameterizeCSUseXPath)'==''">True</_AutoParameterizeCSUseXPath>
+    </PropertyGroup>
+
+    <!-- Now we use the tokenize transform to auto parameterize the web.config-->
+    <ParameterizeTransformXml
+      Source="@(_WebConfigsToAutoParmeterizeCS)"
+      IsSourceAFile="True"
+      Transform="$(_AutoParameterizeCSTransform)"
+      IsTransformAFile="False"
+      Destination="%(TransformOutputFile)"
+      IsDestinationAFile="True"
+      Scope="%(TransformScope)"
+      EnableTokenizeParameters="True"
+      UseXpathToFormParameter="$(_AutoParameterizeCSUseXPath)" 
+      StackTrace="$(TransformWebConfigStackTraceEnabled)"
+      SourceRootPath="$(WebPublishPipelineSourceRootDirectory)"
+      Condition="!%(Exclude)">
+      <!-- Created the DeclareParameters for later after DB import is included-->
+      <Output TaskParameter="DeclareParameters" ItemName="_ParamsFromWebConfigsToAutoParmeterizeCS"/>
+    </ParameterizeTransformXml>
+
+
+    <!-- Set GenerateFileEvenIfEmpty to true to make sure incremental build works-->
+    <ExportParametersFile
+      Parameters="@(_ParamsFromWebConfigsToAutoParmeterizeCS)"
+      DeclareParameterFile="$(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile)"
+      GenerateFileEvenIfEmpty="True"
+      />
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PostAutoParameterizationWebConfigConnectionStrings -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PostAutoParameterizationWebConfigConnectionStringsDependsOn>
+    </PostAutoParameterizationWebConfigConnectionStringsDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PostAutoParameterizationWebConfigConnectionStrings"
+          DependsOnTargets="$(PostAutoParameterizationWebConfigConnectionStringsDependsOn)">
+
+    <ItemGroup>
+      <!-- Remove untransformed Web.configs from the pipeline-->
+      <FilesForPackagingFromProject Remove="@(_WebConfigsToAutoParmeterizeCS)" Condition="'@(_WebConfigsToAutoParmeterizeCS)'!='' And !%(_WebConfigsToAutoParmeterizeCS.Exclude) And Exists(%(_WebConfigsToAutoParmeterizeCS.TransformOutputFile))"/>
+      <!-- Add the transformed Web.configs at the new loction to the pipeline-->
+      <FilesForPackagingFromProject Include="@(_WebConfigsToAutoParmeterizeCS->'%(TransformOutputFile)')" Condition="'@(_WebConfigsToAutoParmeterizeCS)'!='' And !%(_WebConfigsToAutoParmeterizeCS.Exclude) And Exists(%(_WebConfigsToAutoParmeterizeCS.TransformOutputFile))"/>
+    </ItemGroup>
+
+    <GetPublishingLocalizedString
+       Importance="High"
+       Condition="'@(_WebConfigsToAutoParmeterizeCS)'!='' And !%(_WebConfigsToAutoParmeterizeCS.Exclude) And Exists(%(_WebConfigsToAutoParmeterizeCS.TransformOutputFile))"
+       ID="PublishLocalizedString_AutoConnectionStringTransformConfigToTransformOutputFile"
+       ArgumentCount="2"
+       Arguments="@(_WebConfigsToAutoParmeterizeCS->'%(Identity)');%(TransformOutputFile)"
+       LogType="Message" />
+    <!-- "Auto ConnectionString Transformed @(_WebConfigsToAutoParmeterizeCS) into %(TransformOutputFile)" />-->
+
+    <ImportParametersFile  Files="$(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile)"
+                           DisableEscapeMSBuildVariable="$(ImportParametersFile_DisableEscapeMSBuildVariable)"
+                           Condition="!$(DisableAllVSGeneratedMSDeployParameter) And Exists($(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile))" >
+      <Output TaskParameter="Result" ItemName="_ImportAutoParameterizeCSTransformWebConfig"/>
+    </ImportParametersFile>
+
+    <ItemGroup>
+      <MsDeployDeclareParameters Include="@(_ImportAutoParameterizeCSTransformWebConfig)"  Condition="'%(_ImportAutoParameterizeCSTransformWebConfig.Identity)' !=''">
+        <Value>%(_ImportAutoParameterizeCSTransformWebConfig.DefaultValue)</Value>
+        <Priority>$(VsWebConfigAutoCsParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\PostAutoParameterizationWebConfigConnectionStrings.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)')" Overwrite="True" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target AutoParameterizationWebConfigConnectionStrings-->
+  <!--**********************************************************************-->
+  <PropertyGroup>
+    <AutoParameterizationWebConfigConnectionStringsDependsOn>
+      $(OnBeforeAutoParameterizationWebConfigConnectionStrings);
+      $(AutoParameterizationWebConfigConnectionStringsDependsOn);
+      PipelineTransformPhase;
+      PreAutoParameterizationWebConfigConnectionStrings;
+      AutoParameterizationWebConfigConnectionStringsCore;
+      PostAutoParameterizationWebConfigConnectionStrings;
+    </AutoParameterizationWebConfigConnectionStringsDependsOn>
+  </PropertyGroup>
+  <Target Name="AutoParameterizationWebConfigConnectionStrings" DependsOnTargets="$(AutoParameterizationWebConfigConnectionStringsDependsOn)"
+          Condition="$(AutoParameterizationWebConfigConnectionStrings)">
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PipelineTransformPhase -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <!-- Default global ExcludeTransformAssistFilesFromPublish to True. By default remove web.debug.config, web.release.config-->
+    <ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">True</ExcludeTransformAssistFilesFromPublish>
+    <!-- Targets get execute before this Target-->
+    <PipelineTransformPhaseDependsOn>
+      $(OnBeforePipelineTransformPhase);
+      $(PipelineTransformPhaseDependsOn);
+      PipeLineCollectFilesPhase;
+      TransformWebConfig;
+      ProfileTransformWebConfig;
+      InsertAdditionalWebCofigConnectionStrings;
+      MarkWebConfigAssistFilesAsExclude;
+    </PipelineTransformPhaseDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PipelineTransformPhase"
+          Outputs="@(FilesForPackagingFromProject)"
+          DependsOnTargets="$(PipelineTransformPhaseDependsOn)">
+    <!-- This is a phase separation point-->
+
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishPipelineTransformPhase"
+       LogType="Message" />
+    <!--<Message Text="Pipeline Transform Phase" />-->
+    
+    <CallTarget Targets="$(OnAfterPipelineTransformPhase)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+
+
+
+  <!--********************************************************************-->
+  <!--Target PipelineMsdeploySpecificTransformPhase -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PipelineMsdeploySpecificTransformPhaseBeforeTargets>
+      $(PipelineMsdeploySpecificTransformPhaseBeforeTargets);
+      CopyAllFilesToSingleFolderForMsdeploy;
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      PipelineDeployPhase;
+    </PipelineMsdeploySpecificTransformPhaseBeforeTargets>
+    <PipelineMsdeploySpecificTransformPhaseDependsOn>
+      $(OnBeforePipelineMsdeploySpecificTransformPhase);
+      $(PipelineMsdeploySpecificTransformPhaseDependsOn);
+      InsertAdditionalWebCofigConnectionStrings;
+      PreAutoParameterizationWebConfigConnectionStrings;
+      AutoParameterizationWebConfigConnectionStrings;
+    </PipelineMsdeploySpecificTransformPhaseDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PipelineMsdeploySpecificTransformPhase"
+          Outputs="@(FilesForPackagingFromProject)"
+          DependsOnTargets="$(PipelineMsdeploySpecificTransformPhaseDependsOn)"
+          BeforeTargets="$(PipelineMsdeploySpecificTransformPhaseBeforeTargets)"
+          AfterTargets="$(PipelineMsdeploySpecificTransformPhaseAfterTargets)">
+    <!--This is a phase separation point-->
+
+    <!--This is a phase separation point. Some deploy doesn't need to copy all file to a folder, But for MSDeploy, it required to have all file in a single folder-->
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishPipelineDeployPhaseStage1"
+       ArgumentCount="1"
+       Arguments="PipelineMsdeploySpecificTransformPhase"
+       LogType="Message" />
+    
+    <CallTarget Targets="$(OnAfterPipelineMsdeploySpecificTransformPhase)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+
+  <!--********************************************************************    -->
+  <!-- _WPPCopyWebApplication  Target                             -->
+  <!-- This will materialize all the in-memory files list which is not mark   -->
+  <!-- as excluded from packaging into the package temp folder.               -->
+  <!--ToDo: remove the condition on ContentPath Package (we are doing it now because IIS team is not support it yet-->
+  <!-- ********************************************************************   -->
+  <PropertyGroup>
+    <_WPPCopyWebApplicationDependsOn>
+      $(OnBefore_WPPCopyWebApplication);
+      $(_WPPCopyWebApplicationDependsOn);
+      CleanWebProjectOutputDir;
+      PipelineTransformPhase;
+    </_WPPCopyWebApplicationDependsOn>
+  </PropertyGroup>
+  <Target Name="_WPPCopyWebApplication"
+          DependsOnTargets="$(_WPPCopyWebApplicationDependsOn)"
+          >
+    <!-- In the case of the incremental Packaging/Publish, we need to find out the extra files and delete them-->
+    <ItemGroup>
+      <_AllExtraFilesUnderProjectOuputFolder Include="$(WebProjectOutputDir)\**" />
+      <_AllExtraFilesUnderProjectOuputFolder
+        Remove="@(FilesForPackagingFromProject->'$(WebProjectOutputDir)\%(DestinationRelativePath)')" />
+    </ItemGroup>
+    <!--Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject-->
+    <Delete Files="@(_AllExtraFilesUnderProjectOuputFolder)" />
+
+    <!-- Make sure the folder exist -->
+    <MakeDir Directories="$(WebProjectOutputDir)" Condition="!Exists('$(WebProjectOutputDir)')"/>
+
+    <GetPublishingLocalizedString
+       Importance="High"
+       ID="PublishLocalizedString_WebPublishPipelineCopyWebApplication"
+       ArgumentCount="2"
+       Arguments="$(WebPublishPipelineProjectName);$(WebProjectOutputDir)"
+       LogType="Message" />
+    <!-- <Message Importance="high"
+         Text="Copying Web Application Project Files for $(WebPublishPipelineProjectName) to $(WebProjectOutputDir)" />-->
+
+    <!-- Copy the files to WebProjectOutputDir if needed-->
+    <CopyPipelineFiles PipelineItems="@(FilesForPackagingFromProject)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="$(WebProjectOutputDir)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="True"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                       Condition="'@(FilesForPackagingFromProject)' != ''">
+    </CopyPipelineFiles>
+
+
+    <!--Remove all empty folder that's left. Since it is not critical, we only log warning if we failed to delete empty folder.-->
+    <RemoveEmptyDirectories Directories="$(WebProjectOutputDir)"  LogErrorAsWarning="True" />
+    <MakeDir Directories="$(WebProjectOutputDir)" Condition="!Exists('$(WebProjectOutputDir)')"/>
+
+    <CallTarget Targets="$(OnAfter_WPPCopyWebApplication)" RunEachTargetSeparately="False" />
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PipelinePreDeployCopyAllFilesToOneFolder -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PipelinePreDeployCopyAllFilesToOneFolderDependsOn>
+      $(OnBeforePipelinePreDeployCopyAllFilesToOneFolder);
+      $(PipelinePreDeployCopyAllFilesToOneFolderDependsOn);
+      PipelineTransformPhase;
+      CopyAllFilesToSingleFolderForPackage;
+    </PipelinePreDeployCopyAllFilesToOneFolderDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PipelinePreDeployCopyAllFilesToOneFolder"
+          DependsOnTargets="$(PipelinePreDeployCopyAllFilesToOneFolderDependsOn)">
+
+    <!--This is a phase separation point.
+        Some publish methods do not require copying all the files, but for MSDeploy
+        we need to copy all the files to one location -->
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishPipelineDeployPhaseStage1"
+       ArgumentCount="1"
+       Arguments="PipelinePreDeployCopyAllFilesToOneFolder"
+       LogType="Message" />
+    
+    <CallTarget Targets="$(OnAfterPipelinePreDeployCopyAllFilesToOneFolder)" RunEachTargetSeparately="False" />
+  </Target>
+
+  <!--
+  CopyAllFilesToSingleFolderForMsdeploy target.
+    This will copy all the files which are not marked to be excluded into the 
+    package temp folder.
+  -->
+  <PropertyGroup>
+    <OnBeforeCopyAllFilesToSingleFolderForMsdeploy Condition="$(CleanWPPAllFilesInSingleFolder)">
+      $(OnBeforeCopyAllFilesToSingleFolderForMsdeploy);
+      CleanWebsitesWPPAllFilesInSingleFolder;
+    </OnBeforeCopyAllFilesToSingleFolderForMsdeploy>
+    <CopyAllFilesToSingleFolderForMsdeployDependsOn>
+      $(OnBeforeCopyAllFilesToSingleFolderForMsdeploy);
+      $(CopyAllFilesToSingleFolderForMsdeployDependsOn);
+    </CopyAllFilesToSingleFolderForMsdeployDependsOn>
+  </PropertyGroup>
+  <Target Name="CopyAllFilesToSingleFolderForMsdeploy"
+          DependsOnTargets="$(CopyAllFilesToSingleFolderForMsdeployDependsOn)">
+
+    <!--  In the case of the incremental Packaging/Publish, we need to find out the extra file and delete them -->
+    <ItemGroup>
+      <_AllExtraFilesUnderTempFolder Include="$(WPPAllFilesInSingleFolder)\**" />
+      <_AllExtraFilesUnderTempFolder
+        Remove="@(FilesForPackagingFromProject->'$(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)')" />
+    </ItemGroup>
+    <!--Remove all extra files in the temp folder that are not in the @(FilesForPackagingFromProject-->
+    <Delete Files="@(_AllExtraFilesUnderTempFolder)" />
+
+    <!-- Make sure the folder exist -->
+    <MakeDir Directories="$(WPPAllFilesInSingleFolder)" Condition="!Exists('$(WPPAllFilesInSingleFolder)')"/>
+
+    <GetPublishingLocalizedString
+       Importance="High"
+       ID="PublishLocalizedString_WebPublishPipelineMaterializeAllFilesToTempDir"
+       ArgumentCount="1"
+       Arguments="$(WPPAllFilesInSingleFolder)"
+       LogType="Message" />
+
+    <!--Force Copy Of all file to the $(WPPAllFilesInSingleFolder) if needed-->
+    <CopyPipelineFiles PipelineItems="@(FilesForPackagingFromProject)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="$(WPPAllFilesInSingleFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="True"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                       Condition="'@(FilesForPackagingFromProject)' != ''">
+      <Output TaskParameter="ResultPipelineItems" ItemName="_FilesForPackagingFromProjectTempory"/>
+    </CopyPipelineFiles>
+
+    <ItemGroup>
+      <FileWrites Include="@(_FilesForPackagingFromProjectTempory)" />
+    </ItemGroup>
+
+    <!--Workaround the MSBuild 2.0 limitation-->
+    <ItemGroup>
+      <FilesForPackagingFromProject Remove="@(FilesForPackagingFromProject)" />
+      <FilesForPackagingFromProject Include="@(_FilesForPackagingFromProjectTempory)" />
+    </ItemGroup>
+
+    <!--Remove all Empty folder that's left. Since it is not critical, we only log warning if we failed to delete empty folder.-->
+    <RemoveEmptyDirectories Directories="$(WPPAllFilesInSingleFolder)"  LogErrorAsWarning="True" />
+    <MakeDir Directories="$(WPPAllFilesInSingleFolder)" Condition="!Exists('$(WPPAllFilesInSingleFolder)')"/>
+
+    <!--Now we are all file in the single folder-->
+    <PropertyGroup>
+      <IsWPPAllFilesInSingleFolder>True</IsWPPAllFilesInSingleFolder>
+    </PropertyGroup>
+
+    <CallTarget Targets="$(OnAfterCopyAllFilesToSingleFolderForMsdeploy)" RunEachTargetSeparately="False" />
+
+  </Target>
+
+  <!--Target PipelineCopyAllFilesToOneFolderForMsdeploy -->
+  <PropertyGroup>
+    <PipelineCopyAllFilesToOneFolderForMsdeployDependsOn>
+      $(OnBeforePipelineCopyAllFilesToOneFolderForMsdeploy);
+      $(PipelineCopyAllFilesToOneFolderForMsdeployDependsOn);
+      PipelineTransformPhase;
+      CopyAllFilesToSingleFolderForMsdeploy;
+    </PipelineCopyAllFilesToOneFolderForMsdeployDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PipelineCopyAllFilesToOneFolderForMsdeploy"
+          DependsOnTargets="$(PipelineCopyAllFilesToOneFolderForMsdeployDependsOn)">
+
+    <!-- This is a phase separation point. -->
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishPipelineDeployPhaseStage1"
+       ArgumentCount="1"
+       Arguments="PipelineCopyAllFilesToOneFolderForMsdeploy"
+       LogType="Message" />
+    
+    <CallTarget Targets="$(OnAfterPipelineCopyAllFilesToOneFolderForMsdeploy)" RunEachTargetSeparately="False" />
+  </Target>
+  
+  
+  <Target Name="GatherAllFilesToPublish" DependsOnTargets="PipelineTransformPhase;CopyAllFilesToSingleFolderForPackage;" />
+
+  <Target Name="_CheckPublishToolsUpToDate" Condition="'$(_WebPublishProfileFileWillBeImported)'=='true'">
+    <PublishToolsVersionCheck VersionInPublishProfile="$(_MinWebPublishToolsVersion)" />
+  </Target>  
+  
+  <!--GetProjectProperties Task-->
+  <PropertyGroup>
+    <GetProjectWebPropertiesDependsOn Condition="'$(GetProjectWebPropertiesDependsOn)'==''">
+      _CheckPublishToolsUpToDate
+    </GetProjectWebPropertiesDependsOn>
+  </PropertyGroup>
+
+  <Target Name="GetProjectWebProperties"
+          Condition="'$(UseIis)' == '' Or '$(IisUrl)' == '' Or '$(LocalIisVersion)' == '' Or '$(DestinationIisVersion)' ==''"
+          DependsOnTargets="$(GetProjectWebPropertiesDependsOn)">
+
+    <PropertyGroup>
+      <LocalIisVersion>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Inetstp@MajorVersion)</LocalIisVersion>
+      <LocalIisVersion Condition="'$(LocalIisVersion)'==''">0</LocalIisVersion>
+    </PropertyGroup>
+
+    <GetProjectProperties ProjectFileFullPath="$(WebPublishPipelineWAPProjectSettings)">
+      <Output TaskParameter="UseIis"  PropertyName="UseIis" Condition="'$(UseIis)' == ''" />
+      <Output TaskParameter="IisUrl"  PropertyName="IisUrl" Condition="'$(IisUrl)' == ''"/>
+    </GetProjectProperties>
+
+    <PropertyGroup>
+      <_DeploymentUseIis Condition="'$(_DeploymentUseIis)'=='' And $(IncludeIisSettings)">$(UseIis)</_DeploymentUseIis>
+      <_DeploymentUseIis Condition="'$(_DeploymentUseIis)'==''">False</_DeploymentUseIis>
+      <_DeploymentAsIisApp>$(DeployAsIisApp)</_DeploymentAsIisApp>
+      <_DeploymentAsIisApp Condition="$(_DeploymentUseIis)">False</_DeploymentAsIisApp>
+      <DestinationUseIis Condition="'$(DestinationUseIis)'=='' And $(IncludeIisSettings)">$(UseIis)</DestinationUseIis>
+      <DestinationUseIis Condition="'$(DestinationUseIis)'==''">False</DestinationUseIis>
+      <_DeploymentUseIISExpressHint>$(UseIISExpress)</_DeploymentUseIISExpressHint>
+      <_DeploymentUseIISExpressHint Condition="'$(_DeploymentUseIISExpressHint)'==''">False</_DeploymentUseIISExpressHint>
+    </PropertyGroup>
+
+    <!--We should only get IIS relative information when $(IncludeIisSettings) is true-->
+    <MapUriToIisWebServer Condition="$(UseIis) And ('$(IisUrl)' != '') And $(IncludeIisSettings)"
+      ProjectIisUrl="$(IisUrl)"
+      UseIISExpressHintFlag="$(_DeploymentUseIISExpressHint)">
+      <Output TaskParameter="MetakeyPath" PropertyName="_MSDeployIisUrlSource_MetakeyPathSearchPath"  />
+      <Output TaskParameter="MetakeyPathUsingSiteName" PropertyName="_MSDeployIisUrlSource_MetakeyPath"  />
+      <Output TaskParameter="AppHostConfigPath" PropertyName="_MSDeployIisUrlSource_AppHostConfigPath"  />
+      <Output TaskParameter="IisWebsiteId" PropertyName="IisUrl_SiteID"  />
+      <Output TaskParameter="IisWebsiteFriendlyName" PropertyName="IisUrl_SiteFriendlyName"  />
+      <Output TaskParameter="SiteRelativePath" PropertyName="IisUrl_SiteRelativePath"  />
+      <Output TaskParameter="WebServerAppHostConfigDirectory" PropertyName="IisServer_WebServerAppHostConfigDirectory"  />
+      <Output TaskParameter="WebServerDirectory" PropertyName="IisServer_WebServerDirectory"  />
+      <Output TaskParameter="WebServerManifest" PropertyName="IisServer_WebServerManifest"  />
+      <Output TaskParameter="IisMajorVersion" PropertyName="IisServer_IisMajorVersion"  />
+      <Output TaskParameter="ApplicationPoolName" PropertyName="IisServer_IisAppPoolName"  />
+    </MapUriToIisWebServer>
+
+    <FilterByItems PipelineItems="@(_IISApplicationPool)"
+                   Filter="$(IisServer_IisAppPoolName)">
+      <Output TaskParameter="InFilter" ItemName="_IISApplicationPoolFound"/>
+    </FilterByItems>
+
+    <PropertyGroup>
+      <_Destination_IisServer_IisAppPoolName Condition="'@(_IISApplicationPoolFound)'!=''">%(_IISApplicationPoolFound.DestinationIISApplicationPool)</_Destination_IisServer_IisAppPoolName>
+      <_Destination_IisServer_IisAppPoolName Condition="'$(_Destination_IisServer_IisAppPoolName)'==''">$(IisServer_IisAppPoolName)</_Destination_IisServer_IisAppPoolName>
+    </PropertyGroup>
+    
+    <PropertyGroup>
+      <_IsRootWebsite>False</_IsRootWebsite>
+      <_IsRootWebsite Condition="('$(IisUrl_SiteRelativePath)' == '/')">True</_IsRootWebsite>
+      <DefaultDeployIisAppPath Condition="$(_IsRootWebsite)">$(DefaultDeployIisRootAppPath)</DefaultDeployIisAppPath>
+      <LocalIisVersion Condition="'$(IisServer_IisMajorVersion)' != '0' And '$(IisServer_IisMajorVersion)' != '' ">$(IisServer_IisMajorVersion)</LocalIisVersion>
+      <DestinationIisVersion Condition="'$(DestinationIisVersion)'==''">$(LocalIisVersion)</DestinationIisVersion>
+    </PropertyGroup>
+
+    <!-- elevate this property out to global scope to be used by transport target-->
+    <CreateProperty Value="$(_DeploymentUseIis)">
+      <Output TaskParameter="Value" PropertyName="IncludeIisSettingsOnPublish"/>
+    </CreateProperty>
+  </Target>
+
+  <!-- 
+  GetMSDeployInstalledVersionPath 
+    This target will determine where msdeploy.exe has been installed
+  -->
+  <PropertyGroup>
+    <GetMSDeployInstalledVersionPathDependsOn Condition="'$(GetMSDeployInstalledVersionPathDependsOn)'==''">
+    </GetMSDeployInstalledVersionPathDependsOn>
+  </PropertyGroup>
+
+  <Target Name="GetMSDeployInstalledVersionPath"
+          Condition="'$(_MSDeployVersionsToTry)' == '' Or '$(MSDeployPath)' == '' "
+          DependsOnTargets="$(GetMSDeployInstalledVersionPathDependsOn)">
+
+    <!--get a list of subkeyNames from the registry-->
+    <GetLocalMachineRegistrySubKeyNames Key="SOFTWARE\Microsoft\IIS Extensions\MSDeploy">
+      <Output TaskParameter="Result" ItemName="_MSDeployInstalledVersionPathFromRegistry"/>
+    </GetLocalMachineRegistrySubKeyNames>
+
+    <ItemGroup>
+      <_MSDeployInstalledVersionPath Include="@(_MSDeployInstalledVersionPathFromRegistry)">
+        <InstallPath>$([MSBuild]::GetRegistryValue('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\%(_MSDeployInstalledVersionPathFromRegistry.Identity)', 'InstallPath'))</InstallPath>
+        <DllVersionString>$([MSBuild]::GetRegistryValue('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\%(_MSDeployInstalledVersionPathFromRegistry.Identity)', 'Version'))</DllVersionString>
+      </_MSDeployInstalledVersionPath>
+      <_MSDeployInstalledVersions Include="@(_MSDeployInstalledVersionPath)" Condition="'%(_MSDeployInstalledVersionPath.InstallPath)'!='' And  '%(_MSDeployInstalledVersionPath.DllVersionString)'!=''" >
+        <DllVersion>$([System.Version]::New(%(_MSDeployInstalledVersionPath.DllVersionString)).Major).$([System.Version]::New(%(_MSDeployInstalledVersionPath.DllVersionString)).Minor)</DllVersion>
+      </_MSDeployInstalledVersions>
+    </ItemGroup>
+
+    <FilterByItems PipelineItems="@(_MSDeployInstalledVersions)"
+                   SourceMetadataName="DllVersion"
+                   Condition="'$(_MSDeployVersionsToTry)' != ''"
+                   Filter="$(_MSDeployVersionsToTry)">
+      <Output TaskParameter="OutFilter" ItemName="_NeedtoRemove_MSDeployInstalledVersions"/>
+    </FilterByItems>
+
+    <ItemGroup>
+      <_MSDeployInstalledVersions Remove="@(_NeedtoRemove_MSDeployInstalledVersions)" />
+    </ItemGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\MSDeployInstalledVersions.txt"
+                      Lines="@(_MSDeployInstalledVersions->'
+                      Identity:%(Identity)
+                      InstallPath:%(InstallPath) 
+                      DllVersionString:%(DllVersionString) 
+                      DllVersion:%(DllVersion)')" Overwrite="True" />
+
+
+    
+    <PropertyGroup>
+      <_DefaultMSDeployMaxVersion>0</_DefaultMSDeployMaxVersion>
+      <_DefaultMSDeployMaxVersion Condition="'%(_MSDeployInstalledVersions.Identity)' != ''">$([System.Math]::Max($([System.Convert]::ToUInt32('$(_DefaultMSDeployMaxVersion)')),$([System.Convert]::ToUInt32('%(_MSDeployInstalledVersions.Identity)'))))</_DefaultMSDeployMaxVersion>
+    </PropertyGroup>
+
+    <GetPublishingLocalizedString
+     Condition="'$(_DefaultMSDeployMaxVersion)' != ''"
+     ID="PublishLocalizedString_MsBuildPropertySettingValue"
+     ArgumentCount="2"
+     Arguments="_DefaultMSDeployMaxVersion;$(_DefaultMSDeployMaxVersion)"
+     LogType="Message" />
+
+    <ItemGroup>
+      <_SelectedMSDeployMaxVersion Include="@(_MSDeployInstalledVersions)"
+                               Condition="'%(_MSDeployInstalledVersions.Identity)' =='$(_DefaultMSDeployMaxVersion)' " />
+    </ItemGroup>
+
+    <!--If $(MSDeployPath) is specified, we try the best to match the matching msdeploy dll version-->
+    <ItemGroup Condition="'$(_MSDeployVersionsToTry)' == '' And '$(MSDeployPath)' != '' ">
+      <_SelectedMSDeployPath Include="@(_MSDeployInstalledVersions)"
+                             Condition="'%(_MSDeployInstalledVersions.InstallPath)' =='$(MSDeployPath)' " />
+    </ItemGroup>
+    <PropertyGroup Condition="'$(_MSDeployVersionsToTry)' == '' And '$(MSDeployPath)' != '' " >
+      <_MSDeployVersionsToTry>@(_SelectedMSDeployPath->'%(DllVersion)')</_MSDeployVersionsToTry>
+    </PropertyGroup>
+
+    <!--
+    If $(MSDeployPath) is not specified and $(_MSDeployVersionToTry) is not specified.  
+    We use the Higest version of the MSDeploy Version that's currently installed--> 
+    <PropertyGroup>
+      <_MSDeployVersionsToTry  Condition="'$(_MSDeployVersionsToTry)' == ''">@(_SelectedMSDeployMaxVersion->'%(DllVersion)')</_MSDeployVersionsToTry>
+      <MSDeployPath Condition="'$(MSDeployPath)' == ''">@(_SelectedMSDeployMaxVersion->'%(InstallPath)')</MSDeployPath>
+    </PropertyGroup>
+
+    <GetPublishingLocalizedString
+     Condition="'$(_MSDeployVersionsToTry)' != ''"
+     ID="PublishLocalizedString_MsBuildPropertySettingValue"
+     ArgumentCount="2"
+     Arguments="_MSDeployVersionsToTry;$(_MSDeployVersionsToTry)"
+     LogType="Message" />
+    
+    <GetPublishingLocalizedString
+     Condition="'$(MSDeployPath)' != ''"
+     ID="PublishLocalizedString_MsBuildPropertySettingValue"
+     ArgumentCount="2"
+     Arguments="MSDeployPath;$(MSDeployPath)"
+     LogType="Message" />
+
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Package target -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PackageDependsOn Condition="'$(PackageDependsOn)'==''">
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      ImportPublishingParameterValues;
+      PipelineMsdeploySpecificTransformPhase;
+    </PackageDependsOn>
+  </PropertyGroup>
+  <Target Name="Package"
+          Condition="$(_CreatePackage)"
+          DependsOnTargets="$(PackageDependsOn)">
+
+    <MakeDir Condition="$(EnablePackageProcessLoggingAndAssert) And !Exists('$(PackageLogDir)')"
+             Directories="$(PackageLogDir)" />
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(PackageLogDir)\Prepackage.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      From:%(Identity) 
+                      DestinationRelativePath:%(DestinationRelativePath) 
+                      Exclude:%(Exclude) 
+                      FromTarget:%(FromTarget) 
+                      Category:%(Category)
+                      ProjectFileType:%(ProjectFileType)')" Overwrite="True" />
+
+
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishPipelineMSDeploySettings"
+       LogType="Message" />
+
+    <GetPublishingLocalizedString
+          Condition="'$(LocalIisVersion)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="LocalIisVersion;$(LocalIisVersion)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="'$(DestinationIisVersion)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="DestinationIisVersion;$(DestinationIisVersion)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="'$(UseIis)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="UseIis;$(UseIis)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+      Condition="'$(IisUrl)' != ''"
+      ID="PublishLocalizedString_MsBuildPropertySettingValue"
+      ArgumentCount="2"
+      Arguments="IisUrl;$(IisUrl)"
+      LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="'$(IncludeIisSettings)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="IncludeIisSettings;$(IncludeIisSettings)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="'$(_DeploymentUseIis)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="_DeploymentUseIis;$(_DeploymentUseIis)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="'$(DestinationUseIis)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="DestinationUseIis;$(DestinationUseIis)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="'$(IisUrl_SiteID)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="IisUrl_SiteID;$(IisUrl_SiteID)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="'$(IisUrl_SiteFriendlyName)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="IisUrl_SiteFriendlyName;$(IisUrl_SiteFriendlyName)"
+          LogType="Message" />
+    <GetPublishingLocalizedString
+          Condition="'$(IisUrl_SiteRelativePath)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="IisUrl_SiteRelativePath;$(IisUrl_SiteRelativePath)"
+          LogType="Message" />
+
+
+    <GetPublishingLocalizedString
+          Condition="'$(IisServer_IisAppPoolName)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="IisServer_IisAppPoolName;$(IisServer_IisAppPoolName)"
+          LogType="Message" />
+
+    
+    <GetPublishingLocalizedString
+          Condition="'$(_Destination_IisServer_IisAppPoolName)' != ''"
+          ID="PublishLocalizedString_MsBuildPropertySettingValue"
+          ArgumentCount="2"
+          Arguments="_Destination_IisServer_IisAppPoolName;$(_Destination_IisServer_IisAppPoolName)"
+          LogType="Message" />
+
+
+    <!--"Invoking MSDeploy to generate the package 
+             Machine IIS Version is $(LocalIisVersion)
+             Deploy IIS Version is $(DestinationIisVersion)
+             UseIis is $(UseIis)
+             IisUrl is $(IisUrl)
+             IncludeIisSettings is $(IncludeIisSettings)
+             _DeploymentUseIis is $(_DeploymentUseIis)
+             DestinationUseIis is $(DestinationUseIis)
+             IisUrl_SiteID is $(IisUrl_SiteID)
+             IisUrl_SiteFriendlyName is $(IisUrl_SiteFriendlyName)
+             IisUrl_SiteRelativePath is $(IisUrl_SiteRelativePath)"
+             />-->
+    <ItemGroup>
+      <_PackageFileLocation Include="$(PackageFileName)" />
+    </ItemGroup>
+
+    <PropertyGroup>
+      <_PackageRoot Condition="$(PackageAsSingleFile)">@(_PackageFileLocation->'%(RootDir)%(Directory)')</_PackageRoot>
+      <_PackageRoot Condition="!$(PackageAsSingleFile)">$(PackageArchiveRootDir)</_PackageRoot>
+    </PropertyGroup>
+
+    <MakeDir Condition="!Exists($(_PackageRoot))"  Directories="$(_PackageRoot)" />
+    <CallTarget Targets="PackageUsingManifest"/>
+  </Target>
+
+  <PropertyGroup>
+    <OnBeforeCopyAllFilesToSingleFolderForPackage Condition="$(CleanWPPAllFilesInSingleFolder)">
+      $(OnBeforeCopyAllFilesToSingleFolderForPackage);
+      CleanWebsitesWPPAllFilesInSingleFolder;
+    </OnBeforeCopyAllFilesToSingleFolderForPackage>
+    <CopyAllFilesToSingleFolderForPackageDependsOn>
+      $(OnBeforeCopyAllFilesToSingleFolderForPackage);
+      $(CopyAllFilesToSingleFolderForPackageDependsOn);
+    </CopyAllFilesToSingleFolderForPackageDependsOn>
+  </PropertyGroup>
+  <Target Name="CopyAllFilesToSingleFolderForPackage"
+          DependsOnTargets="$(CopyAllFilesToSingleFolderForPackageDependsOn)"
+          >
+
+    <!-- In the case of the incremental Packaging/Publish, we need to find out the extra file and delete them-->
+    <ItemGroup>
+      <_AllExtraFilesUnderTempFolder Include="$(WPPAllFilesInSingleFolder)\**" />
+      <_AllExtraFilesUnderTempFolder
+        Remove="@(FilesForPackagingFromProject->'$(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)')" />
+    </ItemGroup>
+    <!--Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject-->
+    <Delete Files="@(_AllExtraFilesUnderTempFolder)" />
+
+    <MakeDir Directories="$(WPPAllFilesInSingleFolder)" Condition="!Exists('$(WPPAllFilesInSingleFolder)')"/>
+
+    <GetPublishingLocalizedString
+       Importance="High"
+       ID="PublishLocalizedString_WebPublishPipelineMaterializeAllFilesToTempDir"
+       ArgumentCount="1"
+       Arguments="$(WPPAllFilesInSingleFolder)"
+       LogType="Message" />
+    
+    <!--Force Copy Of all file to the $(WPPAllFilesInSingleFolder) if needed-->
+    <CopyPipelineFiles PipelineItems="@(FilesForPackagingFromProject)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="$(WPPAllFilesInSingleFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="True"
+                           DeleteItemsMarkAsExcludeTrue ="True"
+                       Condition="'@(FilesForPackagingFromProject)' != ''">
+      <Output TaskParameter="ResultPipelineItems" ItemName="_FilesForPackagingFromProjectTempory"/>
+    </CopyPipelineFiles>
+
+    <ItemGroup>
+      <FileWrites Include="@(_FilesForPackagingFromProjectTempory)" />
+    </ItemGroup>
+    
+    <!--Workaround the MSBuild 2.0 limitation-->
+    <ItemGroup>
+      <FilesForPackagingFromProject Remove="@(FilesForPackagingFromProject)" />
+      <FilesForPackagingFromProject Include="@(_FilesForPackagingFromProjectTempory)" />
+    </ItemGroup>
+
+    <!--Remove all Empty folder that's left. Since it is not critical, we only log warning if we failed to delete empty folder.-->
+    <RemoveEmptyDirectories Directories="$(WPPAllFilesInSingleFolder)"  LogErrorAsWarning="True" />
+    <MakeDir Directories="$(WPPAllFilesInSingleFolder)" Condition="!Exists('$(WPPAllFilesInSingleFolder)')"/>
+
+    <!--Now we are all file in the single folder-->
+    <PropertyGroup>
+      <IsWPPAllFilesInSingleFolder>True</IsWPPAllFilesInSingleFolder>
+    </PropertyGroup>
+
+    <CallTarget Targets="$(OnAfterCopyAllFilesToSingleFolderForPackage)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- AddIis7ToSourceManifest  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddIis7ToSourceManifest Condition="'$(BeforeAddIis7ToSourceManifest)'==''">
+    </BeforeAddIis7ToSourceManifest>
+    <AfterAddIis7ToSourceManifest Condition="'$(AfterAddIis7ToSourceManifest)'==''">
+    </AfterAddIis7ToSourceManifest>
+    <AddIis7ToSourceManifestDependsOn Condition="'$(AddIis7ToSourceManifestDependsOn)' == ''">
+      $(BeforeAddIis7ToSourceManifest);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+    </AddIis7ToSourceManifestDependsOn>
+  </PropertyGroup>
+  <Target Name="AddIis7ToSourceManifest"
+          Condition="$(_DeploymentUseIis) And ($(LocalIisVersion) &gt;= '7')"
+          DependsOnTargets="$(AddIis7ToSourceManifestDependsOn)">
+    <GetPublishingLocalizedString
+       Condition="'$(IisUrl)'==''"
+       ID="PublishLocalizedString_ErrorUseIisIsTrueButIisUrlIsEmpty"
+       LogType="Error" />
+    
+    <Error Text="Target AddIis7ToSourceManifest failed"
+           Condition="'$(IisUrl)'==''" />
+      
+    <ItemGroup>
+      <MsDeploySourceManifest Include="appHostConfig">
+        <Path>$(_MSDeployIisUrlSource_AppHostConfigPath)</Path>
+      </MsDeploySourceManifest>
+    </ItemGroup>
+
+    <CallTarget Condition="'$(AfterAddIis7ToSourceManifest)' != ''"
+                Targets="$(AfterAddIis7ToSourceManifest)"
+                RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- AddDeclareParametersItemsForIis7  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddDeclareParametersItemsForIis7 Condition="'$(BeforeAddDeclareParametersItemsForIis7)'==''">
+    </BeforeAddDeclareParametersItemsForIis7>
+    <AfterAddDeclareParametersItemsForIis7 Condition="'$(AfterAddDeclareParametersItemsForIis7)'==''">
+    </AfterAddDeclareParametersItemsForIis7>
+    <AddDeclareParametersItemsForIis7DependsOn Condition="'$(AddDeclareParametersItemsForIis7DependsOn)' == ''">
+      $(BeforeAddDeclareParametersItemsForIis7);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+    </AddDeclareParametersItemsForIis7DependsOn>
+  </PropertyGroup>
+  <Target Name="AddDeclareParametersItemsForIis7"
+          Condition="$(_DeploymentUseIis) And ($(LocalIisVersion) &gt;= '7')"
+          DependsOnTargets="$(AddDeclareParametersItemsForIis7DependsOn)">
+    <!--Parameterize the default value of the Path-->
+    <EscapeTextForRegularExpressions Text="$(_MSDeployIisUrlSource_AppHostConfigPath)">
+      <Output TaskParameter="Result" PropertyName="_EscapeRegEx_MSDeployIisUrlSource_AppHostConfigPath" />
+    </EscapeTextForRegularExpressions>
+    <ItemGroup Condition="!$(DisableAllVSGeneratedMSDeployParameter) And $(_DeploymentUseIis) And ($(LocalIisVersion) &gt;= '7')" >
+      <MsDeployDeclareParameters Include="$(DeployParameterIISAppName)">
+        <Kind>ProviderPath</Kind>
+        <Scope>AppHostConfig</Scope>
+        <Match>^$(_EscapeRegEx_MSDeployIisUrlSource_AppHostConfigPath)$</Match>
+        <Description>$(DeployParameterIISAppNameDescription)</Description>
+        <DefaultValue>$(_MSDeployIisAppPathIIS7)</DefaultValue>
+        <Value>$(_MSDeployIisAppPathIIS7)</Value>
+        <Tags>IisApp</Tags>
+        <Priority>$(VsIisAppParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+
+      <MsDeployDeclareParameters Include="$(DeployParameterIISAppPoolName)"
+                                Condition="'$(IisServer_IisAppPoolName)' != '' And '$(ParameterApplicationPool)' == 'True'">
+        <Kind>DeploymentObjectAttribute</Kind>
+        <Scope>application</Scope>
+        <Match>application[@applicationPool='$(IisServer_IisAppPoolName)']/@applicationPool</Match>
+        <Description>$(DeployParameterIISAppPoolNameDescription)</Description>
+        <DefaultValue>$(_Destination_IisServer_IisAppPoolName)</DefaultValue>
+        <Value>$(_Destination_IisServer_IisAppPoolName)</Value>
+        <Tags></Tags>
+        <Priority>$(VsIisAppParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+     
+    </ItemGroup>
+
+
+    <CallTarget Condition="'$(AfterAddDeclareParametersItemsForIis7)' != ''"
+                Targets="$(AfterAddDeclareParametersItemsForIis7)"
+                RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- AddIis6ToSourceManifest  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddIis6ToSourceManifest Condition="'$(BeforeAddIis6ToSourceManifest)'==''">
+    </BeforeAddIis6ToSourceManifest>
+    <AfterAddIis6ToSourceManifest Condition="'$(AfterAddIis6ToSourceManifest)'==''">
+    </AfterAddIis6ToSourceManifest>
+    <AddIis6ToSourceManifestDependsOn Condition="'$(AddIis6ToSourceManifestDependsOn)' == ''">
+      $(BeforeAddIis6ToSourceManifest);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+    </AddIis6ToSourceManifestDependsOn>
+  </PropertyGroup>
+  <Target Name="AddIis6ToSourceManifest"
+          Condition="$(_DeploymentUseIis) And ($(LocalIisVersion) &lt; '7') "
+          DependsOnTargets="$(AddIis6ToSourceManifestDependsOn)">
+
+    <GetPublishingLocalizedString
+       Condition="'$(IisUrl)'==''"
+       ID="PublishLocalizedString_ErrorUseIisIsTrueButIisUrlIsEmpty"
+       LogType="Error" />
+
+    <Error Text="Target AddIis6ToSourceManifest failed"
+          Condition="'$(IisUrl)'==''" />
+    
+    <ItemGroup>
+      <MsDeploySourceManifest Include="MetaKey">
+        <Path>$(_MSDeployIisUrlSource_MetakeyPath)</Path>
+      </MsDeploySourceManifest>
+    </ItemGroup>
+    <CallTarget Condition="'$(AfterAddIis6ToSourceManifest)' != ''"
+                Targets="$(AfterAddIis6ToSourceManifest)"
+                RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- AddDeclareParametersItemsForIis6  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddDeclareParametersItemsForIis6 Condition="'$(BeforeAddDeclareParametersItemsForIis6)'==''">
+    </BeforeAddDeclareParametersItemsForIis6>
+    <AfterAddDeclareParametersItemsForIis6 Condition="'$(AfterAddDeclareParametersItemsForIis6)'==''">
+    </AfterAddDeclareParametersItemsForIis6>
+    <AddDeclareParametersItemsForIis6DependsOn Condition="'$(AddDeclareParametersItemsForIis6DependsOn)' == ''">
+      $(BeforeAddDeclareParametersItemsForIis6);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+    </AddDeclareParametersItemsForIis6DependsOn>
+  </PropertyGroup>
+  <Target Name="AddDeclareParametersItemsForIis6"
+          Condition="$(_DeploymentUseIis) And ($(LocalIisVersion) &lt; '7') "
+          DependsOnTargets="$(AddDeclareParametersItemsForIis6DependsOn)">
+    <GetPublishingLocalizedString
+       Condition="'$(IisUrl)'==''"
+       ID="PublishLocalizedString_ErrorUseIisIsTrueButIisUrlIsEmpty"
+       LogType="Error" />
+    
+    <Error Text="Target AddDeclareParametersItemsForIis6 failed"
+          Condition="'$(IisUrl)'==''" />
+
+    <!--Parameterize the default value of the Path  Note that IIS6 have to use the /lm/w3svc/1/xxxx-->
+    <EscapeTextForRegularExpressions Text="$(_MSDeployIisUrlSource_MetakeyPath)">
+      <Output TaskParameter="Result" PropertyName="_EscapeRegEx_MSDeployIisUrlSource_MetakeyPathSearchPath" />
+    </EscapeTextForRegularExpressions>
+
+    <ItemGroup
+      Condition="!$(DisableAllVSGeneratedMSDeployParameter) And $(_DeploymentUseIis) And ($(LocalIisVersion) &lt; '7') ">
+      <MsDeployDeclareParameters Include="$(DeployParameterIISAppName)" >
+        <Kind>ProviderPath</Kind>
+        <Scope>MetaKey</Scope>
+        <Match>^$(_EscapeRegEx_MSDeployIisUrlSource_MetakeyPathSearchPath)$</Match>
+        <Description>$(DeployParameterIISAppNameDescription)</Description>
+        <DefaultValue>$(_MSDeployIisAppPathIIS6)</DefaultValue>
+        <Value>$(_MSDeployIisAppPathIIS6)</Value>
+        <Tags>IisApp</Tags>
+        <Priority>$(VsIisAppParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+
+      <MsDeployDeclareParameters Include="$(DeployParameterIISAppPoolName)"
+                              Condition="'$(IisServer_IisAppPoolName)' != '' And '$(ParameterApplicationPool)' == 'True' And '$(IIS6ParameterApplicationPool)' == 'True'" >
+        <Kind>DeploymentObjectAttribute</Kind>
+        <Scope>metaProperty</Scope>
+        <Match>metaProperty[@name='AppPoolId' and @value='$(IisServer_IisAppPoolName)']/@value</Match>
+        <Description>$(DeployParameterIISAppPoolNameDescription)</Description>
+        <DefaultValue>$(_Destination_IisServer_IisAppPoolName)</DefaultValue>
+        <Value>$(_Destination_IisServer_IisAppPoolName)</Value>
+        <Tags></Tags>
+        <Priority>$(VsIisAppParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+
+
+    </ItemGroup>
+
+    <CallTarget Condition="'$(AfterAddDeclareParametersItemsForIis6)' != ''"
+                Targets="$(AfterAddDeclareParametersItemsForIis6)"
+                RunEachTargetSeparately="false" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- AddIisSettingAndFileContentsToSourceManifest  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddIisSettingAndFileContentsToSourceManifest Condition="'$(BeforeAddIisSettingAndFileContentsToSourceManifest)'==''">
+    </BeforeAddIisSettingAndFileContentsToSourceManifest>
+    <AfterAddIisSettingAndFileContentsToSourceManifest Condition="'$(AfterAddIisSettingAndFileContentsToSourceManifest)'==''">
+    </AfterAddIisSettingAndFileContentsToSourceManifest>
+    <AddIisSettingAndFileContentsToSourceManifestDependsOn Condition="'$(AddIisSettingAndFileContentsToSourceManifestDependsOn)' == ''">
+      $(BeforeAddIisSettingAndFileContentsToSourceManifest);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+      AddContentPathToSourceManifest;
+    </AddIisSettingAndFileContentsToSourceManifestDependsOn>
+  </PropertyGroup>
+  <Target Name="AddIisSettingAndFileContentsToSourceManifest"
+          DependsOnTargets="$(AddIisSettingAndFileContentsToSourceManifestDependsOn)">
+    <!--Create the Source Manifest file-->
+    <CallTarget Targets="$(AfterAddIisSettingAndFileContentsToSourceManifest)" RunEachTargetSeparately="false" Condition="'$(AfterAddIisSettingAndFileContentsToSourceManifest)' != ''" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- AddContentPathToSourceManifest  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddContentPathToSourceManifest Condition="'$(BeforeAddContentPathToSourceManifest)'==''">
+    </BeforeAddContentPathToSourceManifest>
+    <AfterAddContentPathToSourceManifest Condition="'$(AfterAddContentPathToSourceManifest)'==''">
+    </AfterAddContentPathToSourceManifest>
+    <AddContentPathToSourceManifestDependsOn Condition="'$(AddContentPathToSourceManifestDependsOn)' == ''">
+      $(BeforeAddContentPathToSourceManifest);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+      AddIis7ToSourceManifest;
+      AddIis6ToSourceManifest
+    </AddContentPathToSourceManifestDependsOn>
+  </PropertyGroup>
+  <Target Name="AddContentPathToSourceManifest"
+          DependsOnTargets="$(AddContentPathToSourceManifestDependsOn)">
+    <!-- Create the Source Manifest file -->
+    <!--
+    If indicated to mark the dest as an IIS app it will be created with iisApp, 
+    otherwise contentPath will be used.
+    -->
+
+    <GetDeployManagedRuntimeVersion Condition="'$(DeployManagedRuntimeVersion)'=='' And $(_DeploymentAsIisApp) And !$(IgnoreDeployManagedRuntimeVersion)"
+                                    TargetFrameworkVersion="$(DeployDefaultTargetFrameworkVersion)">
+      <Output TaskParameter="Result" PropertyName="DeployManagedRuntimeVersion" />
+      <Output TaskParameter="Version" PropertyName="DeployManagedRuntimeVersionNumeric" />
+    </GetDeployManagedRuntimeVersion>
+
+    <PropertyGroup Condition="!$(IgnoreDeployManagedRuntimeVersion)">
+      <_DeployManagedRuntimeVersion Condition="'$(DeployManagedRuntimeVersionNumeric)' != '' And ($(DeployManagedRuntimeVersionNumeric) &gt;= '4.0') ">$(DeployManagedRuntimeVersion)</_DeployManagedRuntimeVersion>
+      <!-- User explicit set the $(DeployManagedRuntimeVersion), we should honor it -->
+      <_DeployManagedRuntimeVersion Condition="'$(DeployManagedRuntimeVersionNumeric)' == '' And '$(DeployManagedRuntimeVersion)'!=''">$(DeployManagedRuntimeVersion)</_DeployManagedRuntimeVersion>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <!-- For IIS App, below are default to the known value
+      <DeployManagedRuntimeVersion Condition="'$(DeployManagedRuntimeVersion)'==''">$(DeployDefaultTargetFrameworkVersion)</DeployManagedRuntimeVersion>
+      <DeployEnable32bitAppOnWin64 Condition="'$(DeployEnable32bitAppOnWin64)'==''"></DeployEnable32bitAppOnWin64>
+      <DeployManagedPipelineMode Condition="'$(DeployManagedPipelineMode)'==''"></DeployManagedPipelineMode>
+      -->
+      <MsDeploySourceManifest Condition="$(_DeploymentAsIisApp)"
+                              Include="IisApp">
+        <Path>$(_MSDeployDirPath_FullPath)</Path>
+        <managedRuntimeVersion>$(_DeployManagedRuntimeVersion)</managedRuntimeVersion>
+        <enable32bitAppOnWin64>$(DeployEnable32bitAppOnWin64)</enable32bitAppOnWin64>
+        <managedPipelineMode>$(DeployManagedPipelineMode)</managedPipelineMode>
+        <AdditionalProviderSettings>managedRuntimeVersion;enable32bitAppOnWin64;managedPipelineMode</AdditionalProviderSettings>
+      </MsDeploySourceManifest>
+
+      <MsDeploySourceManifest Condition="!$(_DeploymentAsIisApp)"
+                              Include="contentPath">
+        <Path>$(_MSDeployDirPath_FullPath)</Path>
+      </MsDeploySourceManifest>
+
+      <!-- Make sure by default the Networkservice/AppPoolIdentity have read permission to the folder -->
+      <MsDeploySourceManifest Include="setAcl"
+                              Condition="$(_DeploymentAsIisApp) And $(IncludeSetAclProviderOnDestination)">
+        <Path>$(_MSDeployDirPath_FullPath)</Path>
+        <setAclResourceType>Directory</setAclResourceType>
+        <AdditionalProviderSettings>setAclResourceType</AdditionalProviderSettings>
+      </MsDeploySourceManifest>
+
+      <!-- Make sure by default the anonymousAuthenticationUser have read permission to the folder so MIME type files will work -->
+      <MsDeploySourceManifest Include="setAcl"
+                              Condition="$(_DeploymentAsIisApp) And $(IncludeSetAclProviderOnDestination)">
+        <Path>$(_MSDeployDirPath_FullPath)</Path>
+        <setAclUser>anonymousAuthenticationUser</setAclUser>
+        <setAclResourceType>Directory</setAclResourceType>
+        <AdditionalProviderSettings>setAclUser;setAclResourceType</AdditionalProviderSettings>
+      </MsDeploySourceManifest>
+
+      <!-- Additionally if App_Data Need to be ReadWrite -->
+      <MsDeploySourceManifest Include="setAcl"
+                        Condition="$(_DeploymentAsIisApp) And $(IncludeSetAclProviderOnDestination) And $(MarkApp_DataWritableOnDestination) And Exists('$(_MSDeployDirPath_FullPath)\App_Data')">
+        <Path>$(_MSDeployDirPath_FullPath)\App_Data</Path>
+        <setAclAccess>Write</setAclAccess>
+        <setAclResourceType>Directory</setAclResourceType>
+        <AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings>
+      </MsDeploySourceManifest>
+    </ItemGroup>
+
+    <CallTarget Targets="$(AfterAddContentPathToSourceManifest)" RunEachTargetSeparately="false" Condition="'$(AfterAddContentPathToSourceManifest)' != ''" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- AddIisAndContentDeclareParametersItems  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddIisAndContentDeclareParametersItems Condition="'$(BeforeAddIisAndContentDeclareParametersItems)'==''">
+    </BeforeAddIisAndContentDeclareParametersItems>
+    <AfterAddIisAndContentDeclareParametersItems Condition="'$(AfterAddIisAndContentDeclareParametersItems)'==''">
+    </AfterAddIisAndContentDeclareParametersItems>
+    <AddIisAndContentDeclareParametersItemsDependsOn Condition="'$(AddIisAndContentDeclareParametersItemsDependsOn)' == ''">
+      $(BeforeAddIisAndContentDeclareParametersItems);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+      AddDeclareParametersItemsForContentPath;
+    </AddIisAndContentDeclareParametersItemsDependsOn>
+  </PropertyGroup>
+  <Target Name="AddIisAndContentDeclareParametersItems"
+          DependsOnTargets="$(AddIisAndContentDeclareParametersItemsDependsOn)">
+    <CallTarget Targets="$(AfterAddIisAndContentDeclareParametersItems)" RunEachTargetSeparately="false" Condition="'$(AfterAddIisAndContentDeclareParametersItems)' != ''" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- AddDeclareParametersItemsForContentPath  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddDeclareParametersItemsForContentPath Condition="'$(BeforeAddDeclareParametersItemsForContentPath)'==''">
+    </BeforeAddDeclareParametersItemsForContentPath>
+    <AfterAddDeclareParametersItemsForContentPath Condition="'$(AfterAddDeclareParametersItemsForContentPath)'==''">
+    </AfterAddDeclareParametersItemsForContentPath>
+    <AddDeclareParametersItemsForContentPathDependsOn Condition="'$(AddDeclareParametersItemsForContentPathDependsOn)' == ''">
+      $(BeforeAddDeclareParametersItemsForContentPath);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+      AddDeclareParametersItemsForIis7;
+      AddDeclareParametersItemsForIis6;
+    </AddDeclareParametersItemsForContentPathDependsOn>
+  </PropertyGroup>
+  <Target Name="AddDeclareParametersItemsForContentPath"
+          DependsOnTargets="$(AddDeclareParametersItemsForContentPathDependsOn)">
+    <!--  Now we create the destination manifest file -->
+
+    <PropertyGroup>
+      <!-- default fall back to physical path-->
+      <_DestinationContentPath>$(_DestinationIisAppPhysicalPath)</_DestinationContentPath>
+      <!-- For iis6 scenario-->
+      <_DestinationContentPath Condition="($(DestinationUseIis) or $(_DeploymentAsIisApp)) And ($(DestinationIisVersion) &lt; '7') And ('$(_MSDeployIisAppPathIIS6)'!= '') " >$(_MSDeployIisAppPathIIS6)</_DestinationContentPath>
+      <!-- For iis7 and above scenario-->
+      <_DestinationContentPath Condition="($(DestinationUseIis) or $(_DeploymentAsIisApp)) And ($(DestinationIisVersion) &gt;= '7') And ('$(_MSDeployIisAppPathIIS7)' !='')">$(_MSDeployIisAppPathIIS7)</_DestinationContentPath>
+      <!-- default ParameterName for contentPath, by default they are the same as ApphostConfig/MetaKey so they can reuse the parameter-->
+      <_MsDeployParameterNameForContentPath>$(DeployParameterIISAppName)</_MsDeployParameterNameForContentPath>
+      <_MsDeployParameterNameForContentPath Condition="$(_DeploymentUseIis) And (!$(DestinationUseIis))">$(DeployParameterIISAppPhysicalPath)</_MsDeployParameterNameForContentPath>
+      <_MsDeployParameterTagForContentPath>PhysicalPath</_MsDeployParameterTagForContentPath>
+      <_MsDeployParameterTagForContentPath  Condition="$(_DeploymentAsIisApp)">IisApp</_MsDeployParameterTagForContentPath>
+      <_MsDeployParameterDefaultValueForContentPath>$(_DestinationContentPath)</_MsDeployParameterDefaultValueForContentPath>
+      <_MsDeployParameterExcludeSetParameterForContentPath>False</_MsDeployParameterExcludeSetParameterForContentPath>
+      <_MsDeployParameterPhysicalFolderForSetAcl>{$(_MsDeployParameterNameForContentPath)}</_MsDeployParameterPhysicalFolderForSetAcl>
+      <_MsDeployParameterPhysicalFolderAppDataForSetAcl>{$(_MsDeployParameterNameForContentPath)}/App_Data</_MsDeployParameterPhysicalFolderAppDataForSetAcl>
+    
+  </PropertyGroup>
+
+    <GetPublishingLocalizedString
+       Condition="$(DestinationUseIis) 
+             And ((($(DestinationIisVersion) &lt; '7') And ('$(_MSDeployIisAppPathIIS6)'== ''))
+                   Or ( ($(DestinationIisVersion) &gt;= '7') And ('$(_MSDeployIisAppPathIIS7)' ==''))) "
+       ID="PublishLocalizedString_ErrorInvalidPropertyWhenSettingPropertyIsTrue"
+       ArgumentCount="2"
+       Arguments="DeployIisAppPath;DestinationUseIIS"
+       LogType="Error" />
+    
+    <Error  Text ="Target AddDeclareParametersItemsForContentPath Failed"
+            Condition="$(DestinationUseIis) 
+             And ((($(DestinationIisVersion) &lt; '7') And ('$(_MSDeployIisAppPathIIS6)'== ''))
+                   Or ( ($(DestinationIisVersion) &gt;= '7') And ('$(_MSDeployIisAppPathIIS7)' ==''))) "
+                   />
+    <!--
+    If indicated to mark the dest as an IIS app it will be created with iisApp, 
+    otherwise contentPath will be used.
+    -->
+
+    <!--Parameterize the default value of the Path-->
+    <EscapeTextForRegularExpressions Text="$(_MSDeployDirPath_FullPath)">
+      <Output TaskParameter="Result" PropertyName="_EscapeRegEx_MSDeployDirPath" />
+    </EscapeTextForRegularExpressions>
+
+
+    <ItemGroup 
+      Condition="!$(DisableAllVSGeneratedMSDeployParameter) And '$(_DestinationContentPath)' != ''">
+      <MsDeployDeclareParameters Include="$(_MsDeployParameterNameForContentPath)"
+                                 Condition="$(_DeploymentAsIisApp)">
+        <Kind>ProviderPath</Kind>
+        <Scope>IisApp</Scope>
+        <Match>^$(_EscapeRegEx_MSDeployDirPath)$</Match>
+        <Description>$(DeployParameterIISAppNameDescription)</Description>
+        <DefaultValue>$(_MsDeployParameterDefaultValueForContentPath)</DefaultValue>
+        <Value>$(_DestinationContentPath)</Value>
+        <Tags>$(_MsDeployParameterTagForContentPath)</Tags>
+        <Priority>$(VsIisAppParametersPriority)</Priority>
+        <ExcludeFromSetParameter>$(_MsDeployParameterExcludeSetParameterForContentPath)</ExcludeFromSetParameter>
+      </MsDeployDeclareParameters>
+    
+      <MsDeployDeclareParameters Include="$(_MsDeployParameterNameForContentPath)"
+                                 Condition="!$(_DeploymentAsIisApp)">
+        <Kind>ProviderPath</Kind>
+        <Scope>contentPath</Scope>
+        <Match>^$(_EscapeRegEx_MSDeployDirPath)$</Match>
+        <Description>$(DeployParameterIISAppPhysicalPathDescription)</Description>
+        <DefaultValue>$(_MsDeployParameterDefaultValueForContentPath)</DefaultValue>
+        <Value>$(_DestinationContentPath)</Value>
+        <Tags>$(_MsDeployParameterTagForContentPath)</Tags>
+        <Priority>$(VsContentPathParametersPriority)</Priority>
+        <ExcludeFromSetParameter>$(_MsDeployParameterExcludeSetParameterForContentPath)</ExcludeFromSetParameter>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+
+    <!-- SetAcl Provider-->
+    <ItemGroup Condition="!$(DisableAllVSGeneratedMSDeployParameter) and '$(_DestinationContentPath)' != '' and $(IncludeSetAclProviderOnDestination)" >
+      <MsDeployDeclareParameters Include="$(_MsDeployParameterNameForContentPath)">
+        <Kind>ProviderPath</Kind>
+        <Scope>setAcl</Scope>
+        <Match>^$(_EscapeRegEx_MSDeployDirPath)$</Match>
+        <Description>$(DeployParameterIISAppPhysicalPathDescription)</Description>
+        <DefaultValue>$(_MsDeployParameterDefaultValueForContentPath)</DefaultValue>
+        <Value>$(_DestinationContentPath)</Value>
+        <Tags></Tags>
+        <ExcludeFromSetParameter>$(_MsDeployParameterExcludeSetParameterForContentPath)</ExcludeFromSetParameter>
+        <Priority>$(VsSetAclPriority)</Priority>
+      </MsDeployDeclareParameters>
+       <!-- Optionally mark write permission for the AppData Folder-->
+       <MsDeployDeclareParameters Include="$(DeployParameterApp_DataWritePermission)"
+                                 Condition="$(MarkApp_DataWritableOnDestination) and Exists('$(_MSDeployDirPath_FullPath)\App_Data')">
+        <Kind>ProviderPath</Kind>
+        <Scope>setAcl</Scope>
+        <Match>^$(_EscapeRegEx_MSDeployDirPath)\\App_Data$</Match>
+        <Description>Add write permission to App_Data folder</Description>
+        <DefaultValue>{$(_MsDeployParameterNameForContentPath)}/App_Data</DefaultValue>
+        <Value>$(_DestinationContentPath)/App_Data</Value>
+        <Tags>Hidden</Tags>
+        <Priority>$(VsSetAclPriority)</Priority>
+        <ExcludeFromSetParameter>True</ExcludeFromSetParameter>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+
+    <!-- We need this value to generate skip rule to skip App_Data folder-->
+    <CreateProperty Value="$(_DestinationContentPath)">
+      <Output TaskParameter="Value" PropertyName="DestinationAppRoot"/>
+    </CreateProperty>
+    <CallTarget Targets="$(AfterAddDeclareParametersItemsForContentPath)" RunEachTargetSeparately="false" Condition="'$(AfterAddDeclareParametersItemsForContentPath)' != ''" />
+  </Target>
+
+  
+  <!--********************************************************************-->
+  <!-- WriteItemsToSourceManifest  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeWriteItemsToSourceManifest Condition="'$(BeforeWriteItemsToSourceManifest)'==''">
+    </BeforeWriteItemsToSourceManifest>
+    <AfterWriteItemsToSourceManifest Condition="'$(AfterWriteItemsToSourceManifest)'==''">
+    </AfterWriteItemsToSourceManifest>
+    <WriteItemsToSourceManifestDependsOn>
+      $(BeforeWriteItemsToSourceManifest);
+      $(WriteItemsToSourceManifestDependsOn);
+      AddIisSettingAndFileContentsToSourceManifest;
+    </WriteItemsToSourceManifestDependsOn>
+  </PropertyGroup>
+  <Target Name="WriteItemsToSourceManifest"
+          DependsOnTargets="$(WriteItemsToSourceManifestDependsOn)">
+
+    <ExportManifestFile Manifests="@(MsDeploySourceManifest)" ManifestFile="$(PackageSourceManifest)" />
+    <ItemGroup>
+      <FileWrites Include="$(PackageSourceManifest)" />
+    </ItemGroup>
+
+    <CallTarget Targets="$(AfterWriteItemsToSourceManifest)" RunEachTargetSeparately="false" Condition="'$(AfterWriteItemsToSourceManifest)' != ''" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- AddDeclareParametersItems  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <BeforeAddDeclareParametersItems Condition="'$(BeforeAddDeclareParametersItems)'==''">
+    </BeforeAddDeclareParametersItems>
+    <AfterAddDeclareParametersItems Condition="'$(AfterAddDeclareParametersItems)'==''">
+    </AfterAddDeclareParametersItems>
+    <AddDeclareParametersItemsDependsOn Condition="'$(AddDeclareParametersItemsDependsOn)' == ''">
+      $(BeforeAddDeclareParametersItems);
+      AddIisAndContentDeclareParametersItems;
+      AddDeclareParametersItemsForDatabaseScript;
+    </AddDeclareParametersItemsDependsOn>
+  </PropertyGroup>
+  <Target Name="AddDeclareParametersItems"
+          DependsOnTargets="$(AddDeclareParametersItemsDependsOn)">
+    <PropertyGroup>
+      <_PublishDefaultVDirectoryPath>$(RemoteSitePhysicalPath)</_PublishDefaultVDirectoryPath>
+      <_PublishDefaultVDirectoryPath Condition="'$(_PublishDefaultVDirectoryPath)'==''">$(_DestinationIisAppPhysicalPath)</_PublishDefaultVDirectoryPath>
+    </PropertyGroup>
+
+    <!-- Create Virtual Directory Parameter if needed-->
+    <GetPublishingLocalizedString
+       Condition="'$(_DestinationIisAppPhysicalPath)' == '' And $(_DeploymentUseIis)"
+       ID="PublishLocalizedString_ErrorInvalidPropertyWhenSettingPropertyIsTrue"
+       ArgumentCount="2"
+       Arguments="_DestinationIisAppPhysicalPath;_DeploymentUseIis"
+       LogType="Error" />
+
+    <Error  Text ="Target AddDeclareParametersItems Failed"
+             Condition="'$(_DestinationIisAppPhysicalPath)' == '' And $(_DeploymentUseIis)"
+                   />
+    <ItemGroup>
+      <_MSBuildReplaceRuleItemMSBuildProjectDirectory Include="$(WebPublishPipelineProjectDirectory)" />
+    </ItemGroup>
+
+    <EscapeTextForRegularExpressions Text="@(_MSBuildReplaceRuleItemMSBuildProjectDirectory->'%(FullPath)')">
+      <Output TaskParameter="Result" PropertyName="_EscapeRegExMSBuildProjectDirectory" />
+    </EscapeTextForRegularExpressions>
+
+    <ItemGroup>
+      <MsDeployDeclareParameters  Include="$(DeployParameterPrefix)IisVirtualDirectoryPhysicalPath"
+                                  Condition="!$(DisableAllVSGeneratedMSDeployParameter) And $(_DeploymentUseIis)" >
+        <Kind>DestinationVirtualDirectory</Kind>
+        <Scope>.*</Scope>
+        <Match>^$(_EscapeRegExMSBuildProjectDirectory)$</Match>
+        <Description>$(DeployParameterIISAppPhysicalPathDescription)</Description>
+        <DefaultValue>$(_DestinationIisAppPhysicalPath)</DefaultValue>
+        <!--Value is used in the SetParameters when directly publish-->
+        <Value>$(_PublishDefaultVDirectoryPath)</Value>
+        <Tags>PhysicalPath</Tags>
+        <Priority>$(VsDestinationVDirParametersPriority)</Priority>
+      </MsDeployDeclareParameters>
+    </ItemGroup>
+
+    <CallTarget Targets="$(AfterAddDeclareParametersItems)" RunEachTargetSeparately="false" Condition="'$(AfterAddDeclareParametersItems)' != ''" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- GenerateMsDeployManifestSettings  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <GenerateMsDeployManifestSettingsDependsOn Condition="'$(GenerateMsDeployManifestSettingsDependsOn)'==''">
+    </GenerateMsDeployManifestSettingsDependsOn>
+  </PropertyGroup>
+
+  <Target Name="GenerateMsDeployManifestSettings" DependsOnTargets="$(GenerateMsDeployManifestSettingsDependsOn)">
+    <!-- we can only set this property after we get the existing IisUrl -->
+    <ItemGroup>
+      <_MSDeployDirPath Include="$(WPPAllFilesInSingleFolder)" />
+    </ItemGroup>
+
+    <GetPublishingLocalizedString
+      Condition="'$(DeployParameterIISAppNameDescription)'=='' And !$(DeployParameterAutoDescriptionbyTags)"
+      ID="PublishLocalizedString_IISAppParameterDescription">
+      <Output TaskParameter="Result" PropertyName="DeployParameterIISAppNameDescription" />
+    </GetPublishingLocalizedString>
+
+    <!--if $(DeployParameterAutoDescriptionbyTags), we turn off the description.-->
+    <DeployParameterIISAppNameDescription Condition="'$(DeployParameterIISAppNameDescription)'!='' And $(DeployParameterAutoDescriptionbyTags)"></DeployParameterIISAppNameDescription>
+
+    <!--Get localized $(DeployParameterIISAppPhysicalPathDescription) from the Task.dll if it wasn't bee set by user.-->
+    <GetPublishingLocalizedString
+          Condition="'$(DeployParameterIISAppPhysicalPathDescription)'=='' And !$(DeployParameterAutoDescriptionbyTags)"
+          ID="PublishLocalizedString_IISAppPhysicalPathDescription">
+      <Output TaskParameter="Result" PropertyName="DeployParameterIISAppPhysicalPathDescription" />
+    </GetPublishingLocalizedString>
+
+    <!--if $(DeployParameterAutoDescriptionbyTags), we turn off the description.-->
+    <DeployParameterIISAppPhysicalPathDescription Condition="'$(DeployParameterIISAppPhysicalPathDescription)'!='' And $(DeployParameterAutoDescriptionbyTags)"></DeployParameterIISAppPhysicalPathDescription>
+
+    <PropertyGroup>
+      <_MSDeployDirPath_FullPath>@(_MSDeployDirPath->'%(FullPath)')</_MSDeployDirPath_FullPath>
+      <_MSDeployIisAppPathIIS7>$(DeployIisAppPath)</_MSDeployIisAppPathIIS7>
+      <_MSDeployIisAppPathIIS6>$(DeployIisAppPath)</_MSDeployIisAppPathIIS6>
+      <_MSDeployIisAppPathIIS7 Condition="'$(_MSDeployIisAppPathIIS7)'==''">$(DefaultDeployIisAppPath)</_MSDeployIisAppPathIIS7>
+      <_MSDeployIisAppPathIIS6 Condition="'$(_MSDeployIisAppPathIIS6)'==''">$(DefaultDeployIisAppPath)</_MSDeployIisAppPathIIS6>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_MSDeploySourceManifest Include="$(PackageSourceManifest)" />
+      <_MSDeployParametersFile Include="$(PackageParametersFile)" />
+      <_MSDeploySampleParametersValue Condition="$(GenerateSampleDeployScript)" Include="$(GenerateSampleParametersValueLocation)" />
+      <_MSDeployGenerateSampleDeployScriptReadMeLocation Condition="$(GenerateSampleDeployScript)" Include="$(GenerateSampleDeployScriptReadMeLocation)" />
+    </ItemGroup>
+  </Target>
+
+  <!-- CleanWebsitesPackageCore  -->
+  <PropertyGroup>
+    <CleanWebsitesPackageCoreDependsOn Condition="'$(CleanWebsitesPackageCoreDependsOn)' == ''">
+      GenerateMsDeployManifestSettings;
+    </CleanWebsitesPackageCoreDependsOn>
+  </PropertyGroup>
+  <Target Name="CleanWebsitesPackageCore" DependsOnTargets="$(CleanWebsitesPackageCoreDependsOn)">
+    <!--Assertion check-->
+    <CheckItemsCount Items="@(_MSDeployPackageLocation)" Condition="$(EnablePackageProcessLoggingAndAssert)">
+      <Output TaskParameter="Count" PropertyName="_InternalItemsCount" />
+    </CheckItemsCount>
+
+    <GetPublishingLocalizedString
+       Condition="$(EnablePackageProcessLoggingAndAssert) AND '$(_InternalItemsCount)' != '1'"
+       ID="PublishLocalizedString_ErrorInvalidMSBuildItemCollectionCount"
+       ArgumentCount="3"
+       Arguments="_MSDeployPackageLocation;$(_InternalItemsCount);1"
+       LogType="Error" />
+
+    <Error  Text ="Target CleanWebsitesPackageCore Failed"
+             Condition="$(EnablePackageProcessLoggingAndAssert) AND '$(_InternalItemsCount)' != '1'" />
+
+    <CheckPathAttributes Path="@(_MSDeployPackageLocation->'%(Identity)')">
+      <Output TaskParameter="IsExists" PropertyName="_CheckPackageLocationExists" />
+      <Output TaskParameter="IsFolder" PropertyName="_CheckPackageLocationIsFolder" />
+    </CheckPathAttributes>
+
+    <RemoveDir Directories="@(_MSDeployPackageLocation)"
+               Condition="$(_CheckPackageLocationExists) AND $(_CheckPackageLocationIsFolder)"
+               ContinueOnError="True"/>
+
+    <Delete Files="@(_MSDeployPackageLocation)" 
+               Condition="$(_CheckPackageLocationExists) AND !$(_CheckPackageLocationIsFolder)" 
+               TreatErrorsAsWarnings="True"  />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- CleanWebsitesPackage  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <CleanWebsitesPackageDependsOn Condition="'$(CleanWebsitesPackageDependsOn)' == ''">
+      GenerateMsDeployManifestSettings;
+      CleanWebsitesPackageCore;
+    </CleanWebsitesPackageDependsOn>
+  </PropertyGroup>
+  <Target Name="CleanWebsitesPackage" DependsOnTargets="$(CleanWebsitesPackageDependsOn)">
+    
+    <!--<RemoveDir Condition="Exists($(PackageLogDir))" Directories="$(PackageLogDir)" ContinueOnError="true" />-->
+    <Delete Files="$(PackageSourceManifest)" Condition="Exists('$(PackageSourceManifest)')" TreatErrorsAsWarnings="True" />
+    <Delete Files="$(PublishParametersFile)" Condition="Exists('$(PublishParametersFile)')" TreatErrorsAsWarnings="True" />
+    <Delete Files="$(GenerateSampleDeployScriptLocation)" Condition="Exists('$(GenerateSampleDeployScriptLocation)')" TreatErrorsAsWarnings="True" />
+    <Delete Files="$(GenerateSampleDeployScriptReadMeLocation)" Condition="Exists('$(GenerateSampleDeployScriptReadMeLocation)')" TreatErrorsAsWarnings="True" />
+    <Delete Files="$(GenerateSampleParametersValueLocation)" Condition="Exists('$(GenerateSampleParametersValueLocation)')" TreatErrorsAsWarnings="True" />
+    <Delete Files="$(GenerateSampleParametersValueLocation)" Condition="Exists('$(GenerateSampleParametersValueLocation)')" TreatErrorsAsWarnings="True" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- CleanWebsitesWPPAllFilesInSingleFolder  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <CleanWebsitesWPPAllFilesInSingleFolderDependsOn Condition="'$(CleanWebsitesWPPAllFilesInSingleFolderDependsOn)' == ''">
+    </CleanWebsitesWPPAllFilesInSingleFolderDependsOn>
+  </PropertyGroup>
+  <Target Name="CleanWebsitesWPPAllFilesInSingleFolder" DependsOnTargets="$(CleanWebsitesWPPAllFilesInSingleFolderDependsOn)">
+    <!-- Assertion check-->
+    <!-- In the case of Clean Packaging/Publish, we simply delete the WPPAllFilesInSingleFolder -->
+    <RemoveDir Condition="Exists($(WPPAllFilesInSingleFolder))" Directories="$(WPPAllFilesInSingleFolder)" ContinueOnError="true" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- CleanWebPublishPipelineIntermediateOutput  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <CleanWebPublishPipelineIntermediateOutputDependsOn Condition="'$(CleanWebPublishPipelineIntermediateOutputDependsOn)' == ''">
+    </CleanWebPublishPipelineIntermediateOutputDependsOn>
+  </PropertyGroup>
+  <Target Name="CleanWebPublishPipelineIntermediateOutput" DependsOnTargets="$(CleanWebPublishPipelineIntermediateOutputDependsOn)">
+    <RemoveDir Condition="Exists($(AutoParameterizationWebConfigConnectionStringsLocation))" Directories="$(AutoParameterizationWebConfigConnectionStringsLocation)" ContinueOnError="true" />
+    <RemoveDir Condition="Exists($(TransformWebConfigIntermediateLocation))" Directories="$(TransformWebConfigIntermediateLocation)" ContinueOnError="true" />
+    <RemoveDir Condition="Exists($(ProfileTransformWebConfigIntermediateLocation))" Directories="$(ProfileTransformWebConfigIntermediateLocation)" ContinueOnError="true" />
+    <RemoveDir Condition="Exists($(DatabaseDeployIntermediateOutputPath))" Directories="$(DatabaseDeployIntermediateOutputPath)" ContinueOnError="true" />
+    <RemoveDir Condition="Exists($(InsertAdditionalWebCofigConnectionStringsLocation))" Directories="$(InsertAdditionalWebCofigConnectionStringsLocation)" ContinueOnError="true" />
+    <Delete Condition="Exists($(_WebConfigTransformOutputParametersFile))" Files="$(_WebConfigTransformOutputParametersFile)" TreatErrorsAsWarnings="true" />
+    <Delete Condition="Exists($(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile))" Files="$(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile)" TreatErrorsAsWarnings="true" />
+    <Delete Condition="Exists($(_ProfileWebConfigTransformOutputParametersFile))" Files="$(_ProfileWebConfigTransformOutputParametersFile)" TreatErrorsAsWarnings="true" />
+    <Delete Condition="Exists($(_WPPLastBuildInfoLocation))" Files="$(_WPPLastBuildInfoLocation)" TreatErrorsAsWarnings="true" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- CheckAndCleanMSDeployPackageIfNeeded  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <CheckAndCleanMSDeployPackageIfNeededDependsOn Condition="'$(CheckAndCleanMSDeployPackageIfNeededDependsOn)'==''">
+      GenerateMsDeployManifestSettings;
+    </CheckAndCleanMSDeployPackageIfNeededDependsOn>
+  </PropertyGroup>
+  <Target Name="CheckAndCleanMSDeployPackageIfNeeded" >
+    <IsCleanMSDeployPackageNeeded
+      MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+      PackageLocation="@(_MSDeployPackageLocation->'%(FullPath)')"
+      PackageAsSingleFile="$(PackageAsSingleFile)"
+      CurrentSourceManifestPath="@(_MSDeploySourceManifest->'%(FullPath)')"  >
+      <Output TaskParameter="Result"
+              PropertyName="_IsCleanMSDeployPackageNeeded" />
+    </IsCleanMSDeployPackageNeeded>
+    
+    <!-- Only delete the Zip file -->
+    <CallTarget Condition="$(_IsCleanMSDeployPackageNeeded)"
+                Targets="CleanWebsitesPackageCore"  
+                RunEachTargetSeparately="false" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- GenerateMsdeployManifestFiles  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <OnAfterGenerateMsdeployManifestFiles>
+      $(OnAfterGenerateMsdeployManifestFiles);
+      AddDeclareParametersItems;
+      CheckAndCleanMSDeployPackageIfNeeded;
+    </OnAfterGenerateMsdeployManifestFiles>
+    <GenerateMsdeployManifestFilesDependsOn>
+      $(GenerateMsdeployManifestFilesDependsOn);
+      PipelineCopyAllFilesToOneFolderForMsdeploy;
+      GenerateMsDeployManifestSettings;
+    </GenerateMsdeployManifestFilesDependsOn>
+  </PropertyGroup>
+  <Target Name="GenerateMsdeployManifestFiles" DependsOnTargets="$(GenerateMsdeployManifestFilesDependsOn)">
+
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_GenerateMsdeploySourceManifestFile"
+       LogType="Message" />
+
+    <MakeDir Directories="@(_MSDeploySourceManifest->'%(RootDir)%(Directory)')" Condition="!Exists(@(_MSDeploySourceManifest->'%(RootDir)%(Directory)'))"/>
+    <MakeDir Directories="@(_MSDeployParametersFile->'%(RootDir)%(Directory)')" Condition="!Exists(@(_MSDeployParametersFile->'%(RootDir)%(Directory)'))"/>
+
+    <!--================================================-->
+    <!--Create the Source Manifest filePath list-->
+    <!--================================================-->
+    <CallTarget Targets="WriteItemsToSourceManifest" RunEachTargetSeparately="false" />
+    <CallTarget Targets="$(OnAfterGenerateMsdeployManifestFiles)" RunEachTargetSeparately="false" />
+  </Target>
+
+  <!--================================================-->
+  <!--Create skip rules used in sample script generation as well as publish-->
+  <!--================================================-->
+  <Target Name="GenerateSkipRuleForAppData" Condition="$(SkipApp_DataFolder)">
+    <EscapeTextForRegularExpressions Text="$(WPPAllFilesInSingleFolder)">
+      <Output TaskParameter="Result" PropertyName="_Escaped_WPPAllFilesInSingleFolder" />
+    </EscapeTextForRegularExpressions>
+    <ItemGroup>
+      <MsDeploySkipRules Include="SkipAppDataOnDeploy">
+        <SkipAction></SkipAction>
+        <ObjectName>dirPath</ObjectName>
+        <AbsolutePath>$(_Escaped_WPPAllFilesInSingleFolder)\\App_Data$</AbsolutePath>
+        <Apply>Source</Apply>
+        <XPath></XPath>
+      </MsDeploySkipRules>
+      <MsDeploySkipRules Include="SkipAppDataOnDeploy">
+        <SkipAction></SkipAction>
+        <ObjectName>dirPath</ObjectName>
+        <AbsolutePath>$(_DestinationContentPath)\\App_Data$</AbsolutePath>
+        <Apply>Destination</Apply>
+        <XPath></XPath>
+      </MsDeploySkipRules>
+
+    </ItemGroup>
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- PackageUsingManifest Manifest -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <PackageUsingManifestDependsOn>
+      $(OnBeforePackageUsingManifest);
+      $(PackageUsingManifestDependsOn);
+      GetMSDeployInstalledVersionPath;
+      GenerateMsDeployManifestSettings;
+      GenerateMsdeployManifestFiles;
+      GenerateSkipRuleForAppData;
+    </PackageUsingManifestDependsOn>
+
+  </PropertyGroup>
+  <Target Name="PackageUsingManifest" DependsOnTargets="$(PackageUsingManifestDependsOn)">
+
+    <PropertyGroup>
+      <!-- Always package from a manifest -->
+      <PackageSourceType>manifest</PackageSourceType>
+      <PackageSourceRoot>@(_MSDeploySourceManifest->'%(FullPath)')</PackageSourceRoot>
+      <!-- target is either a single file or archive dir -->
+      <PackageDestinationType>archiveDir</PackageDestinationType>
+      <PackageDestinationRoot>@(_MSDeployArchiveDir->'%(FullPath)')</PackageDestinationRoot>
+      <PackageDestinationType Condition="$(PackageAsSingleFile)">package</PackageDestinationType>
+      <PackageDestinationRoot Condition="$(PackageAsSingleFile)">@(_MSDeployPackageFile->'%(FullPath)')</PackageDestinationRoot>
+      <PackageResult>True</PackageResult>
+    </PropertyGroup>
+
+    <GetPublishingLocalizedString
+       Importance="High"
+       ID="PublishLocalizedString_PackagingIntoLocation"
+       ArgumentCount="1"
+       Arguments="$(PackageDestinationRoot)"
+       LogType="Message" />
+    <!-- "Packaging into $(PackageDestinationRoot)" -->
+
+    <ItemGroup>
+      <MsDeploySourceProviderSetting Remove="@(MsDeploySourceProviderSetting)" />
+      <MsDeploySourceProviderSetting Include="$(PackageSourceType)">
+        <Path>$(PackageSourceRoot)</Path>
+        <EncryptPassword>$(DeployEncryptKey)</EncryptPassword>
+        <WebServerAppHostConfigDirectory>$(IisServer_WebServerAppHostConfigDirectory)</WebServerAppHostConfigDirectory>
+        <WebServerManifest>$(IisServer_WebServerManifest)</WebServerManifest>
+        <WebServerDirectory>$(IisServer_WebServerDirectory)</WebServerDirectory>
+    </MsDeploySourceProviderSetting>
+      <MsDeployDestinationProviderSetting Remove="@(MsDeployDestinationProviderSetting)" />
+      <MsDeployDestinationProviderSetting Include="$(PackageDestinationType)">
+        <Path>$(PackageDestinationRoot)</Path>
+        <EncryptPassword>$(DeployEncryptKey)</EncryptPassword>
+        <IncludeAcls>False</IncludeAcls>
+      </MsDeployDestinationProviderSetting>
+    </ItemGroup>
+
+    <!--Debugging helper don't need to be localized-->
+    <Message Text="PackageUsingManifest MsDeploySourceProviderSetting is @(MsDeploySourceProviderSetting)" Condition="$(EnablePackageProcessLoggingAndAssert)" />
+    <Message Text="PackageUsingManifest MsDeployDestinationProviderSetting is @(MsDeployDestinationProviderSetting)" Condition="$(EnablePackageProcessLoggingAndAssert)"/>
+
+    <ExportParametersFile
+      Condition="!$(UseDeclareParametersXMLInMsDeploy) And $(EnablePackageProcessLoggingAndAssert)"
+      Parameters="@(MsDeployDeclareParameters)"
+      DeclareParameterFile="$(PackageLogDir)\PackageUsingManifest.parameters.xml"
+      GenerateFileEvenIfEmpty="True"
+      />
+
+    <!-- First delete the ParameterFile-->
+    <Delete Files="$(PackageParametersFile)"  Condition="Exists($(PackageParametersFile))"  ContinueOnError="true"/>
+
+    <ExportParametersFile
+      Condition="$(UseDeclareParametersXMLInMsDeploy)"
+      Parameters="@(MsDeployDeclareParameters)"
+      DeclareParameterFile="$(PackageParametersFile)"
+      GenerateFileEvenIfEmpty="True"
+      />
+
+    <PropertyGroup>
+      <_VsPackageParametersFile></_VsPackageParametersFile>
+      <_VsPackageParametersFile Condition="$(UseDeclareParametersXMLInMsDeploy)">$(PackageParametersFile)</_VsPackageParametersFile>
+    </PropertyGroup>
+    <ItemGroup>
+      <!-- We will include the parameter when $(UseDeclareParametersXMLInMsDeploy) is false-->
+      <_Package_MsDeployDeclareParameters Include="@(MsDeployDeclareParameters)" Condition="!$(UseDeclareParametersXMLInMsDeploy)" />
+    </ItemGroup>
+
+
+    <VSMSDeploy Condition="!$(UseMsdeployExe)"
+       MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+       Source="@(MsDeploySourceProviderSetting)"
+       Destination="@(MsDeployDestinationProviderSetting)"
+       DeploymentTraceLevel="$(PackageTraceLevel)"
+       DisableLink="$(PackageDisableLinks)"
+       EnableLink="$(PackageEnableLinks)"
+       DeclareParameterItems="@(_Package_MsDeployDeclareParameters)"
+       OptimisticParameterDefaultValue="$(EnableOptimisticParameterDefaultValue)"
+       ImportDeclareParametersItems="$(_VsPackageParametersFile)"
+       ReplaceRuleItems="@(MsDeployReplaceRules)"
+       RetryAttempts="$(RetryAttemptsForDeployment)">
+      <Output TaskParameter="Result" PropertyName="PackageResult" />
+    </VSMSDeploy>
+    <!--"msdeploy.exe" 
+    -verb:sync 
+    -source:manifest=obj\Debug\Package\SourceManifest.xml 
+    -Destination:archiveDir=c:\test\archiveDir 
+    -disableLink:"ContentExtension,CertificateExtension"
+    -replace:-->
+    <MSdeploy
+      Condition="$(UseMsdeployExe)"
+      Verb="sync"
+      Source="@(MsDeploySourceProviderSetting)"
+      Destination="@(MsDeployDestinationProviderSetting)"
+      DisableLink="$(PackageDisableLinks)"
+      EnableLink="$(PackageEnableLinks)"
+      DeclareParameterItems="@(_Package_MsDeployDeclareParameters)"
+      OptimisticParameterDefaultValue="$(EnableOptimisticParameterDefaultValue)"
+      ImportDeclareParametersItems="$(_VsPackageParametersFile)"
+      ReplaceRuleItems="@(MsDeployReplaceRules)"
+      RetryAttempts="$(RetryAttemptsForDeployment)"
+      ExePath="$(MSDeployPath)"
+      />
+    <ItemGroup>
+      <FileWrites Include="$(PackageSourceRoot)" Condition="$(PackageAsSingleFile)"/>
+      <FileWrites Include="$(PackageSourceRoot)\**" Condition="$(PackageAsSingleFile)"/>
+    </ItemGroup>
+    <CallTarget Targets="$(OnAfterPackageUsingManifest)" RunEachTargetSeparately="false" />
+  </Target>
+
+
+ 
+  <!--***********************************************************************-->
+  <!--TestDeployPackageToLocal task-->
+  <!--***********************************************************************-->
+  <PropertyGroup>
+    <TestDeployPackageToLocalDependsOn Condition="'$(TestDeployPackageToLocalDependsOn)'==''">
+      GetMSDeployInstalledVersionPath;
+      GenerateMsDeployManifestSettings;
+      GenerateMsdeployManifestFiles;
+      Package;
+    </TestDeployPackageToLocalDependsOn>
+  </PropertyGroup>
+
+  <Target Name="TestDeployPackageToLocal" DependsOnTargets="$(TestDeployPackageToLocalDependsOn)">
+
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_TestDeployPackageOnCurrentMachine"
+       LogType="Message" />
+    <!-- "TestDeployPackageToLocal the package..."/>-->
+    <PropertyGroup>
+      <!--
+        MSDeployPublishSourceType can be 
+        SingleFilePackage(a single ziped file package)
+        Manifest(a file with Iis VDir info plus file path)
+        RawIisVDir(Let MSDeploy publish all files underneath the physical path)
+        ArchiveDir(a folder genearated by package with all files to be transferred)
+      -->
+      <!--So far, if we see the single file package, we pick it up; otherwise, we get TestDeployPackageToLocal* from Iis vdir -->
+      <TestDeployPackageToLocalSourceType>manifest</TestDeployPackageToLocalSourceType>
+      <TestDeployPackageToLocalSourceRoot>@(_MSDeploySourceManifest->'%(FullPath)')</TestDeployPackageToLocalSourceRoot>
+      <TestDeployPackageToLocalSourceType Condition="$(_CreatePackage) And $(PackageAsSingleFile)">package</TestDeployPackageToLocalSourceType>
+      <TestDeployPackageToLocalSourceRoot Condition="$(_CreatePackage) And $(PackageAsSingleFile)">@(_MSDeployPackageFile->'%(FullPath)')</TestDeployPackageToLocalSourceRoot>
+      <TestDeployPackageToLocalSourceType Condition="$(_CreatePackage) And !$(PackageAsSingleFile)">archiveDir</TestDeployPackageToLocalSourceType>
+      <TestDeployPackageToLocalSourceRoot Condition="$(_CreatePackage) And !$(PackageAsSingleFile)">@(_MSDeployArchiveDir->'%(FullPath)')</TestDeployPackageToLocalSourceRoot>
+      <!--Destination is always a manifest-->
+      <TestDeployPackageToLocalDestinationType>auto</TestDeployPackageToLocalDestinationType>
+      <TestDeployPackageToLocalDestinationRoot></TestDeployPackageToLocalDestinationRoot>
+    </PropertyGroup>
+
+
+    <ItemGroup>
+      <MsDeploySourceProviderSetting Remove="@(MsDeploySourceProviderSetting)" />
+      <MsDeploySourceProviderSetting Include="$(TestDeployPackageToLocalSourceType)">
+        <Path>$(TestDeployPackageToLocalSourceRoot)</Path>
+        <EncryptPassword>$(DeployEncryptKey)</EncryptPassword>
+      </MsDeploySourceProviderSetting>
+      <MsDeployDestinationProviderSetting Remove="@(MsDeployDestinationProviderSetting)" />
+      <MsDeployDestinationProviderSetting Include="$(TestDeployPackageToLocalDestinationType)">
+        <Path>$(TestDeployPackageToLocalDestinationRoot)</Path>
+        <EncryptPassword>$(DeployEncryptKey)</EncryptPassword>
+        <IncludeAcls>False</IncludeAcls>
+      </MsDeployDestinationProviderSetting>
+    </ItemGroup>
+
+    <!--Debug/Diagnostic message is not localized -->
+    <Message Text="TestDeployPackageToLocal MsDeploySourceProviderSetting is @(MsDeploySourceProviderSetting)" Condition="$(EnablePackageProcessLoggingAndAssert)" />
+    <Message Text="TestDeployPackageToLocal MsDeployDestinationProviderSetting is @(MsDeployDestinationProviderSetting)" Condition="$(EnablePackageProcessLoggingAndAssert)"/>
+
+    <VSMSDeploy
+      Condition="!$(UseMsdeployExe)"
+      MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+      Source="@(MsDeploySourceProviderSetting)"
+      Destination="@(MsDeployDestinationProviderSetting)"
+      DisableLink="$(PublishDisableLinks)"
+      EnableLink="$(PublishEnableLinks)">
+      <Output TaskParameter="Result" PropertyName="_TestDeployPackageToLocalResult" />
+    </VSMSDeploy>
+    <MSdeploy
+      Condition="$(UseMsdeployExe)"
+      Verb="sync"
+      Source="@(MsDeploySourceProviderSetting)"
+      Destination="@(MsDeployDestinationProviderSetting)"
+      DisableLink="$(PublishDisableLinks)"
+      EnableLink="$(PublishEnableLinks)"
+      ExePath="$(MSDeployPath)" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Target GenerateGlobalPublishSetting -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <NormalizePublishSettings Condition="'$(NormalizePublishSettings)'==''">true</NormalizePublishSettings>
+    <AuthType Condition="'$(AuthType)'==''" >Basic</AuthType>
+    <!-- Supported value for $(MSDeployPublishMethod): WMSVC, RemoteAgent, InProc -->
+    <MSDeployPublishMethod Condition="'$(MSDeployPublishMethod)'==''" >WMSVC</MSDeployPublishMethod>
+    <GenerateGlobalPublishSettingDependsOn Condition="'$(GenerateGlobalPublishSettingDependsOn)'==''">
+      GetProjectWebProperties;
+      ValidateGlobalSettings;
+    </GenerateGlobalPublishSettingDependsOn>
+  </PropertyGroup>
+
+  <Target Name="GenerateGlobalPublishSetting"
+          DependsOnTargets="$(GenerateGlobalPublishSettingDependsOn)">
+    <PropertyGroup>
+      <_UseWMSVC>false</_UseWMSVC>
+      <_UseWMSVC Condition="'$(MSDeployPublishMethod)'=='WMSVC'">true</_UseWMSVC>
+      <_UseRemoteAgent>false</_UseRemoteAgent>
+      <_UseRemoteAgent Condition="'$(MSDeployPublishMethod)'=='RemoteAgent'">true</_UseRemoteAgent>
+    </PropertyGroup>
+
+    <PropertyGroup>
+      <DestinationUseIis>true</DestinationUseIis>
+    </PropertyGroup>
+
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_ValidatingMsDeployPublishSettings"
+       LogType="Message" />
+    <!-- "Validate publish related properties" />-->
+    
+    <CreateProperty Value="$(CreatePackageOnPublish)">
+      <Output TaskParameter="Value" PropertyName="_CreatePackage"/>
+    </CreateProperty>
+    
+    <!--Debug/Diagnostic message is not localized-->
+    <Message Text="_CreatePackage is $(_CreatePackage)" Condition="$(EnablePackageProcessLoggingAndAssert)" />
+
+    <GetPublishingLocalizedString
+       Condition="'$(MsDeployServiceUrl)'==''"
+       ID="PublishLocalizedString_ValidateErrorMsDeployPublishSetting"
+       ArgumentCount="1"
+       Arguments="MsDeployServiceUrl"
+       LogType="Error" />
+
+    <Error  Text ="Target GenerateGlobalPublishSetting Failed"
+       Condition="'$(MsDeployServiceUrl)'==''"
+      />
+
+    <!-- If $(IncludeIisSettingsOnPublish) is set but $(RemoteSitePhysicalPath) give a warning -->
+    <GetPublishingLocalizedString
+       Condition="!$(IncludeIisSettingsOnPublish) And '$(RemoteSitePhysicalPath)' != ''"
+       ID="PublishLocalizedString_WarningOnSettingRemoteSitePhysicalPathWhenIISSettingIsNotInclude"
+       LogType="Warning" />
+    <!-- "Setting value to property of RemoteSitePhysicalPath might not work if IIS setting is not included" />-->
+
+    <!-- If IncludeIisSettingsOnPublish is set then $(DeployAsIisApp) is not needed  -->
+    <GetPublishingLocalizedString
+       Condition="$(IncludeIisSettingsOnPublish) and $(DeployAsIisApp)"
+       ID="PublishLocalizedString_WarningOnSettingBothIncludeIisSettingsOnPublishAndDeployAsIisApp"
+       LogType="Warning" />
+    <!-- "Setting both property values of DeployAsIisApp and IncludeIisSettingsOnPublish to true is not recommended, as IncludeIisSettingsOnPublish is a superset of DeployAsIisApp" />-->
+
+    <CreateProperty Value="NTLM" Condition="!$(_UseWMSVC) And $(NormalizePublishSettings)">
+      <Output TaskParameter="Value" PropertyName="AuthType"/>
+    </CreateProperty>
+    
+    <!-- Debug/Diagnostic message is not localized-->
+    <Message Text="AuthType is $(AuthType)" Condition="$(EnablePackageProcessLoggingAndAssert)" />
+
+    <!-- Normalize service url such as convert a server name to format like https://<server>:8172/msdeploy.axd-->
+    <NormalizeServiceUrl ServiceUrl="$(MsDeployServiceUrl)" UseWMSVC="$(_UseWMSVC)" UseRemoteAgent="$(_UseRemoteAgent)" 
+                         Condition="$(NormalizePublishSettings)">
+      <Output TaskParameter="ResultUrl" PropertyName="MsDeployServiceUrl" />
+    </NormalizeServiceUrl>
+    
+    <!-- Debug/Diagnostic message is not localized-->
+    <Message Text="MsDeployServiceUrl is $(MsDeployServiceUrl)" Condition="$(EnablePackageProcessLoggingAndAssert)" />
+
+    <!-- Append the site name at the end of ServiceUrl like site=mysite-->
+    <ConcatFullServiceUrlWithSiteName ServiceUrl="$(MsDeployServiceUrl)" SiteAppName="$(DeployIisAppPath)" 
+                                      Condition="$(_UseWMSVC) And $(NormalizePublishSettings)">
+      <Output TaskParameter="ResultUrl" PropertyName="MsDeployServiceUrl" />
+    </ConcatFullServiceUrlWithSiteName>
+
+    <!-- Debug/Diagnostic message is not localized-->
+    <Message Text="MsDeployServiceUrl is $(MsDeployServiceUrl)" Condition="$(EnablePackageProcessLoggingAndAssert)" />
+    
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Target GatherLinkExtensionsToBeExposedInVS -->
+  <!--********************************************************************-->
+  <Target Name="GatherLinkExtensionsToBeExposedInVS">
+    <PropertyGroup>
+      <LinkExtensionFileName>LinkExtensioninfo.xml</LinkExtensionFileName>
+      <LinksHiddenFromVS>HttpCertConfigExtension;CertificateExtension;FrameworkConfigExtension</LinksHiddenFromVS>
+      <LinksDisabledByVS>ContentExtension</LinksDisabledByVS>
+    </PropertyGroup>
+    <GatherLinkExtensionsToBeExposedInVS LinksHiddenFromVS="$(LinksHiddenFromVS)"
+                                         LinksDisabledByVS="$(LinksDisabledByVS)"
+                                         LinkInfoFilePath="$(PackageTempRootDir)\\$(LinkExtensionFileName)" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!-- Target MSDeployPublish -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CreatePackageOnPublish Condition="'$(CreatePackageOnPublish)'==''">false</CreatePackageOnPublish>
+    <MSDeployPublishDependsOn Condition="'$(MSDeployPublishDependsOn)'==''">
+      GenerateGlobalPublishSetting;
+      _CheckRemoteFx45;      
+      ValidateGlobalPackageSetting;
+      GenerateMsDeployManifestSettings;
+      GenerateMsdeployManifestFiles;
+      GenerateSkipRuleForAppData;
+      ImportPublishingParameterValues;
+      PipelineMsdeploySpecificTransformPhase;
+      Package;
+    </MSDeployPublishDependsOn>
+  </PropertyGroup>
+
+  <Target Name="MSDeployPublish" DependsOnTargets="$(MSDeployPublishDependsOn)">
+
+    <GetPublishingLocalizedString
+       Condition="'$(MsDeployServiceUrl)'!=''"
+       Importance="High"
+       ID="PublishLocalizedString_StartMsDeployPublishToRemote"
+       ArgumentCount="1"
+       Arguments="$(MsDeployServiceUrl)"
+       LogType="Message" />
+    <!-- "Start Msdeploy Publish the Application/package to $(MsDeployServiceUrl) ..."/>-->
+    
+    <PropertyGroup>
+      <!--
+        MSDeployPublishSourceType can be 
+        SingleFilePackage(a single ziped file package)
+        Manifest(a file with Iis VDir info plus file pathes)
+        RawIisVDir(Let MSDeploy published all files underneath the phisical path)
+        ArchiveDir(a folder genearated by package with all files to be transferred)
+      -->
+      <!--So far, if we see the single file package, we pick it up; otherwise, we transport from Iis vdir -->
+      <MSDeployPublishSourceType>manifest</MSDeployPublishSourceType>
+      <MSDeployPublishSourceRoot>@(_MSDeploySourceManifest->'%(FullPath)')</MSDeployPublishSourceRoot>
+      <MSDeployPublishSourceType Condition="$(CreatePackageOnPublish) And $(PackageAsSingleFile)">package</MSDeployPublishSourceType>
+      <MSDeployPublishSourceRoot Condition="$(CreatePackageOnPublish) And $(PackageAsSingleFile)">@(_MSDeployPackageFile->'%(FullPath)')</MSDeployPublishSourceRoot>
+      <MSDeployPublishSourceType Condition="$(CreatePackageOnPublish) And !$(PackageAsSingleFile)">archiveDir</MSDeployPublishSourceType>
+      <MSDeployPublishSourceRoot Condition="$(CreatePackageOnPublish) And !$(PackageAsSingleFile)">@(_MSDeployArchiveDir->'%(FullPath)')</MSDeployPublishSourceRoot>
+      <!--Destination is alway a manifest-->
+      <MSDeployPublishDestinationType>auto</MSDeployPublishDestinationType>
+      <MSDeployPublishDestinationRoot></MSDeployPublishDestinationRoot>
+      <!--Property used when we invoke msdeploy process for publish-->
+      <MsDeployDoNotDeleteRule Condition="$(SkipExtraFilesOnServer)">DoNotDeleteRule</MsDeployDoNotDeleteRule>
+    </PropertyGroup>
+
+    <PropertyGroup >
+      <_MSDeploySourceWebServerAppHostConfigDirectory>$(IisServer_WebServerAppHostConfigDirectory)</_MSDeploySourceWebServerAppHostConfigDirectory>
+      <_MSDeploySourceWebServerManifest>$(IisServer_WebServerManifest)</_MSDeploySourceWebServerManifest>
+      <_MSDeploySourceWebServerDirectory>$(IisServer_WebServerDirectory)</_MSDeploySourceWebServerDirectory>
+    </PropertyGroup>
+
+    
+    <MapUriToIisWebServer Condition="('$(MSDeployPublishMethod)'=='INPROC') And ('$(MsDeployServiceUrl)' != '') "  
+                          ProjectIisUrl="$(MsDeployServiceUrl)"
+                          UseIISExpressHintFlag="$(_DeploymentUseIISExpressHint)">
+      <Output TaskParameter="WebServerAppHostConfigDirectory" PropertyName="_MSDeployDestinationWebServerAppHostConfigDirectory"  />
+      <Output TaskParameter="WebServerDirectory" PropertyName="_MSDeployDestinationWebServerDirectory"  />
+      <Output TaskParameter="WebServerManifest" PropertyName="_MSDeployDestinationWebServerManifest"  />
+    </MapUriToIisWebServer>
+
+    
+    <PropertyGroup>
+      <_PublishMsDeployServiceUrl>$(MsDeployServiceUrl)</_PublishMsDeployServiceUrl>
+      <_PublishMsDeployServiceUrl Condition="('$(MSDeployPublishMethod)'=='INPROC')"></_PublishMsDeployServiceUrl>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <MsDeploySourceProviderSetting Remove="@(MsDeploySourceProviderSetting)" />
+      <MsDeploySourceProviderSetting Include="$(MSDeployPublishSourceType)">
+        <Path>$(MSDeployPublishSourceRoot)</Path>
+        <EncryptPassword>$(DeployEncryptKey)</EncryptPassword>
+        <WebServerAppHostConfigDirectory>$(_MSDeploySourceWebServerAppHostConfigDirectory)</WebServerAppHostConfigDirectory>
+        <WebServerManifest>$(_MSDeploySourceWebServerManifest)</WebServerManifest>
+        <WebServerDirectory>$(_MSDeploySourceWebServerDirectory)</WebServerDirectory>
+      </MsDeploySourceProviderSetting>
+      <MsDeployDestinationProviderSetting Remove="@(MsDeployDestinationProviderSetting)" />
+      <MsDeployDestinationProviderSetting Include="$(MSDeployPublishDestinationType)">
+        <Path>$(MSDeployPublishDestinationRoot)</Path>
+        <ComputerName>$(_PublishMsDeployServiceUrl)</ComputerName>
+        <UserName>$(UserName)</UserName>
+        <Password>$(Password)</Password>
+        <EncryptPassword>$(DeployEncryptKey)</EncryptPassword>
+        <IncludeAcls>False</IncludeAcls>
+        <AuthType>$(AuthType)</AuthType>
+        <WebServerAppHostConfigDirectory>$(_MSDeployDestinationWebServerAppHostConfigDirectory)</WebServerAppHostConfigDirectory>
+        <WebServerManifest>$(_MSDeployDestinationWebServerManifest)</WebServerManifest>
+        <WebServerDirectory>$(_MSDeployDestinationWebServerDirectory)</WebServerDirectory>
+      </MsDeployDestinationProviderSetting>
+    </ItemGroup>
+
+    <!-- Debug/Diagnostic message is not localized-->
+    <Message Text="MSDeployPublish MsDeploySourceProviderSetting is @(MsDeploySourceProviderSetting)" Condition="$(EnablePackageProcessLoggingAndAssert)" />
+    <Message Text="MSDeployPublish MsDeployDestinationProviderSetting is @(MsDeployDestinationProviderSetting)" Condition="$(EnablePackageProcessLoggingAndAssert)"/>
+
+    <PropertyGroup>
+      <FilePreview Condition="'$(FilePreview)'==''">false</FilePreview>
+    </PropertyGroup>
+      
+    <ExportParametersFile
+      Condition="!$(UseDeclareParametersXMLInMsDeploy) And $(EnablePackageProcessLoggingAndAssert)"
+      Parameters="@(MsDeployDeclareParameters)"
+      DeclareSetParameterFile="$(PackageLogDir)\MSDeployPublish.parameters.xml"
+      GenerateFileEvenIfEmpty="True"
+      />
+
+    <!-- First delete the ParameterFile-->
+    <Delete Files="$(PublishParametersFile)"  Condition="Exists($(PublishParametersFile))" ContinueOnError="true"/>
+
+    <!-- Create the Parameterfile if needed-->
+    <ExportParametersFile
+      Condition="$(UseDeclareParametersXMLInMsDeploy)"
+      Parameters="@(MsDeployDeclareParameters)"
+      DeclareSetParameterFile="$(PublishParametersFile)"
+      IncludeDefaultValue="$(FilePreview)"
+      GenerateFileEvenIfEmpty="True"
+      />
+
+    <PropertyGroup>
+      <_VsPublishParametersFile></_VsPublishParametersFile>
+      <_VsPublishParametersFile Condition="$(UseDeclareParametersXMLInMsDeploy) and '$(_VsPublishParametersFile)'==''">$(PublishParametersFile)</_VsPublishParametersFile>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <!-- We will include the parameter when $(UseDeclareParametersXMLInMsDeploy) is false-->
+      <!-- We need to have those Parameters when it is direct publishing from manifest and not use -->
+      <_VsPublish_MsDeployDeclareParameters Include="@(MsDeployDeclareParameters)" Condition="!$(UseDeclareParametersXMLInMsDeploy) And !$(CreatePackageOnPublish)" />
+    </ItemGroup>
+
+
+    <VSMSDeploy
+      Condition="!$(UseMsdeployExe)"
+      MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+      Source="@(MsDeploySourceProviderSetting)"
+      Destination="@(MsDeployDestinationProviderSetting)"
+      DisableLink="$(PublishDisableLinks)"
+      EnableLink="$(PublishEnableLinks)"
+      AllowUntrustedCertificate="$(AllowUntrustedCertificate)"
+      BuildingInsideVisualStudio="$(BuildingInsideVisualStudio)"
+      SkipExtraFilesOnServer="$(SkipExtraFilesOnServer)"
+      SkipRuleItems="@(MsDeploySkipRules)"
+      SetParameterItems="@(_VsPublish_MsDeployDeclareParameters)"
+      OptimisticParameterDefaultValue="$(EnableOptimisticParameterDefaultValue)"
+      ImportSetParametersItems="$(_VsPublishParametersFile)"
+      WhatIf="$(FilePreview)"
+      RetryAttempts="$(RetryAttemptsForDeployment)"
+      EnableMSDeployBackup="$(EnableMSDeployBackup)"
+      InvokedByPublish="true"
+    >
+      <Output TaskParameter="Result" PropertyName="_PublishResult" />
+    </VSMSDeploy>
+    <MSdeploy
+          Condition="$(UseMsdeployExe)"
+          Verb="sync"
+          Source="@(MsDeploySourceProviderSetting)"
+          Destination="@(MsDeployDestinationProviderSetting)"
+          DisableLink="$(PublishDisableLinks)"
+          EnableLink="$(PublishEnableLinks)"
+          EnableRule="$(MsDeployDoNotDeleteRule)"
+          AllowUntrusted="$(AllowUntrustedCertificate)"          
+          SkipRuleItems="@(MsDeploySkipRules)"
+          SetParameterItems="@(_VsPublish_MsDeployDeclareParameters)"
+          OptimisticParameterDefaultValue="$(EnableOptimisticParameterDefaultValue)"
+          ImportSetParametersItems="$(_VsPublishParametersFile)"
+          RetryAttempts="$(RetryAttemptsForDeployment)"
+          ExePath="$(MSDeployPath)" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target ValidatePublishProfileSettings -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ValidatePublishProfileSettingsDependsOn>
+      $(OnBeforeValidatePublishProfileSettings);
+      $(ValidatePublishProfileSettingsDependsOn);
+    </ValidatePublishProfileSettingsDependsOn>
+  </PropertyGroup>
+
+  <Target Name="ValidatePublishProfileSettings"
+          DependsOnTargets="$(ValidatePublishProfileSettingsDependsOn)"
+          Condition="'$(_PublishProfileSet)' == 'true' Or '$(WebPublishProfileFile)' != '' ">
+    
+    <!--This is a phase separation point-->
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishValidatePublishProfileSettings"
+       ArgumentCount="1"
+       Arguments="$(PublishProfile)"
+       LogType="Message" />
+
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishInvalidatePublishProfileSettings"
+       Condition="'$(WebPublishProfileFile)' == '' Or !Exists($(WebPublishProfileFile))"
+       ArgumentCount="2"
+       Arguments="$(PublishProfile);$(WebPublishProfileFile)"
+       LogType="Error" />
+
+   <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishProfileInvalidPropertyValue"
+       Condition="'$(WebPublishMethod)' == '' Or '$(_WPPWebPublishMethodSupports.Contains(&quot;Web$(WebPublishMethod)Publish&quot;))' == 'false'"
+       ArgumentCount="3"
+       Arguments="$(PublishProfile);WebPublishMethod;$(WebPublishMethod)"
+       LogType="Error" />
+
+    <Error Text="Target ValidatePublishProfileSettings Failed"
+           Condition="('$(WebPublishProfileFile)' == '' Or !Exists($(WebPublishProfileFile)))or 
+           ('$(WebPublishMethod)' == '' Or '$(_WPPWebPublishMethodSupports.Contains(&quot;Web$(WebPublishMethod)Publish&quot;))' == 'false' )" />
+
+    <CallTarget Targets="$(OnAfterValidatePublishProfileSettings)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target WebMSDeployPublish -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <WebMSDeployPublishDependsOn>
+      MSDeployPublish;
+    </WebMSDeployPublishDependsOn>
+  </PropertyGroup>
+  <Target Name="WebMSDeployPublish" DependsOnTargets="$(WebMSDeployPublishDependsOn)">
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target WebPackagePublish -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <WebPackagePublishDependsOn>
+      Package;
+    </WebPackagePublishDependsOn>
+  </PropertyGroup>
+  <Target Name="WebPackagePublish" DependsOnTargets="$(WebPackagePublishDependsOn)">
+  </Target>
+
+  
+  <!--********************************************************************-->
+  <!--Target WebPublish -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <WebPublishDependsOn>
+      $(WebPublishDependsOn);
+      ValidatePublishProfileSettings;
+    </WebPublishDependsOn>
+    <WebPublishDependsOn Condition="'$(WebPublishMethod)' != ''">
+      $(WebPublishDependsOn);
+      Web$(WebPublishMethod)Publish;
+    </WebPublishDependsOn>
+
+  </PropertyGroup>
+  <Target Name="WebPublish" DependsOnTargets="$(WebPublishDependsOn)">
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PipelineDeployPhase -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PipelineDeployPhaseDependsOn>
+      $(OnBeforePipelineDeployPhase);
+      $(PipelineDeployPhaseDependsOn);
+      $(DeployTarget);
+    </PipelineDeployPhaseDependsOn>
+    <PipelineDeployPhaseAfterTargets>
+      $(PipelineDeployPhaseAfterTargets);
+    </PipelineDeployPhaseAfterTargets>
+  </PropertyGroup>
+
+  <Target Name="PipelineDeployPhase"
+          DependsOnTargets="$(PipelineDeployPhaseDependsOn)"
+          AfterTargets="$(PipelineDeployPhaseAfterTargets)">
+    <!--This is a phase separation point-->
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishPipelineDeployPhase"
+       LogType="Message" />
+    <!--<Message Text="Pipeline Deploy Phase" />-->
+    
+    <CallTarget Targets="$(OnAfterPipelineDeployPhase)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target DbDacFxPreview -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <DbDacFxPreviewDependsOn>
+      $(DbDacFxPreviewDependsOn);
+      GetMSDeployInstalledVersionPath;
+    </DbDacFxPreviewDependsOn>
+    <DbDacFxPreviewDependsOn Condition="('$(MSDeployPublishMethod)'=='INPROC')">
+      $(DbDacFxPreviewDependsOn);
+      LocalDbDacFxPreview;
+    </DbDacFxPreviewDependsOn >
+    <DbDacFxPreviewDependsOn Condition="('$(MSDeployPublishMethod)'!='INPROC')">
+      $(DbDacFxPreviewDependsOn);
+      RemoteDbDacFxPreview;
+    </DbDacFxPreviewDependsOn >
+  </PropertyGroup>
+  <Target Name="DbDacFxPreview" DependsOnTargets="$(DbDacFxPreviewDependsOn)">
+  </Target>
+  
+
+  <!--********************************************************************-->
+  <!--Target DbFullSqlPreview -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <DbFullSqlPreviewDependsOn>
+      $(DbFullSqlPreviewDependsOn);
+      GetMSDeployInstalledVersionPath;
+    </DbFullSqlPreviewDependsOn>
+  </PropertyGroup>
+  <Target Name="DbFullSqlPreview" DependsOnTargets="$(DbFullSqlPreviewDependsOn)">
+    
+    
+    <ItemGroup>
+      <_MsDeployDbFullSqlPreviewSourceNoPath Remove="@(_MsDeployDbFullSqlPreviewSourceNoPath)"  />
+    </ItemGroup>
+
+    <CreateItem Include="DbFullSql"
+                      AdditionalMetadata="$(_MsDeployDbFullSqlPreviewProviderSettings)" >
+      <Output TaskParameter="Include" ItemName="_MsDeployDbFullSqlPreviewSourceNoPath"/>
+    </CreateItem>
+
+  <ItemGroup>
+      <_MsDeployDbFullSqlPreviewSource Remove="@(_MsDeployDbFullSqlPreviewSource)" />
+      <_MsDeployDbFullSqlPreviewSource Include="@(_MsDeployDbFullSqlPreviewSourceNoPath)">
+        <Path>$(_MsDeployDBFullSqlPreviewSourceConnectionString)</Path>
+      </_MsDeployDbFullSqlPreviewSource>
+
+      <_MsDeployDbFullSqlPreviewDestination Remove="@(_MsDeployDbFullSqlPreviewDestination)" />
+      <_MsDeployDbFullSqlPreviewDestination Include="DbFullSql">
+        <Path>$(_MsDeployDbFullSqlPreviewOutputPath)</Path>
+      </_MsDeployDbFullSqlPreviewDestination>
+    </ItemGroup>
+
+
+    <VSMSDeploy Condition="!$(UseMsdeployExe)"
+       MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+       Source="@(_MsDeployDbFullSqlPreviewSource)"
+       Destination="@(_MsDeployDbFullSqlPreviewDestination)"
+       DeploymentTraceLevel="$(PackageTraceLevel)"
+       AllowUntrustedCertificate="$(AllowUntrustedCertificate)"
+       BuildingInsideVisualStudio="$(BuildingInsideVisualStudio)"
+       InvokedByPublish="true"
+       RetryAttempts="$(RetryAttemptsForDeployment)">
+    </VSMSDeploy>
+
+    <MSdeploy
+      Condition="$(UseMsdeployExe)"
+      Verb="sync"
+      Source="@(_MsDeployDbFullSqlPreviewSource)"
+      Destination="@(_MsDeployDbFullSqlPreviewDestination)"
+      RetryAttempts="$(RetryAttemptsForDeployment)"
+      AllowUntrusted="$(AllowUntrustedCertificate)"
+      ExePath="$(MSDeployPath)"
+      />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target ValidateDbDacFxPreviewSettings -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ValidateDbDacFxPreviewSettingsDependsOn>
+      $(ValidateDbDacFxPreviewSettingsDependsOn);
+      GetMSDeployInstalledVersionPath;
+    </ValidateDbDacFxPreviewSettingsDependsOn>
+  </PropertyGroup>
+  <Target Name="ValidateDbDacFxPreviewSettings" DependsOnTargets="$(ValidateDbDacFxPreviewSettingsDependsOn)">
+    <GetPublishingLocalizedString
+    Condition="'$(_MsDeployDbDacFxPreviewDestinationConnectionString)' == ''"
+    ID="PublishLocalizedString_MsBuildPropertySettingValue"
+    ArgumentCount="2"
+    Arguments="_MsDeployDbDacFxPreviewDestinationConnectionString;'$(_MsDeployDbDacFxPreviewDestinationConnectionString)'"
+     >
+      <Output TaskParameter="Result" PropertyName="_PublishLocalizedString_MSBuildTargetFailed_1" />
+    </GetPublishingLocalizedString>
+
+    <GetPublishingLocalizedString
+     Condition="'$(_MsDeployDbDacFxPreviewSourceFile)' == ''"
+     ID="PublishLocalizedString_MsBuildPropertySettingValue"
+     ArgumentCount="2"
+     Arguments="_MsDeployDbDacFxPreviewSourceFile;'$(_MsDeployDbDacFxPreviewSourceFile)'"
+     >
+      <Output TaskParameter="Result" PropertyName="_PublishLocalizedString_MSBuildTargetFailed_2" />
+    </GetPublishingLocalizedString>
+
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_MSBuildTargetFailed"
+       ArgumentCount="1"
+       Arguments="LocalDbDacFxPreview"
+       >
+      <Output TaskParameter="Result" PropertyName="_PublishLocalizedString_MSBuildTargetFailed_Preview" />
+    </GetPublishingLocalizedString>
+
+    <Error Condition="'$(_MsDeployDbDacFxPreviewDestinationConnectionString)' == '' Or '$(_MsDeployDbDacFxPreviewSourceFile)' == ''"
+           Text="$(_PublishLocalizedString_MSBuildTargetFailed_Preview) $(_PublishLocalizedString_MSBuildTargetFailed_1) $(_PublishLocalizedString_MSBuildTargetFailed_2)" />
+  </Target>
+
+
+    <!--********************************************************************-->
+  <!--Target LocalDbDacFxPreview -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <LocalDbDacFxPreviewDependsOn>
+      $(LocalDbDacFxPreviewDependsOn);
+      GetMSDeployInstalledVersionPath;
+      ValidateDbDacFxPreviewSettings;
+    </LocalDbDacFxPreviewDependsOn>
+  </PropertyGroup>
+  <Target Name="LocalDbDacFxPreview" DependsOnTargets="$(LocalDbDacFxPreviewDependsOn)">
+
+    <!--msdeploy
+        -verb:
+            sync
+        -source:
+            DbDacFx="C:\input.dacpac"
+        -dest:
+            DbDacFx="[Destination Connection String]",
+            dacpacAction=Script,
+            OutputPath="C:\output.sql"
+    -->
+    <ItemGroup>
+      <_MsDeployDbDacFxPreviewPreSourceOptions Remove="@(_MsDeployDbDacFxPreviewPreSourceOptions)" />
+      <_MsDeployDbDacFxPreviewPreSourceOptions Include="DbDacFx">
+        <includeData>False</includeData>
+        <AdditionalProviderSettings>includeData</AdditionalProviderSettings>
+      </_MsDeployDbDacFxPreviewPreSourceOptions>
+    </ItemGroup>
+
+    <CreateDacPac
+      Source="$(_MsDeployDbDacFxPreviewSourceFile)"
+      OutputDacPacPath="$(_MsDeployDbDacFxPreviewAutoScriptPath)"
+      RelativeRootPath="$(WebPublishPipelineSourceRootDirectory)"
+      MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+        UseMSDeployExe="$(UseMsdeployExe)"
+        MSDeployExePath="$(MSDeployPath)"
+        LocalDBVersionToUseForSqlExpress="$(_LocalDBVersionToUseForSqlExpress)"
+      AdditionalSourceFlags="@(_MsDeployDbDacFxPreviewPreSourceOptions)"
+      >
+      <Output TaskParameter="Result" PropertyName="_MsDeployDbDacFxPreviewDacpacFile"  />
+    </CreateDacPac>
+      
+   
+    <ItemGroup>
+      <_MsDeployDbDacFxPreviewSource Remove="@(_MsDeployDbDacFxPreviewSource)" />
+      <_MsDeployDbDacFxPreviewSource Include="DbDacFx">
+        <Path>$([System.IO.Path]::GetFullPath($(_MsDeployDbDacFxPreviewDacpacFile)))</Path>
+      </_MsDeployDbDacFxPreviewSource>
+
+      <_MsDeployDbDacFxPreviewDestination Remove="@(_MsDeployDbDacFxPreviewDestination)" />
+      <_MsDeployDbDacFxPreviewDestination Include="DbDacFx">
+        <Path>$(_MsDeployDbDacFxPreviewDestinationConnectionString)</Path>
+        <dacpacAction>Script</dacpacAction>
+      </_MsDeployDbDacFxPreviewDestination>
+    </ItemGroup>
+
+    <VSMSDeploy Condition="!$(UseMsdeployExe)"
+       MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+       Source="@(_MsDeployDbDacFxPreviewSource)"
+       Destination="@(_MsDeployDbDacFxPreviewDestination)"
+       DeploymentTraceLevel="$(PackageTraceLevel)"
+       AllowUntrustedCertificate="$(AllowUntrustedCertificate)"
+       BuildingInsideVisualStudio="$(BuildingInsideVisualStudio)"
+       InvokedByPublish="true"
+       RetryAttempts="$(RetryAttemptsForDeployment)">
+    </VSMSDeploy>
+
+    <MSdeploy
+      Condition="$(UseMsdeployExe)"
+      Verb="sync"
+      Source="@(_MsDeployDbDacFxPreviewSource)"
+      Destination="@(_MsDeployDbDacFxPreviewDestination)"
+      RetryAttempts="$(RetryAttemptsForDeployment)"
+      AllowUntrusted="$(AllowUntrustedCertificate)"
+      ExePath="$(MSDeployPath)"
+      />
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target RemoteDbDacFxPreview -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <RemoteDbDacFxPreviewDependsOn>
+      $(RemoteDbDacFxPreviewDependsOn);
+      GetMSDeployInstalledVersionPath;
+      GenerateGlobalPublishSetting;
+      ValidateDbDacFxPreviewSettings;
+      _DetectDbDacFxProvider;
+    </RemoteDbDacFxPreviewDependsOn>
+  </PropertyGroup>
+  <Target Name="RemoteDbDacFxPreview" DependsOnTargets="$(RemoteDbDacFxPreviewDependsOn)">
+    <PropertyGroup>
+      <_PublishMsDeployServiceUrl>$(MsDeployServiceUrl)</_PublishMsDeployServiceUrl>
+      <_PublishMsDeployServiceUrl Condition="('$(MSDeployPublishMethod)'=='INPROC')"></_PublishMsDeployServiceUrl>
+    </PropertyGroup>
+
+
+    <ItemGroup>
+      <_MsDeployDbDacFxPreviewPreSourceOptions Remove="@(_MsDeployDbDacFxPreviewPreSourceOptions)" />
+      <_MsDeployDbDacFxPreviewPreSourceOptions Include="DbDacFx">
+        <includeData>False</includeData>
+        <AdditionalProviderSettings>includeData</AdditionalProviderSettings>
+      </_MsDeployDbDacFxPreviewPreSourceOptions>
+    </ItemGroup>
+    
+    <CreateDacPac
+    Source="$(_MsDeployDbDacFxPreviewSourceFile)"
+    OutputDacPacPath="$(_MsDeployDbDacFxPreviewAutoScriptPath)"
+    RelativeRootPath="$(WebPublishPipelineSourceRootDirectory)"
+    MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+      UseMSDeployExe="$(UseMsdeployExe)"
+      MSDeployExePath="$(MSDeployPath)"
+      LocalDBVersionToUseForSqlExpress="$(_LocalDBVersionToUseForSqlExpress)"
+      AdditionalSourceFlags="@(_MsDeployDbDacFxPreviewPreSourceOptions)"
+      >
+      <Output TaskParameter="Result" PropertyName="_MsDeployDbDacFxPreviewDacpacFile"  />
+    </CreateDacPac>
+
+    <MapUriToIisWebServer Condition="('$(MSDeployPublishMethod)'=='INPROC') And ('$(MsDeployServiceUrl)' != '') "
+                          ProjectIisUrl="$(MsDeployServiceUrl)"
+                          UseIISExpressHintFlag="$(_DeploymentUseIISExpressHint)">
+      <Output TaskParameter="WebServerAppHostConfigDirectory" PropertyName="_MSDeployDestinationWebServerAppHostConfigDirectory"  />
+      <Output TaskParameter="WebServerDirectory" PropertyName="_MSDeployDestinationWebServerDirectory"  />
+      <Output TaskParameter="WebServerManifest" PropertyName="_MSDeployDestinationWebServerManifest"  />
+    </MapUriToIisWebServer>
+
+    <ItemGroup>
+      <_MsDeployRemoteDbDacFxPreviewSource Remove="@(_MsDeployRemoteDbDacFxPreviewSource)" />
+      <_MsDeployRemoteDbDacFxPreviewSource Include="DbDacFx">
+        <Path>$([System.IO.Path]::GetFullPath($(_MsDeployDbDacFxPreviewDacpacFile)))</Path>
+      </_MsDeployRemoteDbDacFxPreviewSource>
+
+      <_MsDeployRemoteDbDacFxPreviewDestination Remove="@(_MsDeployRemoteDbDacFxPreviewDestination)" />
+      <_MsDeployRemoteDbDacFxPreviewDestination Include="DbDacFx">
+        <Path>$(_MsDeployDbDacFxPreviewDestinationConnectionString)</Path>
+        <ComputerName>$(_PublishMsDeployServiceUrl)</ComputerName>
+        <UserName>$(UserName)</UserName>
+        <Password>$(Password)</Password>
+        <AuthType>$(AuthType)</AuthType>
+        <WebServerAppHostConfigDirectory>$(_MSDeployDestinationWebServerAppHostConfigDirectory)</WebServerAppHostConfigDirectory>
+        <WebServerManifest>$(_MSDeployDestinationWebServerManifest)</WebServerManifest>
+        <WebServerDirectory>$(_MSDeployDestinationWebServerDirectory)</WebServerDirectory>
+        <dacpacAction>Script</dacpacAction>
+      </_MsDeployRemoteDbDacFxPreviewDestination>
+    </ItemGroup>
+
+    <VSMSDeploy
+          Condition="!$(UseMsdeployExe)"
+          HighImportanceEventTypes="DbDacFxTraceEventArgs"
+          MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+          Source="@(_MsDeployRemoteDbDacFxPreviewSource)"
+          Destination="@(_MsDeployRemoteDbDacFxPreviewDestination)"
+          AllowUntrustedCertificate="$(AllowUntrustedCertificate)"
+          BuildingInsideVisualStudio="$(BuildingInsideVisualStudio)"
+          InvokedByPublish="true"
+          RetryAttempts="$(RetryAttemptsForDeployment)"
+    >
+      <Output TaskParameter="Result" PropertyName="_PublishResult" />
+    </VSMSDeploy>
+    <MSdeploy
+          Condition="$(UseMsdeployExe)"
+          Verb="sync"
+          Verbose="true"
+          Source="@(_MsDeployRemoteDbDacFxPreviewSource)"
+          Destination="@(_MsDeployRemoteDbDacFxPreviewDestination)"
+          AllowUntrusted="$(AllowUntrustedCertificate)"
+          RetryAttempts="$(RetryAttemptsForDeployment)"
+          ExePath="$(MSDeployPath)" />
+  </Target>
+
+    <!--********************************************************************-->
+    <!-- Target _CheckRemoteFx45-->
+    <!--********************************************************************-->
+    <Target Name="_CheckRemoteFx45" Condition="'$(TargetFrameworkVersion)' == 'v4.5' and $(_Enable45Check) != 'false'">
+      <CheckRemoteFx45 Condition="'$(MsDeployServiceUrl)' != ''"
+        ServiceUrl="$(MsDeployServiceUrl)">
+       </CheckRemoteFx45>
+    </Target>
+  
+
+    <!--********************************************************************-->
+    <!-- Target _DetectDbDacFxProvider-->
+    <!--********************************************************************-->
+    <Target Name="_DetectDbDacFxProvider">
+      <PropertyGroup>
+        <_PublishMsDeployServiceUrl>$(MsDeployServiceUrl)</_PublishMsDeployServiceUrl>
+        <_PublishMsDeployServiceUrl Condition="('$(MSDeployPublishMethod)'=='INPROC')"></_PublishMsDeployServiceUrl>
+        <_MSDeployPublishSourceType>dbDacFx</_MSDeployPublishSourceType>
+      </PropertyGroup>
+
+      <ItemGroup>
+        <_MsDeploySourceProviderSetting Remove="@(_MsDeploySourceProviderSetting)" />
+        <_MsDeploySourceProviderSetting Include="$(_MSDeployPublishSourceType)">
+          <ComputerName>$(_PublishMsDeployServiceUrl)</ComputerName>
+          <UserName>$(UserName)</UserName>
+          <Password>$(Password)</Password>
+          <AuthType>$(AuthType)</AuthType>
+        </_MsDeploySourceProviderSetting>
+        <_DbDacFxDestinationPathesToPublish Include="$([MSBuild]::Escape($(_MsDeployDbDacFxPreviewDestinationConnectionString)))" />
+      </ItemGroup>
+
+      <DetectRemoteProvider Condition="'$(_PublishMsDeployServiceUrl)' != ''"
+        MSDeployVersionsToTry="$(_MSDeployVersionsToTry)"
+        Source="@(_MsDeploySourceProviderSetting)"
+        ProviderName="dbDacFx"
+        ProviderPathes="@(_DbDacFxDestinationPathesToPublish)">
+      </DetectRemoteProvider>
+
+    </Target>
+
+  <!-- The build process can be extended in a similar way as MS.Common.targets -->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+</Project>

BIN
nancy/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.XmlTransform.dll


+ 530 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.WebSite.Publishing.targets

@@ -0,0 +1,530 @@
+<!--
+***********************************************************************************************
+Microsoft.WebDeploy.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard build process for web deploy projects.
+
+Copyright (C) 2005 Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+  <UsingTask TaskName="FilterByItems" AssemblyFile="$(MSBuildThisFileDirectory)\Microsoft.Web.Publishing.Tasks.dll" Condition="Exists('Microsoft.Web.Publishing.Tasks.dll')"/>
+  <UsingTask TaskName="CollectFilesinFolder" AssemblyFile="$(MSBuildThisFileDirectory)\Microsoft.Web.Publishing.Tasks.dll" Condition="Exists('Microsoft.Web.Publishing.Tasks.dll')"/>
+  <UsingTask TaskName="CopyPipelineFiles" AssemblyFile="$(MSBuildThisFileDirectory)\Microsoft.Web.Publishing.Tasks.dll" Condition="Exists('Microsoft.Web.Publishing.Tasks.dll')"/>
+
+  <!--***************************************************************-->
+  <!-- Setting up the property like MS.Common.Targets files has it.  -->
+  <!--This is to handle some project doesn't include the MS.Common.Targets file-->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <_WebProjectType>WebSite</_WebProjectType>
+    <OutputPath Condition="'$(OutputPath)' == ''">$([System.IO.Path]::GetTempPath())WebSitePublish\$([System.IO.Path]::GetFileName($(MSBuildProjectDirectory)))-$(MSBuildProjectDirectory.GetHashCode())</OutputPath>
+    <OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
+    <OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
+    <!-- Example, bin\Debug\. Ensure OutDir has a trailing slash, so it can be concatenated -->
+    <OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(BaseIntermediateOutputPath)'=='' ">
+    <BaseIntermediateOutputPath>$(OutputPath)obj\</BaseIntermediateOutputPath>
+    <BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
+  </PropertyGroup>
+
+  <PropertyGroup Condition=" '$(IntermediateOutputPath)' == '' ">
+    <IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' Or '$(PlatformName)' == ''">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
+    <IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
+    <IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
+  </PropertyGroup>
+ 
+  <Target Name="PrepareResourceNames" />
+  <Target Name="ComputeIntermediateSatelliteAssemblies" />
+  <Target Name="GetCopyToOutputDirectoryItems" />
+  <Target Name="_SGenCheckForOutputs" />
+  <Target Name="CreateManifestResourceNames" />
+  
+  <!--
+    ============================================================
+  Initialial setup
+    ============================================================
+  -->
+  <PropertyGroup>
+    <!-- Make sure OutputPath has a trailing slash on it -->
+    <WDOutDir Condition="'$(OutDir)' != '$(OutputPath)'">$(OutDir)</WDOutDir>
+    <CopyBeforeBuildTargetPath  Condition="'$(CopyBeforeBuildTargetPath)' == ''">$(IntermediateOutputPath)AspnetCompileMerge\source</CopyBeforeBuildTargetPath>
+    <_WDPSourceWebPhysicalPath>$(SourceWebPhysicalPath)</_WDPSourceWebPhysicalPath>
+    <TempBuildDir Condition="'$(TempBuildDir)' == ''" >$(IntermediateOutputPath)TempBuildDir</TempBuildDir>
+    <_ExcludeAppOffline Condition="'$(_ExcludeAppOffline)' ==''">true</_ExcludeAppOffline>
+    <_ExcludeWebInfo Condition="'$(_ExcludeWebInfo)' ==''">true</_ExcludeWebInfo>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <_SkipHiddenItems Condition="'$(_SkipHiddenItems)'==''">true</_SkipHiddenItems>
+  </PropertyGroup>
+  <ItemGroup>
+    <ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\App_Data\PublishProfiles\**\*.*"/>
+    <ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\*.publishproj"/>
+    <ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\app_offline.htm" Condition="'$(_ExcludeAppOffline)'== 'true'"/>
+    <ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\Bin\*.refresh" />
+    <ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\**\*.exclude" />
+    <ExcludeFromPackageFiles Include="$(SourceWebPhysicalPath)\**\*.webinfo" Condition="'$(_ExcludeWebInfo)'=='true'" />
+  </ItemGroup>
+  
+  <PropertyGroup Condition="'$(SourceWebMetabasePath)' != ''">
+    <UseIis Condition="'$(UseIis)'==''">True</UseIis>
+    <IisUrl Condition="'$(IisUrl)'==''">$(SourceWebProjectPath)</IisUrl>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(SourceWebMetabasePath)' == ''">
+    <UseIis Condition="'$(UseIis)'==''">false</UseIis>
+  </PropertyGroup>
+  
+  <!-- Create the output path as an item so that we can use %(FullPath) on it. -->
+  <!-- _PublishedWebsites folder enables team build scenarios when OutDir is overiden -->
+  <ItemGroup>
+    <_WDOutputPathItem Condition="'$(WDOutDir)' != '' and !HasTrailingSlash('$(WDOutDir)')" Include="$(WDOutDir)\_PublishedWebsites\$(MSBuildProjectName)\"/>
+    <_WDOutputPathItem Condition="'$(WDOutDir)' != '' and HasTrailingSlash('$(WDOutDir)')" Include="$(WDOutDir)_PublishedWebsites\$(MSBuildProjectName)\"/>
+    <_WDOutputPathItem Condition="'$(WDOutDir)' == ''" Include="$(OutputPath)"/>
+    <_WDPSourceWebPathItem Include="$(_WDPSourceWebPhysicalPath)"/>
+    <_KeyFile Include="$(KeyFile)"/>
+  </ItemGroup>
+
+  <!-- AvailablePlatforms is the list of platform targets available. -->
+  <PropertyGroup>
+    <AvailablePlatforms>Any CPU</AvailablePlatforms>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <WDTargetDir Condition="'$(WDTargetDir)' == ''">$(WDOutDir)\_PublishedWebsites\$(MSBuildProjectName)\</WDTargetDir>
+    <_FullSourceWebDir>$(_WDPSourceWebPhysicalPath)</_FullSourceWebDir>
+    <_FullKeyFile Condition="'$(KeyFile)' != ''">@(_KeyFile->'%(FullPath)')</_FullKeyFile>
+  </PropertyGroup>
+
+  <!--
+    The set of properties passed to the aspnet_compiler when merge is not enabled
+  -->
+  <PropertyGroup>
+      <_AspNetCompilerFixedNames  Condition="'$(UseMerge)' != 'true'">$(UseFixedNames)</_AspNetCompilerFixedNames>
+      <_AspNetCompilerKeyContainer Condition="'$(UseMerge)' != 'true'">$(KeyContainer)</_AspNetCompilerKeyContainer>
+      <_AspNetCompilerMetabasePath Condition="'$(UseMetabasePath)' == 'true'">$(SourceWebMetabasePath)</_AspNetCompilerMetabasePath>
+      <_AspNetCompilerSourceWebPath Condition="'$(UseMetabasePath)' != 'true'">$(_FullSourceWebDir)</_AspNetCompilerSourceWebPath>
+      <_AspNetCompilerVirtualPath Condition="'$(UseMetabasePath)' != 'true'">$(SourceWebVirtualPath)</_AspNetCompilerVirtualPath>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <BuildingProject>true</BuildingProject>
+  </PropertyGroup>
+  
+  <PropertyGroup>
+    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+  </PropertyGroup>
+  <!--
+    ============================================================
+  Basic Hook in for WPP
+    ============================================================
+  -->
+  <PropertyGroup>
+    <WebPublishPipelineProjectDirectory Condition="'$(WebPublishPipelineProjectDirectory)'==''">$(MSBuildProjectDirectory)</WebPublishPipelineProjectDirectory>
+    <DefaultDeployIisAppPhysicalPath Condition="'$(DefaultDeployIisAppPhysicalPath)'==''">$(MSBuildProjectDirectory)$(DefaultMsDeployAltSuffix)</DefaultDeployIisAppPhysicalPath>
+    <FilesToIncludeForPublish>AllFilesInProjectFolder</FilesToIncludeForPublish>
+    <!--We do want to exclude TransformAssistFile-->
+    <ExcludeTransformAssistFilesFromPublish Condition="'$(ExcludeTransformAssistFilesFromPublish)'==''">True</ExcludeTransformAssistFilesFromPublish>
+    <ExcludeGeneratedDebugSymbol Condition="'$(ExcludeGeneratedDebugSymbol)'=='' And '$(DebugSymbols)' == 'true'">False</ExcludeGeneratedDebugSymbol>
+    <ProjectParametersXMLFile Condition="'$(ProjectParametersXMLFile)'=='' And Exists('$(MSBuildProjectDirectory)\Parameters.xml')">$(OutputPath)\Parameters.xml</ProjectParametersXMLFile>
+    <_WDPDefaultIntermediateOutputPathPathRoot Condition="'$(_WPPDefaultIntermediateOutputPathPathRoot)' == ''">$(OutputPath)\</_WDPDefaultIntermediateOutputPathPathRoot>
+  </PropertyGroup>
+ 
+  <PropertyGroup Condition="'$(_WDPDefaultIntermediateOutputPath)' == ''">
+    <_WDPDefaultIntermediateOutputPath>$(IntermediateOutputPath)</_WDPDefaultIntermediateOutputPath>
+    <_WDPDefaultIntermediateOutputPath Condition="!$([System.IO.path]::IsPathRooted($(IntermediateOutputPath)))">$(_WDPDefaultIntermediateOutputPathPathRoot)$(IntermediateOutputPath)</_WDPDefaultIntermediateOutputPath>
+  </PropertyGroup>
+
+  <!--******************************************************-->
+  <!--Include the WPP targets file-->
+  <!--******************************************************-->
+  <Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />
+  <Import Project="Microsoft.Web.Publishing.targets" />
+  
+  <PropertyGroup>
+    <!--In earlier version of WPP, Web.config transformation doesn't support anthing other than the Msbuild Project project folder to find the web.config-->
+    <PreTransformWebConfigDependsOn>
+      $(PreTransformWebConfigDependsOn);
+      FixupTransformAssistFilesAsExclude;
+    </PreTransformWebConfigDependsOn>
+  </PropertyGroup>
+  
+  <ItemGroup>
+    <_AllExecutableUnderBin Include="$(SourceWebPhysicalPath)\Bin\*.dll;$(SourceWebPhysicalPath)\Bin\*.exe"/>
+    <ExcludeFromPackageFiles Include="@(_AllExecutableUnderBin -> '%(RelativeDir)%(FileName).xml')" Condition=" '$(ExcludeXmlAssemblyFiles)'=='true' "/>
+  </ItemGroup>
+  
+  <Target Name="FixupTransformAssistFilesAsExclude"
+          DependsOnTargets="CollectWebConfigsToTransform"
+          Condition="'$(FixupTransformAssistFilesAsExclude)' != 'False'">
+    <PropertyGroup>
+       <_WDP_IdentifyTransformAssistFile>web\.[^\\\.]*\.config$</_WDP_IdentifyTransformAssistFile>
+    </PropertyGroup>
+    <!--Find all item with web.*.config-->
+    <CollectFilesinFolder RootPath="$(WebPublishPipelineProjectDirectory)"
+                          RelativePathMatchs="$(_WDP_IdentifyTransformAssistFile)" >
+      <Output TaskParameter="Result" ItemName="_WDP_WebConfigAssistFilesToFixupTemp" />
+    </CollectFilesinFolder>
+
+    <FilterByItems PipelineItems="@(FilesForPackagingFromProject)"
+                  Filter="@(_WDP_WebConfigAssistFilesToFixupTemp)">
+      <Output TaskParameter="InFilter" ItemName="_WDP_WebConfigAssistFilesToFixup"/>
+    </FilterByItems>
+    
+    <ItemGroup>
+      <!--Change all web.*.config to full path and add DependentUpon with Web.config-->
+      <FilesForPackagingFromProject Remove="@(_WDP_WebConfigAssistFilesToFixup)" />
+      <FilesForPackagingFromProject Include="@(_WDP_WebConfigAssistFilesToFixup->'$(WebPublishPipelineProjectDirectory)%(Identity)')">
+        <DependentUpon>Web.config</DependentUpon>
+      </FilesForPackagingFromProject>
+    </ItemGroup>
+  </Target>
+
+  <!--
+    ============================================================
+                            _PrepareForBuild
+
+    Sets up variables in preparation to build.
+    ============================================================
+    -->
+    <Target Name="_PrepareForBuild">
+        <!-- 
+        Here converting to a property is required because TargetDir and TargetPath are defined 
+        to contain an item list. We want that item list to be expanded so that it can be used
+        as a regular property value and not as an item-list-with-transform.
+        -->
+      <PropertyGroup>
+        <WDTargetDir>$(WDTargetDir)</WDTargetDir>
+      </PropertyGroup>
+      <PropertyGroup>
+        <_FullSourceWebDir>$(_FullSourceWebDir)</_FullSourceWebDir>
+      </PropertyGroup>
+      
+      <MakeDir Directories="$(IntermediateOutputPath)" />
+    </Target>
+
+  <!--
+    ============================================================
+                              _CollectFilesForCopyBeforeBuild
+
+    Copy the web to a new folder excluding predefined items in @(ExcludeFromBuild)
+    <ItemGroup>
+      <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\Test\**\*.*"/>
+      <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\Images\**\*.*"/>
+    </ItemGroup>
+    The following support regular expreesion Exclude For example
+    <PropertyGroup>
+      <_WDPExcludeFullPathFromBuildRegEx>$(_WDPExcludeFullPathFromBuildRegEx);C:\\myfoo</_WDPExcludeFullPathFromBuildRegEx>
+      <_WDPExcludeRelativePathFromBuildRegex>$(_WDPExcludeRelativePathFromBuildRegex);[^\\]*\.scc$;[^\\]*\.vssscc$;[^\\]*\.vspscc$</_WDPExcludeRelativePathFromBuildRegex>
+    </PropertyGroup>
+    <CopyBeforeBuildTargetPath  Condition="'$(CopyBeforeBuildTargetPath)' == ''">$(IntermediateOutputPath)Source</CopyBeforeBuildTargetPath>
+    ============================================================
+    -->
+  <ItemDefinitionGroup>
+    <_WebFiles>
+      <DestinationRelativePath></DestinationRelativePath>
+      <Exclude>False</Exclude>
+      <FromTarget>Unknown</FromTarget>
+      <Category>Run</Category>
+      <ProjectFileType>Default</ProjectFileType>
+    </_WebFiles>
+  </ItemDefinitionGroup>
+
+  <Target Name="_CollectFilesForCopyBeforeBuild"
+          DependsOnTargets="$(_CollectFilesForCopyBeforeBuildDependsOn)">
+
+    <!--********************************************************************-->
+    <!-- Enforce that all items have these metadata values -->
+    <!-- Default for Exclude is False -->
+    <!--********************************************************************-->
+    <CollectFilesinFolder RootPath="$(_WDPSourceWebPhysicalPath)"
+                         ExcludeFullPathMatchs="$(_WDPExcludeFullPathFromBuildRegEx)"
+                         ExcludeRelativePathMatchs="$(_WDPExcludeRelativePathFromBuildRegex)">
+      <Output TaskParameter="Result" ItemName="_WebFilesNoMetadata" />
+    </CollectFilesinFolder>
+
+    <PropertyGroup>
+      <_OriginalSourceWebPhysicalFullPath>$([System.IO.Path]::GetFullPath($(SourceWebPhysicalPath)))</_OriginalSourceWebPhysicalFullPath>
+      <_OriginalSourceWebPhysicalFullPath Condition="!HasTrailingSlash('$(_OriginalSourceWebPhysicalFullPath)')">$(_OriginalSourceWebPhysicalFullPath)\</_OriginalSourceWebPhysicalFullPath>
+    </PropertyGroup>
+
+    <!-- For Team Build scenarios when WAP is used the exclude may be different from the source path -->
+    <ItemGroup Condition ="'$(_WDPSourceWebPhysicalPath)' != '$(SourceWebPhysicalPath)'">
+      <_WebFilesExclude Include="%(ExcludeFromBuild.Identity)">
+        <SourceRelativePath Condition="$([System.String]::new(%(ExcludeFromBuild.FullPath)).StartsWith($(_OriginalSourceWebPhysicalFullPath), StringComparison.OrdinalIgnoreCase ))" >$([System.String]::new(%(ExcludeFromBuild.FullPath)).SubString($(_OriginalSourceWebPhysicalFullPath.Length)))</SourceRelativePath>
+      </_WebFilesExclude>
+      <_WebFilesExclude Condition="'%(SourceRelativePath)'==''">
+        <SourceRelativePath>%(Identity)</SourceRelativePath>
+      </_WebFilesExclude>
+      <_WebFilesNoMetadata Remove="%(_WebFilesExclude.SourceRelativePath)" Condition="'%(_WebFilesExclude.SourceRelativePath)' != ''"/>
+    </ItemGroup>
+
+    <!-- Log debug for potential issue -->
+    <WriteLinesToFile Condition ="$(EnablePackageProcessLoggingAndAssert) And '$(_WDPSourceWebPhysicalPath)' != '$(SourceWebPhysicalPath)'"
+                  Encoding="utf-8"
+                  File="$(IntermediateOutputPath)\_WebFilesExclude.txt"
+                  Lines="@(_WebFilesExclude->'
+                      Files:%(Identity) 
+                      SourceRelativePath:%(SourceRelativePath)')"
+                  Overwrite="True" />
+
+    <!-- _WebFilesNoMetadata doesn't have metadata yet, need to fill the data.  Fill in the metadata now for CopyPipelineFiles to use -->
+    <ItemGroup>
+      <_WebFiles Include="$([System.IO.Path]::Combine($(_WDPSourceWebPhysicalPath), %(_WebFilesNoMetadata.Identity)))" >
+        <DestinationRelativePath>%(_WebFilesNoMetadata.Identity)</DestinationRelativePath>
+      </_WebFiles>
+    </ItemGroup>
+
+    <!-- For backwards compatability -->
+    <ItemGroup Condition ="'$(_WDPSourceWebPhysicalPath)' == '$(SourceWebPhysicalPath)'">
+      <_WebFiles Remove="@(ExcludeFromBuild)" />
+    </ItemGroup>
+
+    <MakeDir Directories="$(IntermediateOutputPath)" />
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(IntermediateOutputPath)\webfilesToBeCopied.txt"
+                      Lines="@(_WebFiles->'
+                      Files:%(Identity) 
+                      FromTarget:%(FromTarget)
+                      DestinationRelativePath:%(DestinationRelativePath)')"
+                      Overwrite="True" />
+  </Target>
+
+  <Target Name="_CopyBeforeBuild"
+          Condition=" '$(EnableCopyBeforeBuild)' == 'true' or '@(ExcludeFromBuild)' != ''  "
+          DependsOnTargets="_CollectFilesForCopyBeforeBuild">
+
+    <ItemGroup>
+      <_WDPAllExtraFilesUnderTempFolder Condition="'$(CopyBeforeBuildTargetPath)' != ''" Include="$(CopyBeforeBuildTargetPath)\**" />
+      <_WDPAllExtraFilesUnderTempFolder
+        Remove="@(FilesForPackagingFromProject->'$(CopyBeforeBuildTargetPath)\%(DestinationRelativePath)')" />
+    </ItemGroup>
+    <!-- Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject) -->
+    <Delete Files="@(_WDPAllExtraFilesUnderTempFolder)"  />
+
+    <!-- This method supports incremental copy, instead of a full copy everytime -->
+    <!-- We've already expanded the path as relative path to the project. There is no need for sourceDirectory -->
+    <CopyPipelineFiles PipelineItems="@(_WebFiles)"
+                           SourceDirectory="$(MSBuildProjectDirectory)" 
+                           TargetDirectory="$(CopyBeforeBuildTargetPath)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_WebFilesCopied"/>
+    </CopyPipelineFiles>
+    
+    <PropertyGroup>
+      <_AspNetCompilerSourceWebPath>$(CopyBeforeBuildTargetPath)</_AspNetCompilerSourceWebPath>
+    </PropertyGroup>
+  </Target>
+
+  <!--
+    ============================================================
+                              Clean
+    ============================================================
+   -->
+  <Target Name="Clean">
+    <PropertyGroup>
+      <Clean>true</Clean>
+    </PropertyGroup>
+      
+    <RemoveDir Condition="Exists('$(CopyBeforeBuildTargetPath)')" Directories="$(CopyBeforeBuildTargetPath)"/>
+    <RemoveDir Condition="Exists('$(TempBuildDir)')" Directories="$(TempBuildDir)" />
+    <RemoveDir Condition="Exists('$(WDTargetDir)')" Directories="$(WDTargetDir)" />
+  </Target>
+
+  <!--
+    ============================================================
+                              Reference Resolving
+
+    Updates the bin folder with the lastest .refresh files
+    ============================================================
+    -->
+    <Target Name="_ResolveAssemblyReferencesWithRefreshFile" DependsOnTargets="_PrepareForBuild">
+      <ItemGroup>
+        <References_RefreshFile Include="$(_FullSourceWebDir)\Bin\*.refresh"/>
+      </ItemGroup>
+      <ReadLinesFromFile File="%(References_RefreshFile.Identity)" Condition=" '%(References_RefreshFile.Identity)' != '' ">
+          <Output TaskParameter="Lines" ItemName="References_ReferenceRelPath" />
+      </ReadLinesFromFile>
+      <CombinePath BasePath="$(_FullSourceWebDir)" Paths="@(References_ReferenceRelPath)">
+          <Output TaskParameter="CombinedPaths" ItemName="References" />
+      </CombinePath>
+      
+      <Copy 
+        SourceFiles="@(References->'%(FullPath)')" 
+        DestinationFolder="$(_FullSourceWebDir)\Bin\" 
+        Condition="!Exists('%(References.Identity)')" 
+        ContinueOnError="true" 
+        SkipUnchangedFiles="true"
+        Retries="$(CopyRetryCount)"
+        RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    </Target>
+
+   <!--
+    ============================================================
+                                        AfterResolveReferences
+    ============================================================
+    -->
+  <Target Name="AfterResolveReferences">
+    
+    <Copy SourceFiles="@(ReferencePath->'%(FullPath)')"
+        DestinationFolder="$(_FullSourceWebDir)\Bin\"
+        ContinueOnError="true"
+        SkipUnchangedFiles="true"
+        Retries="$(CopyRetryCount)"
+        RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    
+    <Copy SourceFiles="@(ReferenceComWrappersToCopyLocal); @(ResolvedIsolatedComModules); @(_DeploymentLooseManifestFile); @(NativeReferenceFile)"
+        DestinationFolder="$(_FullSourceWebDir)\bin"
+        SkipUnchangedFiles="true"
+        Retries="$(CopyRetryCount)"
+        RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+    <Copy SourceFiles="@(ReferenceCopyLocalPaths)"
+         DestinationFiles="@(ReferenceCopyLocalPaths->'$(_FullSourceWebDir)\bin\%(DestinationSubDirectory)%(Filename)%(Extension)')"
+         SkipUnchangedFiles="true"
+         Retries="$(CopyRetryCount)"
+         RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+  </Target>
+
+  <!--
+    ============================================================
+                              Build
+    The main build entry point.
+    ============================================================
+    -->
+  <PropertyGroup>
+    <BuildDependsOn>
+      _PrepareForBuild;
+      ResolveProjectReferences;
+      _ResolveAssemblyReferencesWithRefreshFile;
+      ResolveReferences;
+      _CopyBeforeBuild;
+    </BuildDependsOn>
+    <PipelineDeployPhaseAfterTargets Condition="'$(DeployOnBuild)'=='True'">_CopyBeforeBuild</PipelineDeployPhaseAfterTargets>  
+  </PropertyGroup>
+
+  <Target
+      Name="Build"
+      DependsOnTargets="$(BuildDependsOn)" />
+
+  <!--
+    ============================================================
+                              CopyToOutputDir                              
+    From the temp building location copy the output to the actual oput dir
+    ============================================================
+    -->
+  <ItemDefinitionGroup>
+    <_WDPOutputFiles>
+      <DestinationRelativePath></DestinationRelativePath>
+      <Exclude>False</Exclude>
+      <FromTarget>Unknown</FromTarget>
+      <Category>Run</Category>
+      <ProjectFileType>Default</ProjectFileType>
+    </_WDPOutputFiles>
+  </ItemDefinitionGroup>
+
+  <Target Name="_CollectFilesForCopyToOutputDir"
+          DependsOnTargets="$(_CollectFilesForCopyToOutputDirDependsOn)">
+    <PropertyGroup>
+      <_TempDirFullPath>$(MSBuildProjectDirectory)\$(TempBuildDir)</_TempDirFullPath>
+    </PropertyGroup>
+
+    <MakeDir Directories="$(_TempDirFullPath)" />
+    <!--********************************************************************-->    
+    <!-- Enforce that all items have these metadata values -->
+    <!-- Default for Exclude is False -->
+    <!--********************************************************************-->
+    <CollectFilesinFolder RootPath="$(_TempDirFullPath)"
+                         ExcludeFullPathMatchs="$(_WDPExcludeFullPathToOutputDirRegEx)"
+                         ExcludeRelativePathMatchs="$(_WDPExcludeRelativePathToOutputDirRegex)">
+      <Output TaskParameter="Result" ItemName="_WDPOutputFilesNoMetadata" />
+    </CollectFilesinFolder>
+
+    <!-- _WDPOutputFilesNoMetadata doesn't have metadata yet, need to fill the data.  Fill in the metadata now for CopyPipelineFiles to use -->
+    <ItemGroup>
+      <_WDPOutputFiles Include="@(_WDPOutputFilesNoMetadata)" >
+        <DestinationRelativePath>%(_WDPOutputFilesNoMetadata.Identity)</DestinationRelativePath>
+      </_WDPOutputFiles>
+    </ItemGroup>
+
+    <MakeDir Directories="$(IntermediateOutputPath)" />
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(IntermediateOutputPath)\WDPOutputFilesToBeCopied.txt"
+                      Lines="@(_WDPOutputFiles->'
+                      Files:%(Identity) 
+                      FromTarget:%(FromTarget)
+                      DestinationRelativePath:%(DestinationRelativePath)')"
+                      Overwrite="True" />
+  </Target>
+
+  <PropertyGroup>
+    <_CopyToOutputDirDependsOn>
+      $(_CopyToOutputDirDependsOn);
+      CoreCopyToOutputDir;
+      CleanTempBuildDir
+    </_CopyToOutputDirDependsOn>
+  </PropertyGroup>
+
+  <Target Name="CopyToOutputDir" DependsOnTargets="$(_CopyToOutputDirDependsOn)"/>
+  
+  <Target Name="CoreCopyToOutputDir"
+          Condition=" '$(CopyToOutputDir)' != 'False'"
+          DependsOnTargets="_CollectFilesForCopyToOutputDir">
+
+    <ItemGroup>
+      <_WDPAllExtraFilesUnderTargetDir Condition="'$(WDTargetDir)' != ''" Include="$(WDTargetDir)\**" />
+      <_WDPAllExtraFilesUnderTargetDir
+        Remove="@(_WDPOutputFiles->'$(WDTargetDir)\%(DestinationRelativePath)')" />
+    </ItemGroup>
+    <!-- Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject -->
+    <Delete Files="@(_WDPAllExtraFilesUnderTargetDir)"  />
+
+    <!-- This method supports incremental copy, instead of a full copy everytime -->
+    <!-- @(_WDPOutputFiles) contain relative path to $(TempBuildDir), pass in sourceDirectory -->
+    <CopyPipelineFiles PipelineItems="@(_WDPOutputFiles)"
+                           SourceDirectory="$(TempBuildDir)"
+                           TargetDirectory="$(WDTargetDir)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="False"
+                           DeleteItemsMarkAsExcludeTrue ="True">
+      <Output TaskParameter="UpdatedPipelineItems" ItemName="_WDPOutputFilesCopied"/>
+    </CopyPipelineFiles>   
+  </Target>
+
+  <!--
+    ============================================================
+                              CleanTempBuildDir
+    Clean Temp Build Dir
+    ============================================================
+    -->
+  <Target Name="CleanTempBuildDir"
+          Condition="'$(CleanTempBuildDir)' == 'True'">
+    <RemoveDir Directories="$(TempBuildDir)" />
+  </Target>
+
+  <!--
+  This is required for setup project support
+    -->
+  <Target Name="BuiltProjectOutputGroup" DependsOnTargets="_PrepareForBuild">
+    <ItemGroup>
+      <_BuiltProjectOutputGroupOutput Include="$(WDTargetDir)**\*.*"/>
+      <BuiltProjectOutputGroupOutput Include="@(_BuiltProjectOutputGroupOutput)">
+        <TargetPath>%(_BuiltProjectOutputGroupOutput.SubFolder)%(_BuiltProjectOutputGroupOutput.RecursiveDir)%(Filename)%(Extension)</TargetPath>
+      </BuiltProjectOutputGroupOutput>
+    </ItemGroup>
+  </Target>
+
+</Project>

+ 767 - 0
nancy/lib/VisualStudio.MsBuild.11.0/Web/Transform/Microsoft.Web.Publishing.AspNetCompileMerge.targets

@@ -0,0 +1,767 @@
+<!--
+***********************************************************************************************
+Microsoft.Web.Publishing.AspNetCompileMerge.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard package/publish process for Tranform the list of file 
+through the aspnet_compile and aspnet_merge.  It will dramaticaly change the content in the list.
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!--Import task from our dll-->
+  <UsingTask TaskName="GetPublishingLocalizedString" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CopyPipelineFiles" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll" />
+  <UsingTask TaskName="AspNetMerge" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="GetProjectProperties" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="FilterByItems" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="GenerateAssemblyInfo" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+  <UsingTask TaskName="CheckItemsCount" AssemblyFile="..\Microsoft.Web.Publishing.Tasks.dll"/>
+
+  <!--ImportBefore Extension-->
+  <PropertyGroup>
+    <ImportByWildcardBeforeMicrosoftWebPublishingTransformTargets Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingTransformTargets)'==''">true</ImportByWildcardBeforeMicrosoftWebPublishingTransformTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore\*" Condition="'$(ImportByWildcardBeforeMicrosoftWebPublishingTransformTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportBefore')"/>
+
+  <PropertyGroup>
+    <Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported>True</Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported>
+  </PropertyGroup>
+
+  <!--********************************************************************-->
+  <!--Enforce all item have these metadata value for all pipeline metadata-->
+  <!--Default for Exclude is False-->
+  <!--********************************************************************-->
+  <ItemDefinitionGroup>
+    <_AspnetCompileMergePrecompiledOutput>
+      <DestinationRelativePath></DestinationRelativePath>
+      <Exclude>False</Exclude>
+      <FromTarget>AspNetCompilerMergePhase</FromTarget>
+      <Category>Run</Category>
+      <ProjectFileType>Default</ProjectFileType>
+    </_AspnetCompileMergePrecompiledOutput>
+  </ItemDefinitionGroup>
+  
+  
+  <PropertyGroup>
+    <AspnetCompileMergeIntermediateOutputPath Condition="'$(AspnetCompileMergeIntermediateOutputPath)' == ''">$(IntermediateOutputPath)AspnetCompileMerge\</AspnetCompileMergeIntermediateOutputPath>
+    <AspnetCompileMergeIntermediateAssemblyInfo Condition="'$(AspnetCompileMergeIntermediateAssemblyInfo)' == ''">$(IntermediateOutputPath)AssemblyInfo\</AspnetCompileMergeIntermediateAssemblyInfo>
+    <CopyBeforeAspnetCompileMergeTargetPath  Condition="'$(CopyBeforeAspnetCompileMergeTargetPath)' == ''">$(AspnetCompileMergeIntermediateOutputPath)Source</CopyBeforeAspnetCompileMergeTargetPath>
+    <AspnetCompileMerge_TempBuildDir Condition="'$(AspnetCompileMerge_TempBuildDir)' == ''" >$(AspnetCompileMergeIntermediateOutputPath)TempBuildDir</AspnetCompileMerge_TempBuildDir>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(UseMerge)' != 'true'">
+    <_AspNetCompilerFixedNames  Condition="'$(_AspNetCompilerFixedNames)' == ''">$(UseFixedNames)</_AspNetCompilerFixedNames>
+  </PropertyGroup>
+
+  <PropertyGroup  Condition="'$(UseMetabasePath)' == 'true'">
+    <_AspNetCompilerMetabasePath Condition ="'$(_AspNetCompilerMetabasePath)' == ''">$(SourceWebMetabasePath)</_AspNetCompilerMetabasePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(UseMetabasePath)' != 'true'">
+    <_AspNetCompilerSourceWebPath Condition="'$(_AspNetCompilerSourceWebPath)' != ''">$(WebPublishPipelineProjectDirectory)</_AspNetCompilerSourceWebPath>
+    <_AspNetCompilerVirtualPath Condition="'$(_AspNetCompilerVirtualPath)' != ''">$(SourceWebVirtualPath)</_AspNetCompilerVirtualPath>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <_WPPCurrentBuildInfo>$(_WPPCurrentBuildInfo);PrecompileBeforePublish=$(PrecompileBeforePublish);WDPMergeOption=$(WDPMergeOption);_AspNetCompilerFixedNames=$(_AspNetCompilerFixedNames);_AspNetCompilerMetabasePath=$(_AspNetCompilerMetabasePath);Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported=$(Microsoft_Web_Publishing_AspNetCompileMerge_targets_Imported)</_WPPCurrentBuildInfo>
+  </PropertyGroup>
+  
+  <!--***************************************************************-->
+  <!--Hookinto clean target for Clean target -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <_WPPCleanTargets>
+      $(_WPPCleanTargets);
+      CleanAspNetCompileMergeTempDirectories;
+      </_WPPCleanTargets>
+  </PropertyGroup>
+
+  
+  <!--
+    ============================================================
+                              Clean
+
+    Clean target.
+    ============================================================
+    -->
+  <PropertyGroup>
+    <CleanAspNetCompileMergeTempDirectoriesDependsOn Condition="'$(CleanAspNetCompileMergeTempDirectoriesDependsOn)'==''">
+    </CleanAspNetCompileMergeTempDirectoriesDependsOn>
+  
+  </PropertyGroup>
+  <Target Name="CleanAspNetCompileMergeTempDirectories"  DependsOnTargets="$(CleanAspNetCompileMergeTempDirectoriesDependsOn)">
+    <!-- 
+        Create a Clean boolean property
+        -->
+    <CreateProperty Value="true">
+      <Output TaskParameter="Value" PropertyName="Clean" />
+    </CreateProperty>
+    <RemoveDir Condition="Exists('$(CopyBeforeAspnetCompileMergeTargetPath)')" Directories="$(CopyBeforeAspnetCompileMergeTargetPath)"/>
+    <RemoveDir Condition="Exists('$(AspnetCompileMerge_TempBuildDir)')" Directories="$(AspnetCompileMerge_TempBuildDir)" />
+    <RemoveDir Condition="Exists('$(AspnetCompileMergeIntermediateAssemblyInfo)')" Directories="$(AspnetCompileMergeIntermediateAssemblyInfo)" />
+    <Delete Condition="'$(AssemblyInfoDll)' != '' And Exists($(AssemblyInfoDll))"
+      DeletedFiles="$(AssemblyInfoDll)" ContinueOnError="true" />
+  </Target>
+
+
+  <!--
+    ============================================================
+                                        GetAspNetMergePath
+
+    Get the paths for AspNet_Merge.exe Path.
+    Use Framework SDK's Path.  If not exist, fall back to WDP installpath.
+    ============================================================
+    -->
+  <PropertyGroup>
+    <GetAspNetMergePathDependsOn>
+      GetFrameworkPaths;
+    </GetAspNetMergePathDependsOn>
+  </PropertyGroup>
+  <Target
+      Name="GetAspNetMergePath"
+      DependsOnTargets="$(GetAspNetMergePathDependsOn)"
+      Condition ="'$(GetAspNetMergePath)' != 'false'">
+    <PropertyGroup>
+      <AspnetMergeName>aspnet_merge.exe</AspnetMergeName>
+      <AspnetMergePath Condition="Exists('$(TargetFrameworkSDKToolsDirectory)$(AspnetMergeName)')">$(TargetFrameworkSDKToolsDirectory)</AspnetMergePath>
+    </PropertyGroup>
+    <Error Condition="'$(AspnetMergePath)' == '' Or !Exists($(AspnetMergePath))"
+           Text="Can't find the valid AspnetMergePath" />
+  </Target>
+
+
+
+  <!--********************************************************************-->
+  <!-- Target GenerateAssemblyInfo -->
+  <!--********************************************************************-->
+  <!--
+    ============================================================
+                              GenerateAssemblyInfo
+
+    Generates an Assembly with the AssemblyAttributes contained in @(AssebmlyAttributes)
+    The output is in property AssemblyInfoDll
+
+    The assembly attributes can be defined as follows:
+    
+           <ItemGroup>
+             <AssebmlyAttributes Include="AssemblyVersion">
+               <value>3.0.0.0</value>
+             </AssebmlyAttributes>
+             <AssebmlyAttributes Include="AssemblyFileVersion">
+               <value>3.0.0.0</value>
+             </AssebmlyAttributes>
+             <AssemblyAttributes Include="AssemblyTitle">
+               <value>MyCompany MyWeb</value>
+             </AssemblyAttributes>
+             <AssemblyAttributes Include="AssemblyDescription">
+               <value>Corporate Site</value>
+             </AssemblyAttributes>
+             <AssemblyAttributes Include="AssemblyCompany">
+               <value>MyCompany</value>
+             </AssemblyAttributes>
+             <AssemblyAttributes Include="AssemblyCopyright">
+               <value>Copyright © MyCompany 2005</value>
+             </AssemblyAttributes>
+           </ItemGroup>
+    
+    ============================================================
+    -->
+  <PropertyGroup>
+    <GenerateAssemblyInfoFromAssemblyAttributesDependsOn>
+      $(OnBeforeGenerateAssemblyInfoFromAssemblyAttributes);
+      $(GenerateAssemblyInfoFromAssemblyAttributesDependsOn);
+      GetFrameworkPaths;
+      GetAspNetMergePath;
+    </GenerateAssemblyInfoFromAssemblyAttributesDependsOn>
+  </PropertyGroup>
+  <Target Name="GenerateAssemblyInfoFromAssemblyAttributes" 
+          DependsOnTargets="$(GenerateAssemblyInfoFromAssemblyAttributesDependsOn)"
+          Condition=" '@(AssemblyAttributes)' != '' ">
+    
+    <PropertyGroup >
+      <_GenerateAssemblyInfoDll>False</_GenerateAssemblyInfoDll>
+      <_GenerateAssemblyInfoDll Condition="'$(AssemblyInfoDll)' == ''  Or !Exists($(AssemblyInfoDll))">True</_GenerateAssemblyInfoDll>
+    </PropertyGroup>
+    
+    <PropertyGroup Condition="$(_GenerateAssemblyInfoDll)">
+      <_AssemblyInfoSource Condition="'$(_AssemblyInfoSource)' == ''" >$(IntermediateOutputPath)AssemblyInfo\AssemblyInfo.cs</_AssemblyInfoSource>
+      <_AssemblyInfoSourceDirectory>$([System.IO.Path]::GetDirectoryName($(_AssemblyInfoSource)))</_AssemblyInfoSourceDirectory>
+      <AssemblyInfoDll>$([System.IO.Path]::GetDirectoryName($(_AssemblyInfoSource)))\AssemblyInfo.dll</AssemblyInfoDll>
+      <_AssemblyInfoDllDirectory>$([System.IO.Path]::GetDirectoryName($(AssemblyInfoDll)))</_AssemblyInfoDllDirectory>
+    </PropertyGroup>
+    
+    <GenerateAssemblyInfo Condition="$(_GenerateAssemblyInfoDll) And !Exists($(_AssemblyInfoSource))"
+       AssemblyAttributes="@(AssemblyAttributes)"
+       OutputDir="$([System.IO.Path]::GetDirectoryName($(_AssemblyInfoSource)))"
+       />
+
+    <MakeDir Condition="!Exists($(_AssemblyInfoDllDirectory))"
+              Directories="$(_AssemblyInfoDllDirectory)" ContinueOnError="true" />
+    
+    <Csc Condition="$(_GenerateAssemblyInfoDll)"
+      TargetType="library"
+      Sources="$(_AssemblyInfoSource)"
+      OutputAssembly="$(AssemblyInfoDll)"
+      />
+    <ItemGroup Condition="$(_GenerateAssemblyInfoDll) And Exists($(AssemblyInfoDll))">
+      <FileWrites Include="$(_AssemblyInfoSource)" />
+      <FileWrites Include="$(AssemblyInfoDll)" />
+    </ItemGroup>
+  </Target>
+
+
+  <PropertyGroup>
+    <GenerateAssemblyInfoFromExistingAssembleInfoDependsOn>
+      $(OnBeforeGenerateAssemblyInfoFromExistingAssembleInfo);
+      $(GenerateAssemblyInfoFromExistingAssembleInfoDependsOn);
+      GetFrameworkPaths;
+      GetAspNetMergePath;
+      GenerateAssemblyInfoFromAssemblyAttributes;
+    </GenerateAssemblyInfoFromExistingAssembleInfoDependsOn>
+  </PropertyGroup>
+  <Target Name="GenerateAssemblyInfoFromExistingAssembleInfo" 
+          DependsOnTargets="$(GenerateAssemblyInfoFromExistingAssembleInfoDependsOn)"
+          Condition=" '@(AssemblyAttributes)' == '' ">
+
+    <FilterByItems Condition="'$(_AssemblyInfoSource)'==''"
+      PipelineItems="@(Compile)"
+                       SourceMetadataName="Filename"
+                       FilterMetadataName="Filename"
+                       Filter="AssemblyInfo">
+      <Output TaskParameter="InFilter" ItemName="_AspNetCompile_AssemblyInfo"/>
+    </FilterByItems>
+
+    <ItemGroup Condition="'$(_AssemblyInfoSource)'!=''">
+      <_AspNetCompile_AssemblyInfo Include="$(_AssemblyInfoSource)" />
+    </ItemGroup>
+
+    <PropertyGroup Condition="'$(AssemblyInfoDll)' == ''">
+      <_AssemblyInfoDllDirectory>$(IntermediateOutputPath)AssemblyInfo</_AssemblyInfoDllDirectory>
+      <AssemblyInfoDll>$(_AssemblyInfoDllDirectory)\AssemblyInfo.dll</AssemblyInfoDll>
+    </PropertyGroup>
+    
+    <MakeDir Condition="!Exists($(_AssemblyInfoDllDirectory))"
+              Directories="$(_AssemblyInfoDllDirectory)" ContinueOnError="true" />
+
+    
+    <PropertyGroup >
+      <_GenerateAssemblyInfoDll>False</_GenerateAssemblyInfoDll>
+      <_GenerateAssemblyInfoDll Condition="'$(AssemblyInfoDll)' == ''  Or !Exists($(AssemblyInfoDll))">True</_GenerateAssemblyInfoDll>
+    </PropertyGroup>
+
+    
+    <CheckItemsCount Items="@(_AspNetCompile_AssemblyInfo)" >
+      <Output TaskParameter="Count" PropertyName="_AspNetCompile_AssemblyInfo_Count" />
+    </CheckItemsCount>
+
+    <!--Found more than one AssemblyInfo.cs or AssemblyInfo.vb
+    To avoid this error either specify
+    /p:_AssemblyInfoSource=..\..\AssemblyInfo.cs
+    or
+    /p:AssemblyInfoDll=$(TargetPath)
+    or
+    supply @(AssemblyAttributes) as following
+    <ItemGroup>
+      <AssebmlyAttributes Include="AssemblyVersion">
+        <value>3.0.0.0</value>
+      </AssebmlyAttributes>
+      <AssebmlyAttributes Include="AssemblyFileVersion">
+        <value>3.0.0.0</value>
+      </AssebmlyAttributes>
+      <AssemblyAttributes Include="AssemblyTitle">
+        <value>MyCompany MyWeb</value>
+      </AssemblyAttributes>
+      <AssemblyAttributes Include="AssemblyDescription">
+        <value>Corporate Site</value>
+      </AssemblyAttributes>
+      <AssemblyAttributes Include="AssemblyCompany">
+        <value>MyCompany</value>
+      </AssemblyAttributes>
+      <AssemblyAttributes Include="AssemblyCopyright">
+        <value>Copyright © MyCompany 2005</value>
+      </AssemblyAttributes>
+    </ItemGroup>-->
+    <GetPublishingLocalizedString
+           Condition="$(_GenerateAssemblyInfoDll) AND '$(_AspNetCompile_AssemblyInfo_Count)' != '1'"
+           ID="PublishLocalizedString_ErrorInvalidMSBuildItemCollectionCount"
+           ArgumentCount="3"
+           Arguments="_AspNetCompile_AssemblyInfo_Count;$(_AspNetCompile_AssemblyInfo_Count);1"
+           LogType="Error" />
+
+    <Error  Text ="Target GenerateAssemblyInfoFromExistingAssembleInfo Failed"
+             Condition="$(_GenerateAssemblyInfoDll) And '$(_AspNetCompile_AssemblyInfo_Count)' != '1'" />
+
+
+
+    <FilterByItems
+      PipelineItems="@(_AspNetCompile_AssemblyInfo)"
+                       SourceMetadataName="Extension"
+                       FilterMetadataName="Extension"
+                       Filter="AssemblyInfo.cs">
+      <Output TaskParameter="InFilter" ItemName="_AspNetCompile_AssemblyInfo_CS"/>
+    </FilterByItems>
+
+    <Csc Condition="$(_GenerateAssemblyInfoDll) And '@(_AspNetCompile_AssemblyInfo_CS)' != ''"
+      TargetType="library"
+      Sources="@(_AspNetCompile_AssemblyInfo_CS)"
+      OutputAssembly="$(AssemblyInfoDll)"
+      />
+    
+    <FilterByItems
+      PipelineItems="@(_AspNetCompile_AssemblyInfo)"
+                       SourceMetadataName="Extension"
+                       FilterMetadataName="Extension"
+                       Filter="AssemblyInfo.vb">
+      <Output TaskParameter="InFilter" ItemName="_AspNetCompile_AssemblyInfo_VB"/>
+    </FilterByItems>
+
+    <Vbc Condition="$(_GenerateAssemblyInfoDll) And '@(_AspNetCompile_AssemblyInfo_VB)' != ''"
+      TargetType="library"
+      Sources="@(_AspNetCompile_AssemblyInfo_VB)"
+      OutputAssembly="$(AssemblyInfoDll)"
+      />
+    
+    <ItemGroup Condition="$(_GenerateAssemblyInfoDll) And Exists($(AssemblyInfoDll))">
+      <FileWrites Include="$(AssemblyInfoDll)" />
+    </ItemGroup>
+    
+  </Target>
+  
+  
+
+  <PropertyGroup>
+    <GenerateAssemblyInfoDependsOn>
+      $(OnBeforeGenerateAssemblyInfo);
+      $(GenerateAssemblyInfoDependsOn);
+      GetFrameworkPaths;
+      GetAspNetMergePath;
+      GenerateAssemblyInfoFromAssemblyAttributes;
+      GenerateAssemblyInfoFromExistingAssembleInfo;
+    </GenerateAssemblyInfoDependsOn>
+  </PropertyGroup>
+  <Target Name="GenerateAssemblyInfo" 
+          DependsOnTargets="$(GenerateAssemblyInfoDependsOn)"
+          Condition=" '$(GenerateAssemblyInfo)' != 'false' ">
+  
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Target GetAspNetPreCompileSourceVirtualPath -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <GetAspNetPreCompileSourceVirtualPathDependsOn >
+      $(OnBeforeGetAspNetPreCompileSourceVirtualPath);
+      $(GetAspNetPreCompileSourceVirtualPathDependsOn);
+    </GetAspNetPreCompileSourceVirtualPathDependsOn>
+  </PropertyGroup>
+
+  <Target Name="GetAspNetPreCompileSourceVirtualPath"
+          Condition ="'$(GetAspNetPreCompileSourceVirtualPath)' != 'false' And '$(_AspNetCompilerVirtualPath)' == '' And '$(UseMetabasePath)' != 'true'"
+          DependsOnTargets="$(GetAspNetPreCompileSourceVirtualPathDependsOn)">
+    <ItemGroup>
+      <__AspNetPreCompileSourceVirtualPathName Include ="DevelopmentServerVPath" />
+      <__AspNetPreCompileSourceVirtualPathValue />
+    </ItemGroup>
+    <GetProjectProperties ProjectFileFullPath="$(WebPublishPipelineWAPProjectSettings)"
+                          ProjectExtensionsProperties="@(__AspNetPreCompileSourceVirtualPathName)">
+      <Output TaskParameter="ResultProperties"  ItemName="__AspNetPreCompileSourceVirtualPathValue" />
+      <Output TaskParameter="UseIis"  PropertyName="__AspNetPreCompileSourceUseIis" />
+      <Output TaskParameter="IisUrl"  PropertyName="__AspNetPreCompileSourceIisUrl" />
+    </GetProjectProperties>
+
+    <PropertyGroup>
+      <_AspNetCompilerVirtualPath>%(__AspNetPreCompileSourceVirtualPathValue.Value)</_AspNetCompilerVirtualPath>
+      <_AspNetCompilerVirtualPath Condition="'$(_AspNetCompilerVirtualPath)' == '' ">\</_AspNetCompilerVirtualPath>
+    </PropertyGroup>
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Target ConfigureForAspNetPreCompileMerge -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ConfigureForAspNetPreCompileMergeDependsOn>
+      $(OnBeforeConfigureForAspNetPreCompileMerge);
+      $(ConfigureForAspNetPreCompileMergeDependsOn);
+      GetFrameworkPaths;
+      GetAspNetMergePath;
+      GetAspNetPreCompileSourceVirtualPath;
+      ResolveKeySource;
+    </ConfigureForAspNetPreCompileMergeDependsOn>
+  </PropertyGroup>
+
+  <Target Name="ConfigureForAspNetPreCompileMerge" DependsOnTargets="$(ConfigureForAspNetPreCompileMergeDependsOn)">
+
+    <PropertyGroup Condition="'$(_WDPFrameworkLowerThan4)' ==''">
+      <_WDPFrameworkLowerThan4>False</_WDPFrameworkLowerThan4>
+      <_WDPFrameworkLowerThan4 Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'">True</_WDPFrameworkLowerThan4>
+    </PropertyGroup>
+
+    
+    <PropertyGroup Condition="'$(AspnetCompilerPath)'==''">
+      <AspnetCompilerPath >$(Framework40Dir)</AspnetCompilerPath>
+      <AspnetCompilerPath Condition=" '$(_WDPFrameworkLowerThan4)' == 'True' ">$(Framework20Dir)</AspnetCompilerPath>
+    </PropertyGroup>
+
+    <Error Condition="'$(AspnetCompilerPath)' == '' Or !Exists($(AspnetCompilerPath))"
+           Text="Can't find the valid AspnetCompilerPath" />
+
+    <PropertyGroup>
+      <_AspNetCompileMergeKeyFile Condition="'$(_AspNetCompileMergeKeyFile)' == ''">$(KeyOriginatorFile)</_AspNetCompileMergeKeyFile>
+    </PropertyGroup>
+
+    <PropertyGroup Condition="'$(UseMerge)' != true">
+      <_AspNetCompileMergeKeyContainer Condition="'$(_AspNetCompileMergeKeyContainer)' == ''">$(KeyContainerName)</_AspNetCompileMergeKeyContainer>
+    </PropertyGroup>
+    
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!-- Target AspNetPreCompile -->
+  <!--We can't use the in-place aspnet_compiler because it will output to the aspnet temp folder which is only suiteable to run on the current machine.-->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <AspNetPreCompileDependsOn >
+      $(OnBeforeAspNetPreCompile);
+      $(AspNetPreCompileDependsOn);
+      CopyAllFilesToSingleFolderForAspNetCompileMerge;
+      GetReferenceAssemblyPaths;
+      ResolveReferences;
+      ResolveKeySource;
+      ConfigureForAspNetPreCompileMerge;
+    </AspNetPreCompileDependsOn>
+  </PropertyGroup>
+
+  <Target Name="AspNetPreCompile" DependsOnTargets="$(AspNetPreCompileDependsOn)"  Condition="'$(AspNetPreCompile)' != 'false'">
+
+    <PropertyGroup  Condition="'$(UseMetabasePath)' == 'true'" >
+      <_PreAspnetCompileMergeSingleTargetFolderFullPath></_PreAspnetCompileMergeSingleTargetFolderFullPath>
+      <_AspNetCompilerVirtualPath></_AspNetCompilerVirtualPath>
+    </PropertyGroup>
+    <PropertyGroup  Condition="'$(UseMetabasePath)' != 'true'" >
+      <_PreAspnetCompileMergeSingleTargetFolderFullPath>$([System.IO.Path]::GetFullPath($(_PreAspnetCompileMergeSingleTargetFolder)))</_PreAspnetCompileMergeSingleTargetFolderFullPath>
+    </PropertyGroup>
+
+    <PropertyGroup>
+      <_PostAspnetCompileMergeSingleTargetFolderFullPath>$([System.IO.Path]::GetFullPath($(_PostAspnetCompileMergeSingleTargetFolder)))</_PostAspnetCompileMergeSingleTargetFolderFullPath>
+    </PropertyGroup>
+
+    <AspNetCompiler
+      PhysicalPath="$(_PreAspnetCompileMergeSingleTargetFolderFullPath)"
+      TargetPath="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)"
+      VirtualPath="$(_AspNetCompilerVirtualPath)"
+      Force="$(_AspNetCompilerForce)"
+      Debug="$(DebugSymbols)"
+      Updateable="$(EnableUpdateable)"
+      KeyFile="$(_AspNetCompileMergeKeyFile)"
+      KeyContainer="$(_AspNetCompileMergeKeyContainer)"
+      DelaySign="$(DelaySign)"
+      AllowPartiallyTrustedCallers="$(AllowPartiallyTrustedCallers)"
+      FixedNames="$(_AspNetCompilerFixedNames)"
+      Clean="$(Clean)"
+      MetabasePath="$(_AspNetCompilerMetabasePath)"
+      ToolPath="$(AspnetCompilerPath)"
+        />
+
+    <!--
+        Removing APP_DATA is done here so that the output groups reflect the fact that App_data is
+        not present
+        -->
+    <RemoveDir Condition="'$(DeleteAppDataFolder)' == 'true' And Exists('$(_PostAspnetCompileMergeSingleTargetFolderFullPath)\App_Data')"
+               Directories="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)\App_Data" />
+               
+
+    <CollectFilesinFolder Condition="'$(UseMerge)' != 'true'"
+      RootPath="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)" >
+      <Output TaskParameter="Result" ItemName="_AspnetCompileMergePrecompiledOutputNoMetadata" />
+    </CollectFilesinFolder>
+
+    <ItemGroup Condition="'$(UseMerge)' != 'true'">
+      <FileWrites Include="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)\**"/>
+    </ItemGroup>
+
+  </Target>
+
+
+  
+  <!--********************************************************************-->
+  <!-- Target AspNetMerge -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <AspNetMergeDependsOn >
+      $(OnBeforeAspNetMerge);
+      CopyAllFilesToSingleFolderForAspNetCompileMerge;
+      $(AspNetMergeDependsOn);
+      ConfigureForAspNetPreCompileMerge;
+      AspNetPreCompile;
+      GenerateAssemblyInfo;
+    </AspNetMergeDependsOn>
+  </PropertyGroup>
+
+  <Target Name="AspNetMerge" DependsOnTargets="$(AspNetMergeDependsOn)"  Condition="'$(AspNetMerge)' != 'false' And '$(UseMerge)' == 'true'">
+    <AspNetMerge
+     ExePath="$(AspnetMergePath)"
+     ApplicationPath="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)"
+     KeyFile="$(_AspNetCompileMergeKeyFile)"
+     DelaySign="$(DelaySign)"
+     Prefix="$(AssemblyPrefixName)"
+     SingleAssemblyName="$(SingleAssemblyName)"
+     Debug="$(DebugSymbols)"
+     Nologo="$(NoLogo)"
+     ContentAssemblyName="$(ContentAssemblyName)"
+     ErrorStack="$(ErrorStack)"
+     RemoveCompiledFiles="$(DeleteAppCodeCompiledFiles)"
+     CopyAttributes="$(CopyAssemblyAttributes)"
+     AssemblyInfo="$(AssemblyInfoDll)"
+     MergeXmlDocs="$(MergeXmlDocs)"
+     ErrorLogFile="$(MergeErrorLogFile)"
+          />
+
+
+    <CollectFilesinFolder Condition="'$(UseMerge)' == 'true'"
+      RootPath="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)" >
+      <Output TaskParameter="Result" ItemName="_AspnetCompileMergePrecompiledOutputNoMetadata" />
+    </CollectFilesinFolder>
+
+    <ItemGroup Condition="'$(UseMerge)' == 'true'">
+      <FileWrites Include="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)\**"/>
+    </ItemGroup>
+
+
+  </Target>
+
+
+  <!--********************************************************************-->
+  <!--Target ConfigureFoldersForAspNetCompileMerge -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <ConfigureFoldersForAspNetCompileMergeDependsOn>
+      $(OnBeforeConfigureFoldersForAspNetCompileMerge);
+      $(ConfigureFoldersForAspNetCompileMergeDependsOn);
+    </ConfigureFoldersForAspNetCompileMergeDependsOn>
+  </PropertyGroup>
+
+  <Target Name="ConfigureFoldersForAspNetCompileMerge"
+          Outputs="@(FilesForPackagingFromProject)"
+          DependsOnTargets="$(ConfigureFoldersForAspNetCompileMergeDependsOn)">
+    <!--This is a phase separation point-->
+
+
+    <!--
+    <CopyBeforeAspnetCompileMergeTargetPath  Condition="'$(CopyBeforeAspnetCompileMergeTargetPath)' == ''">$(AspnetCompileMergeIntermediateOutputPath)\Source</CopyBeforeAspnetCompileMergeTargetPath>
+    <AspnetCompileMerge_TempBuildDir Condition="'$(AspnetCompileMerge_TempBuildDir)' == ''" >$(AspnetCompileMergeIntermediateOutputPath)\TempBuildDir</AspnetCompileMerge_TempBuildDir>
+    -->
+    <PropertyGroup>
+      <_PreAspnetCompileMergeSingleTargetFolder>$(CopyBeforeAspnetCompileMergeTargetPath)</_PreAspnetCompileMergeSingleTargetFolder>
+      <_PostAspnetCompileMergeSingleTargetFolder>$(AspnetCompileMerge_TempBuildDir)</_PostAspnetCompileMergeSingleTargetFolder>
+    </PropertyGroup>
+
+    <CallTarget Targets="$(OnAfterConfigureFoldersForAspNetCompileMerge)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+
+  <!--********************************************************************    -->
+  <!-- CopyAllFilesToSingleFolderForAspNetCompileMerge  Task                             -->
+  <!-- This will materialize all the in-memory files list which is not marked -->
+  <!-- as excluded from packaging into the AspNetCompileMerge temp folder.               -->
+  <!--ToDo: remove the condition on ContentPath AspNetCompileMerge (we are doing it now because IIS team is not support it yet-->
+  <!-- ********************************************************************   -->
+  <PropertyGroup>
+    <CopyAllFilesToSingleFolderForAspNetCompileMergeDependsOn>
+      $(OnBeforeCopyAllFilesToSingleFolderForAspNetCompileMerge);
+      ConfigureFoldersForAspNetCompileMerge;
+      $(CopyAllFilesToSingleFolderForAspNetCompileMergeDependsOn);
+    </CopyAllFilesToSingleFolderForAspNetCompileMergeDependsOn>
+  </PropertyGroup>
+  <Target Name="CopyAllFilesToSingleFolderForAspNetCompileMerge"
+          DependsOnTargets="$(CopyAllFilesToSingleFolderForAspNetCompileMergeDependsOn)"
+          Condition="'$(UseMetabasePath)' != 'true'">
+
+    <!-- In the case of the incremental Packaging/Publish, we need to find out the extra file and delete them-->
+    <ItemGroup>
+      <_AllExtraFilesUnder_PreAspnetCompileMergeSingleTargetFolder Include="$(_PreAspnetCompileMergeSingleTargetFolder)\**" />
+      <_AllExtraFilesUnder_PreAspnetCompileMergeSingleTargetFolder
+        Remove="@(FilesForPackagingFromProject->'$(_PreAspnetCompileMergeSingleTargetFolder)\%(DestinationRelativePath)')" />
+    </ItemGroup>
+    <!--Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject-->
+    <Delete Files="@(_AllExtraFilesUnder_PreAspnetCompileMergeSingleTargetFolder)" />
+
+    <!-- Make sure the folder exist -->
+    <MakeDir Directories="$(_PreAspnetCompileMergeSingleTargetFolder)" Condition="!Exists('$(_PreAspnetCompileMergeSingleTargetFolder)')"/>
+
+    <!--Get Localized string before displaying message-->
+    <GetPublishingLocalizedString
+       Importance="High"
+       ID="PublishLocalizedString_WebPublishPipelineMaterializeAllFilesToTempDir"
+       ArgumentCount="1"
+       Arguments="$(_PreAspnetCompileMergeSingleTargetFolder)"
+       LogType="Message" />
+
+    <!--Force Copy Of all file to the $(_PreAspnetCompileMergeSingleTargetFolder) if needed-->
+    <CopyPipelineFiles PipelineItems="@(FilesForPackagingFromProject)"
+                           SourceDirectory="$(WebPublishPipelineProjectDirectory)"
+                           TargetDirectory="$(_PreAspnetCompileMergeSingleTargetFolder)"
+                           SkipMetadataExcludeTrueItems="True"
+                           UpdateItemSpec="True"
+                           DeleteItemsMarkAsExcludeTrue ="True">
+      <Output TaskParameter="ResultPipelineItems" ItemName="_Files_PreAspnetCompileMergeSingleTargetFolder"/>
+    </CopyPipelineFiles>
+
+    <!--Workaround the MSBuild 2.0 limitation-->
+    <ItemGroup>
+      <FilesForPackagingFromProject Remove="@(FilesForPackagingFromProject)" />
+      <FilesForPackagingFromProject Include="@(_Files_PreAspnetCompileMergeSingleTargetFolder)" />
+    </ItemGroup>
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(IntermediateOutputPath)\FilesForPackagingFromProjectInPreAspNetComopileMergeCopied.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      Files:%(Identity) 
+                      FromTarget:%(FromTarget)
+                      DestinationRelativePath:%(DestinationRelativePath)')"
+                      Overwrite="True" />
+
+
+    <!--Remove all Empty folder that's left. Since it is not critical, we only log warning if we failed to delete empty folder.-->
+    <RemoveEmptyDirectories Directories="$(_PreAspnetCompileMergeSingleTargetFolder)"  LogErrorAsWarning="True" />
+    <MakeDir Directories="$(_PreAspnetCompileMergeSingleTargetFolder)" Condition="!Exists('$(_PreAspnetCompileMergeSingleTargetFolder)')"/>
+
+    <CallTarget Targets="$(OnAfterCopyAllFilesToSingleFolderForAspNetCompileMerge)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+
+  <!--********************************************************************-->
+  <!--Target PostAspNetCompileMergeCollectFiles -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PostAspNetCompileMergeCollectFilesDependsOn>
+      $(OnBeforePostAspNetCompileMergeCollectFiles);
+      $(PostAspNetCompileMergeCollectFilesDependsOn);
+      AspNetMerge;
+    </PostAspNetCompileMergeCollectFilesDependsOn>
+  </PropertyGroup>
+
+  <Target Name="PostAspNetCompileMergeCollectFiles"
+          Outputs="@(FilesForPackagingFromProject)"
+          DependsOnTargets="$(PostAspNetCompileMergeCollectFilesDependsOn)">
+
+    <!--need to consolate the @(FilesForPackagingFromProject) and @(_AspnetCompileMergePrecompiledOutput)-->
+
+    <ItemGroup>
+      <_AspnetCompileMergePrecompiledOutput Include="@(_AspnetCompileMergePrecompiledOutputNoMetadata->'$(_PostAspnetCompileMergeSingleTargetFolder)\%(Identity)')">
+        <DestinationRelativePath>%(_AspnetCompileMergePrecompiledOutputNoMetadata.Identity)</DestinationRelativePath>
+      </_AspnetCompileMergePrecompiledOutput>
+    </ItemGroup>
+
+
+    <!--This exclude if the filter item's DestinationRelativePath is specified.  
+        This is useful for case like Reference Dll and pdb where the source is not under the current project.-->
+    <FilterByItems PipelineItems="@(FilesForPackagingFromProject)"
+                       SourceMetadataName="DestinationRelativePath"
+                       FilterRootFolder="$(_PostAspnetCompileMergeSingleTargetFolderFullPath)"
+                       FilterBaseOnRelativePath="True"
+                       FilterMetadataName="DestinationRelativePath"
+                       Filter="@(_AspnetCompileMergePrecompiledOutput)">
+      <Output TaskParameter="InFilter" ItemName="_FilesForPackagingFromProject_in_AspnetCompileMergePrecompiledOutput"/>
+    </FilterByItems>
+
+    <!--Keep the Item meta from the original @(FilesForPackagingFromProject)-->
+    <ItemGroup>
+      <_AspnetCompileMergePrecompiledOutput Remove="@(_FilesForPackagingFromProject_in_AspnetCompileMergePrecompiledOutput->'%(FilterItemSpec)')" />
+      <_AspnetCompileMergePrecompiledOutput Include="@(_FilesForPackagingFromProject_in_AspnetCompileMergePrecompiledOutput->'%(FilterItemSpec)')" />
+    </ItemGroup>
+
+    <!--Workaround the MSBuild 2.0 limitation-->
+    <ItemGroup>
+      <FilesForPackagingFromProject Remove="@(FilesForPackagingFromProject)" />
+      <FilesForPackagingFromProject Include="@(_AspnetCompileMergePrecompiledOutput)" />
+    </ItemGroup>
+
+
+
+    <WriteLinesToFile Condition="$(EnablePackageProcessLoggingAndAssert)"
+                      Encoding="utf-8"
+                      File="$(IntermediateOutputPath)\FilesForPackagingFromPostAspNetCompileMergeCollectFiles.txt"
+                      Lines="@(FilesForPackagingFromProject->'
+                      Files:%(Identity) 
+                      FromTarget:%(FromTarget)
+                      DestinationRelativePath:%(DestinationRelativePath)')"
+                      Overwrite="True" />
+
+    <CallTarget Targets="$(OnAfterPostAspNetCompileMergeCollectFiles)" RunEachTargetSeparately="False" />
+  </Target>
+
+
+
+  <!--********************************************************************-->
+  <!--Target CleanPostAspNetCompileMergeFolder -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <CleanPostAspNetCompileMergeFolderDependsOn>
+      $(OnBeforeCleanPostAspNetCompileMergeFolder);
+      $(CleanPostAspNetCompileMergeFolderDependsOn);
+      ConfigureFoldersForAspNetCompileMerge;
+    </CleanPostAspNetCompileMergeFolderDependsOn>
+  </PropertyGroup>
+
+  <Target Name="CleanPostAspNetCompileMergeFolder"
+          Outputs="@(FilesForPackagingFromProject)"
+          DependsOnTargets="$(CleanPostAspNetCompileMergeFolderDependsOn)">
+
+    <RemoveDir Condition="'$(_PostAspnetCompileMergeSingleTargetFolder)' != '' And Exists($(_PostAspnetCompileMergeSingleTargetFolder))"
+               Directories="$(_PostAspnetCompileMergeSingleTargetFolder)" />
+
+    <CallTarget Targets="$(OnAfterCleanPostAspNetCompileMergeFolder)" RunEachTargetSeparately="False" />
+  </Target>
+
+  <!--********************************************************************-->
+  <!--Target PipelineAspNetCompileMergePhase -->
+  <!--********************************************************************-->
+  <PropertyGroup>
+    <PipelineAspNetCompileMergePhaseDependsOn>
+      $(OnBeforePipelineAspNetCompileMergePhase);
+      $(PipelineAspNetCompileMergePhaseDependsOn);
+      CleanPostAspNetCompileMergeFolder;
+      CopyAllFilesToSingleFolderForAspNetCompileMerge;
+      AspNetPreCompile;
+      AspNetMerge;
+      PostAspNetCompileMergeCollectFiles;
+    </PipelineAspNetCompileMergePhaseDependsOn>
+    <PipelineAspNetCompileMergePhaseAfterTargets Condition="'$(PipelineAspNetCompileMergePhaseAfterTargets)' == '' ">
+      PipelineTransformPhase;
+    </PipelineAspNetCompileMergePhaseAfterTargets>
+  </PropertyGroup>
+
+  <Target Name="PipelineAspNetCompileMergePhase"
+          Outputs="@(FilesForPackagingFromProject)"
+          DependsOnTargets="$(PipelineAspNetCompileMergePhaseDependsOn)"
+          AfterTargets="$(PipelineAspNetCompileMergePhaseAfterTargets)">
+    <!--This is a phase separation point-->
+
+    <!--Get Localized string before displaying message-->
+    <GetPublishingLocalizedString
+       ID="PublishLocalizedString_WebPublishPipelinePhase"
+      ArgumentCount="1"
+      Arguments="AspnetCompileMerge"
+       LogType="Message" />
+    <!--<Message Text="Pipeline AspNetCompileMerge Phase" />-->
+
+    <CallTarget Targets="$(OnAfterPipelineAspNetCompileMergePhase)" RunEachTargetSeparately="False" />
+  </Target>
+
+  
+  <!--ImportAfter Extension-->
+  <PropertyGroup>
+    <ImportByWildcardAfterMicrosoftWebPublishingTransformTargets Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingTransformTargets)'==''">true</ImportByWildcardAfterMicrosoftWebPublishingTransformTargets>
+  </PropertyGroup>
+  <Import Project="$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter\*" Condition="'$(ImportByWildcardAfterMicrosoftWebPublishingTransformTargets)' == 'true' and exists('$(MSBuildThisFileDirectory)\$(MSBuildThisFileName)\ImportAfter')"/>
+</Project>

BIN
nancy/lib/VisualStudio.MsBuild.11.0/WebApplications/Microsoft.WebApplication.Build.Tasks.Dll


+ 389 - 0
nancy/lib/VisualStudio.MsBuild.11.0/WebApplications/Microsoft.WebApplication.targets

@@ -0,0 +1,389 @@
+<!--
+***********************************************************************************************
+Microsoft.WebApplication.targets
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your web deploy projects from the command-line or the IDE.
+
+This file defines the steps in the standard build process for web application projects.
+
+Copyright (C) Microsoft Corporation. All rights reserved.
+***********************************************************************************************
+-->
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <UsingTask TaskName="Microsoft.WebApplication.Build.Tasks.GetSilverlightItemsFromProperty"  AssemblyFile="Microsoft.WebApplication.Build.Tasks.dll" />
+  <UsingTask TaskName="Microsoft.WebApplication.Build.Tasks.CopyFilesToFolders"  AssemblyFile="Microsoft.WebApplication.Build.Tasks.dll" />
+
+  <PropertyGroup>
+    <IsDesktopBuild Condition="'$(IsDesktopBuild)'=='' And '$(TeamFoundationServerUrl)' != ''">False</IsDesktopBuild>
+    <WebProjectOutputDirInsideProjectDefault>True</WebProjectOutputDirInsideProjectDefault>
+    <WebProjectOutputDirInsideProjectDefault  Condition="('$(OutDir)' != '$(OutputPath)') Or ('$(IsDesktopBuild)' == 'False')" >False</WebProjectOutputDirInsideProjectDefault>
+    <WebProjectOutputDirInsideProject Condition="'$(WebProjectOutputDirInsideProject)' == ''">$(WebProjectOutputDirInsideProjectDefault)</WebProjectOutputDirInsideProject>
+    <DisableLinkInCopyWebApplicaton Condition="'$(DisableLinkInCopyWebApplicaton)'==''">False</DisableLinkInCopyWebApplicaton>
+    <Disable_CopyWebApplication Condition="'$(Disable_CopyWebApplication)' == ''">False</Disable_CopyWebApplication>
+    <UseWPP_CopyWebApplication Condition="'$(UseWPP_CopyWebApplication)' == ''">False</UseWPP_CopyWebApplication>
+    <CleanWebProjectOutputDir>True</CleanWebProjectOutputDir>
+    <CleanWebProjectOutputDir Condition="$(WebProjectOutputDirInsideProject)" >False</CleanWebProjectOutputDir>
+  </PropertyGroup>
+
+  <!--Only setup $(WebProjectOutputDir) iff user haven't set it up-->
+  <PropertyGroup Condition="'$(WebProjectOutputDir)'==''">
+    <WebProjectOutputDir>$(MSBuildProjectDirectory)</WebProjectOutputDir>
+    <WebProjectOutputDir Condition="!$(WebProjectOutputDirInsideProject)">$(OutDir)_PublishedWebsites\$(MSBuildProjectName)</WebProjectOutputDir>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <PrepareForRunDependsOn>
+      $(PrepareForRunDependsOn);
+      CopySilverlightApplications;
+      _CopyBinDeployableAssemblies;
+    </PrepareForRunDependsOn>
+    <PrepareForRunDependsOn Condition="!$(Disable_CopyWebApplication)">
+      $(PrepareForRunDependsOn);
+      _CopyWebApplication;
+      _BuiltWebOutputGroupOutput
+    </PrepareForRunDependsOn>
+  </PropertyGroup>
+
+  <!--***************************************************************-->
+  <!--Global setting for Clean target -->
+  <!--***************************************************************-->
+  <PropertyGroup>
+    <CleanDependsOn>
+      $(CleanDependsOn);
+      CleanWebProjectOutputDir;
+    </CleanDependsOn>
+  </PropertyGroup>
+
+  <!--********************************************************************-->
+  <!-- CleanWebProjectOutputDir  -->
+  <!-- ********************************************************************-->
+  <PropertyGroup>
+    <CleanWebProjectOutputDirDependsOn Condition="'$(CleanWebProjectOutputDirDependsOn)' == ''">
+    </CleanWebProjectOutputDirDependsOn>
+  </PropertyGroup>
+  <Target Name="CleanWebProjectOutputDir"
+          Condition="$(CleanWebProjectOutputDir)"
+          DependsOnTargets="$(CleanWebProjectOutputDirDependsOn)">
+    <!--Assertion check-->
+    <!--In the case of Clean Packaging/Publish, we simply delete the WebProjectOutputDir-->
+    <RemoveDir Condition="Exists($(WebProjectOutputDir))" Directories="$(WebProjectOutputDir)" ContinueOnError="true" />
+  </Target>
+
+  <!--
+	============================================================
+	_CopyWebApplication
+
+	This target will copy the build outputs along with the 
+	content files into a _PublishedWebsites folder.
+	
+	This Task is only necessary when $(OutDir) has been redirected
+	to a folder other than ~\bin such as is the case with Team Build.
+  
+  The original _CopyWebApplication is now a Legacy, you can still use it by setting $(UseWPP_CopyWebApplication) to true.
+  By default, it now change to use _WPPCopyWebApplication target in Microsoft.Web.Publish.targets.   It allow to leverage the web.config trsnaformation.
+	============================================================
+	-->
+
+  <PropertyGroup>
+    <!--This will be overwrite by ..\web\Microsoft.Web.Publishing.targets when $(UseWPP_CopyWebApplication) set to true-->
+   <OnBefore_CopyWebApplicationDefault>
+     _CopyWebApplicationLegacy;
+   </OnBefore_CopyWebApplicationDefault>
+    <OnBefore_CopyWebApplicationDefault Condition="$(UseWPP_CopyWebApplication) AND Exists('$(MSBuildThisFileDirectory)\..\Web\Microsoft.Web.Publishing.targets')">
+     _WPPCopyWebApplication;
+   </OnBefore_CopyWebApplicationDefault>
+   <OnBefore_CopyWebApplication Condition="'$(OnBefore_CopyWebApplication)'==''">
+    $(OnBefore_CopyWebApplicationDefault);
+  </OnBefore_CopyWebApplication>
+    
+  <OnAfter_CopyWebApplication Condition="'$(OnAfter_CopyWebApplication)'==''">
+  </OnAfter_CopyWebApplication>
+
+  <_CopyWebApplicationDependsOn Condition="'$(_CopyWebApplicationDependsOn)'==''">
+    $(OnBefore_CopyWebApplication);
+  </_CopyWebApplicationDependsOn>
+
+  </PropertyGroup>
+  <Target Name="_CopyWebApplication" 
+          Condition="!$(Disable_CopyWebApplication) And '$(OutDir)' != '$(OutputPath)'" 
+          DependsOnTargets="$(_CopyWebApplicationDependsOn)">
+
+    <CallTarget Condition="'$(OnAfter_CopyWebApplication)' != ''" Targets="$(OnAfter_CopyWebApplication)" RunEachTargetSeparately="true" />
+    
+  </Target>
+  
+  <!--
+	============================================================
+	_CopyWebApplicationLegacy
+
+	This target will copy the build outputs along with the 
+	content files into a _PublishedWebsites folder.
+	
+	This Task is only necessary when $(OutDir) has been redirected
+	to a folder other than ~\bin such as is the case with Team Build.
+	============================================================
+	-->
+  <Target Name="_CopyWebApplicationLegacy" Condition="!$(Disable_CopyWebApplication) And '$(OutDir)' != '$(OutputPath)'" >
+    <!-- Log tasks -->
+    <Message Text="Copying Web Application Project Files for $(MSBuildProjectName)" />
+
+    <!-- Create the _PublishedWebsites\app\bin folder -->
+    <MakeDir Directories="$(WebProjectOutputDir)\bin" />
+
+    <!-- Copy build outputs to _PublishedWebsites\app\bin folder -->
+    <Copy SourceFiles="@(IntermediateAssembly)" DestinationFolder="$(WebProjectOutputDir)\bin" 
+          SkipUnchangedFiles="true"
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    <Copy SourceFiles="@(AddModules)" 
+          DestinationFolder="$(WebProjectOutputDir)\bin" 
+          SkipUnchangedFiles="true"
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    <Copy SourceFiles="$(IntermediateOutputPath)$(_SGenDllName)" 
+          DestinationFolder="$(WebProjectOutputDir)\%(Content.SubFolder)%(Content.RecursiveDir)" 
+          SkipUnchangedFiles="true" 
+          Condition="'$(_SGenDllCreated)'=='true'"
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    <Copy SourceFiles="$(IntermediateOutputPath)$(TargetName).pdb" 
+          DestinationFolder="$(WebProjectOutputDir)\bin" 
+          SkipUnchangedFiles="true" 
+          Condition="'$(_DebugSymbolsProduced)'=='true'" 
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    <Copy SourceFiles="@(DocFileItem)" 
+          DestinationFolder="$(WebProjectOutputDir)\bin" 
+          SkipUnchangedFiles="true" 
+          Condition="'$(_DocumentationFileProduced)'=='true'"
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    <Copy SourceFiles="@(IntermediateSatelliteAssembliesWithTargetPath)" 
+          DestinationFiles="@(IntermediateSatelliteAssembliesWithTargetPath->'$(WebProjectOutputDir)\bin\%(Culture)\$(TargetName).resources.dll')" 
+          SkipUnchangedFiles="true" 
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    <Copy SourceFiles="@(ReferenceComWrappersToCopyLocal); @(ResolvedIsolatedComModules); @(_DeploymentLooseManifestFile); @(NativeReferenceFile)" 
+          DestinationFolder="$(WebProjectOutputDir)\bin" 
+          SkipUnchangedFiles="true" 
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+    <!-- copy any referenced assemblies to _PublishedWebsites\app\bin folder -->
+    <Copy SourceFiles="@(ReferenceCopyLocalPaths)"
+          DestinationFiles="@(ReferenceCopyLocalPaths->'$(WebProjectOutputDir)\bin\%(DestinationSubDirectory)%(Filename)%(Extension)')" 
+          SkipUnchangedFiles="true" 
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+    <!-- Copy content files recursively to _PublishedWebsites\app\ folder -->
+    <Copy SourceFiles="@(Content)" Condition="'%(Content.Link)' == ''"
+          DestinationFolder="$(WebProjectOutputDir)\%(Content.RelativeDir)" 
+          SkipUnchangedFiles="true" 
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
+    <Copy SourceFiles="@(Content)" Condition="!$(DisableLinkInCopyWebApplicaton) And '%(Content.Link)' != ''"
+          DestinationFiles="$(WebProjectOutputDir)\%(Content.Link)"
+          SkipUnchangedFiles="true"
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+    <!-- Copy items that have been marked to be copied to the bin folder -->
+    <Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectory)" 
+          DestinationFolder="$(WebProjectOutputDir)\bin" 
+          SkipUnchangedFiles="true" 
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+    <Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectoryAlways)" 
+          DestinationFolder="$(WebProjectOutputDir)\bin" 
+          SkipUnchangedFiles="false" 
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+    <!-- Copy Silverlight Zip and Xzp file to _PublishedWebsites\app\ folder-->
+    <Copy SourceFiles="@(_WebApplicationSilverlightXapFiles)"
+          DestinationFolder="$(WebProjectOutputDir)\%(_WebApplicationSilverlightXapFiles.RelativeDir)" 
+          SkipUnchangedFiles="true"
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+    <!-- Copy items that need to be bin deployed to the bin folder -->
+    <Copy SourceFiles="@(_binDeployableAssemblies)" 
+          DestinationFolder="$(WebProjectOutputDir)\bin\%(_binDeployableAssemblies.DestinationRelPath)" 
+          SkipUnchangedFiles="true" 
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+  </Target>
+
+  <!--
+	============================================================
+	_BuiltWebOutputGroupOutput
+
+	This target creates and populates BuiltWebOutputGroupOutput
+	with contents of bin along with the @(Content) files
+	============================================================
+	-->
+  <Target Name ="_BuiltWebOutputGroupOutput"
+          Condition="!$(Disable_CopyWebApplication)"
+          Outputs="@(BuiltWebOutputGroupOutput)">
+    <CreateItem Include="$(WebProjectOutputDir)\bin\**\*.*;@(Content->'%(FullPath)')" Condition="'$(OutDir)' == '$(OutputPath)'">
+      <Output ItemName="BuiltWebOutputGroupOutput" TaskParameter="Include"/>
+    </CreateItem>
+
+    <CreateItem Include="$(WebProjectOutputDir)\**\*.*" Condition="'$(OutDir)' != '$(OutputPath)'">
+      <Output ItemName="BuiltWebOutputGroupOutput" TaskParameter="Include"/>
+    </CreateItem>
+  </Target>
+
+  <!--
+    ============================================================
+    _GetSilverlightApplications
+
+    Converts the list of Silverlight Applications that are defined
+    in the property $(SilverlightApplicationList) to ITaskItems that
+    can be used by teh CopySilverlightApplication task
+    The format of $(SilverlightApplicationList) is: 
+      {projGuid}|relPath|tgtFolder;{projGuid2}|relPathToProject2|tgtFolder2;...
+    ============================================================
+    -->
+  <Target
+    Name="_GetSilverlightApplications"
+    Condition="'$(SilverlightApplicationList)' != ''">
+
+    <GetSilverlightItemsFromProperty
+        SilverlightReferences="$(SilverlightApplicationList)"
+        ProjectPath="$(MSBuildProjectFullPath)">
+
+      <Output TaskParameter="SilverlightApplications" ItemName="_AllSilverlightApplications"/>
+    </GetSilverlightItemsFromProperty>
+
+    <!-- Break the silverlight application list into two lists: those that exist on disk and those that don't. -->
+    <ItemGroup>
+      <_SilverlightApplications Include="@(_AllSilverlightApplications)" Condition="Exists('%(Identity)')"/>
+      <_SilverlightApplicationsNotExist Include="@(_AllSilverlightApplications)" Condition="!Exists('%(Identity)')"/>
+    </ItemGroup>
+
+  </Target>
+
+  <!--
+	============================================================
+	CopySilverlightApplications
+
+	This target copies the output xap files from referenced
+	Silverlight application projects to the target folder.
+	============================================================
+	-->
+  <Target
+      Name="CopySilverlightApplications"
+      DependsOnTargets="_GetSilverlightApplications"
+      Outputs="@(_WebApplicationSilverlightXapFiles)"
+      Condition="'$(BuildingInsideVisualStudio)' != 'true'">
+
+    <!--
+        When building this project from the IDE or when building a .SLN from the command-line,
+        just gather the referenced build outputs (Xap files).  The code that builds the .SLN will already have
+        built the project, so there's no need to do it again here. Since Silverlight only supports AnyCPU that is
+        what we use for the platform
+
+        The ContinueOnError setting is here so that, during project load, as
+        much information as possible will be passed to the compilers.
+        -->
+        <MSBuild
+            Projects="@(_SilverlightApplications)"
+            Targets="GetXapOutputFile"
+            BuildInParallel= "false"
+            Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);Platform=AnyCPU;BuildingSolutionFile=false"
+            Condition="'@(_SilverlightApplications)' != ''"
+            ContinueOnError="!$(BuildingProject)">
+
+      <Output TaskParameter="TargetOutputs" ItemName="_SilverlightXapFiles"/>
+
+    </MSBuild>
+
+    <!--
+        Build referenced projects when building from the command line.
+
+        The $(ProjectReferenceBuildTargets) will normally be blank so that the project's default
+        target is used during a P2P reference. However if a custom build process requires that
+        the referenced project has a different target to build it can be specified.
+        -->
+    <MSBuild
+        Projects="@(_SilverlightApplications)"
+        Targets="$(ProjectReferenceBuildTargets)"
+        Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);Platform=AnyCPU;BuildingSolutionFile=false"
+        BuildInParallel="false"
+        Condition="'$(BuildingInsideVisualStudio)' != 'true' and '@(_SilverlightApplications)' != ''">
+    </MSBuild>
+
+    <!--Copy the outputs to the target folder-->
+    <CopyFilesToFolders SourceFiles="@(_SilverlightXapFiles)" 
+                        SilverlightApplications="@(_SilverlightApplications)" 
+                        ConfigName="$(Configuration)"  
+                        Condition="'@(_SilverlightXapFiles)' != ''">
+      <Output TaskParameter="DestinationFiles" ItemName="_WebApplicationSilverlightXapFiles" />      
+    </CopyFilesToFolders>
+
+    <!-- Issue a warning for each non-existent project. -->
+    <Warning
+        Text="The referenced Silverlight project '%(_SilverlightApplicationsNotExist.Identity)' does not exist."
+        Condition="'@(_SilverlightApplicationsNotExist)'!=''"/>
+  </Target>
+
+  <!--
+	============================================================
+	_CopyBinDeployableAssemblies
+
+	This target copies the contents of ProjectDir\_bin_deployableAssemblies to the bin
+	folder, preserving the relative paths
+	============================================================
+	-->
+  <Target
+      Name="_CopyBinDeployableAssemblies"
+      Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')">
+
+    <PropertyGroup>
+      <BinDeployableFolder Condition="'$(BinDeployableFolder)' == ''">_bin_deployableAssemblies\</BinDeployableFolder>
+      <BinDeployableFolderFullPath>$([System.IO.Path]::GetFullPath($(BinDeployableFolder)))</BinDeployableFolderFullPath>
+    </PropertyGroup>
+
+    <!--Pick up the deployable items from the $(None) collection that are under the _bin_deployableAssemblies folder -->
+    <CreateItem Include="@(None->'%(Identity)')" Condition="'%(None.FullPath)' != '' And  $([System.String]::new('%(None.FullPath)').StartsWith($(BinDeployableFolderFullPath), StringComparison.OrdinalIgnoreCase ))" >
+      <Output ItemName="__binDeployableAssemblies" TaskParameter="Include"/>
+    </CreateItem>
+
+    <!--Add metadata which holds the destination relative folder to copy them to-->
+    <ItemGroup>
+      <_binDeployableAssemblies Include ="@(__binDeployableAssemblies)" Condition="'@(__binDeployableAssemblies)' != ''">
+        <DestinationRelPath>$([System.String]::Concat($([System.IO.Path]::GetDirectoryName($([System.String]::new('%(__binDeployableAssemblies.FullPath)')))),'\').SubString($(BinDeployableFolderFullPath.Length)))</DestinationRelPath>
+      </_binDeployableAssemblies>
+    </ItemGroup>
+
+    <!-- Do the copy-->
+    <Copy SourceFiles="@(_binDeployableAssemblies)" DestinationFolder="$(OutDir)%(_binDeployableAssemblies.DestinationRelPath)"
+          SkipUnchangedFiles="true"
+          Retries="$(CopyRetryCount)"
+          RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>
+
+    <!--Add the items just copied to the collection of items to delete when doing a clean-->
+    <ItemGroup>
+      <FileWrites Include ="@(_binDeployableAssemblies->'$(OutDir)%(DestinationRelPath)%(Filename)%(Extension)')" />
+    </ItemGroup>
+ </Target>
+
+  <!--Import publishing target-->
+  <Import Project="..\Web\Microsoft.Web.Publishing.targets" Condition="Exists('..\Web\Microsoft.Web.Publishing.targets')" />
+
+
+  <!--Ensure the Siliverlight zap file is created and copied to the bin folder for the Microsoft.Web.Publishing.targets-->
+  <PropertyGroup>
+    <OnBeforePipelineCollectFilesPhase>
+      $(OnBeforePipelineCollectFilesPhase);
+      CopySilverlightApplications;
+    </OnBeforePipelineCollectFilesPhase>
+  </PropertyGroup>
+
+
+</Project>

+ 4 - 0
nancy/lib/repositories.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<repositories>
+  <repository path="..\src\packages.config" />
+</repositories>

+ 26 - 0
nancy/nginx.conf

@@ -0,0 +1,26 @@
+# worker_processes n;
+pid /tmp/nginx.pid;
+error_log /dev/null crit;
+
+events {
+    worker_connections 8192;
+}
+
+http {
+    access_log off;
+
+    #upstream mono {
+    #    server 127.0.0.1:9001;
+    #}
+    include nginx.upstream.conf;
+
+    server {
+        listen 8080;
+
+        location / {
+            fastcgi_pass mono;
+            include /usr/local/nginx/conf/fastcgi_params;
+            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
+        }
+    }
+}

+ 19 - 0
nancy/setup_iis.ps1

@@ -0,0 +1,19 @@
+param($action)
+
+$wwwroot = "C:\FrameworkBenchmarks\nancy\www"
+$source = "C:\FrameworkBenchmarks\nancy\src"
+
+# Stop
+if (Get-WebSite -Name Benchmarks) { Remove-WebSite -Name Benchmarks }
+Get-ChildItem -Path $wwwroot -Recurse -ErrorAction 'SilentlyContinue' | Remove-Item -Force -Recurse -ErrorAction 'SilentlyContinue'; 
+Remove-Item -Force -Recurse $wwwroot -ErrorAction 'SilentlyContinue'
+
+if ($action -eq 'start') {
+    # Create a website in IIS
+    New-Item -Path $wwwroot -Type directory | Out-Null
+    New-WebSite -Name Benchmarks -Port 8080 -PhysicalPath $wwwroot
+    
+    # Build the project
+    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe "$source\NancyBenchmark.csproj" /p:Configuration=Release /p:Platform="x64" /t:Clean
+    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe "$source\NancyBenchmark.csproj" /p:Configuration=Release /p:Platform="x64" /p:DeployOnBuild=true /p:PublishProfile=IIS
+}

+ 22 - 0
nancy/setup_iis.py

@@ -0,0 +1,22 @@
+import subprocess
+import sys
+import setup_util
+import os
+
+def start(args):
+  if os.name != 'nt':
+    return 1
+  
+  try:
+    setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
+    subprocess.check_call("powershell -File setup_iis.ps1 start", cwd="nancy")
+    return 0
+  except subprocess.CalledProcessError:
+    return 1
+
+def stop():
+  if os.name != 'nt':
+    return 0
+  
+  subprocess.Popen("powershell -File setup_iis.ps1 stop", cwd="nancy")
+  return 0

+ 39 - 0
nancy/setup_nginx.py

@@ -0,0 +1,39 @@
+import subprocess
+import sys
+import setup_util
+import os
+
+root = os.getcwd() + "/nancy"
+app = root + "/src"
+
+def start(args):
+  if os.name == 'nt':
+    return 1
+  
+  setup_util.replace_text(app + "/Web.config", "localhost", args.database_host)
+
+  try:
+    # build
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd=app)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
+    
+    # nginx
+    workers = 'worker_processes ' + str(args.max_threads) + ';'
+    subprocess.check_call('echo "upstream mono {\n' + ';\n'.join('\tserver 127.0.0.1:' + str(port) for port in range(9001, 9001 + args.max_threads)) + ';\n}" > ' + root + '/nginx.upstream.conf', shell=True);
+    subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + root + '/nginx.conf -g "' + workers + '"', shell=True)
+    
+    # fastcgi
+    for port in range(9001, 9001 + args.max_threads):
+      subprocess.Popen("fastcgi-mono-server4 /applications=/:. /socket=tcp:127.0.0.1:" + str(port) + " &", shell=True, cwd=app)
+    return 0
+  except subprocess.CalledProcessError:
+    return 1
+
+def stop():
+  if os.name == 'nt':
+    return 0
+  
+  subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + root + "/nginx.conf -s stop", shell=True)
+  subprocess.check_call("rm -f " + root + "/nginx.upstream.conf", shell=True)
+  subprocess.check_call("pkill -9 mono", shell=True)
+  return 0

+ 33 - 0
nancy/setup_xsp.py

@@ -0,0 +1,33 @@
+import subprocess
+import sys
+import setup_util
+import os
+
+def start(args):
+  if os.name == 'nt':
+    return 1
+  
+  setup_util.replace_text("nancy/src/Web.config", "localhost", args.database_host)
+
+  try:
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd="nancy/src")
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="nancy/src")
+    subprocess.Popen("xsp4 --nonstop", shell=True, cwd="nancy/src")
+    return 0
+  except subprocess.CalledProcessError:
+    return 1
+
+def stop():
+  if os.name == 'nt':
+    return 0
+  
+  p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
+  out, err = p.communicate()
+  for line in out.splitlines():
+    if 'xsp4' in line:
+      pid = int(line.split(None, 2)[1])
+      try:
+        os.kill(pid, 9)
+      except OSError:
+        pass
+  return 0

+ 67 - 0
nancy/src/DbModule.cs

@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Web;
+using MySql.Data.MySqlClient;
+using Nancy;
+using Dapper;
+
+namespace NancyBenchmark
+{
+    public class DbModule : NancyModule
+    {
+        private static readonly string MYSQL_CONNECTION_STRING;
+        
+        static DbModule()
+        {
+            MYSQL_CONNECTION_STRING = ConfigurationManager.AppSettings["ConnectionString.MySQL"];
+        }
+
+        public DbModule() : base("/db")
+        {
+            Get["/{queries?1}"] = paramz =>
+            {
+                var queries = (int)paramz.queries;
+                
+                var random = new Random();
+                using (var db = new MySqlConnection(MYSQL_CONNECTION_STRING))
+                {
+                    db.Open();
+
+                    if (queries == 1)
+                        return GetRandomWorld(db, random);
+                    else
+                    {
+                        var worldCount = queries > 500 ? 500 : queries;
+                        worldCount = worldCount < 1 ? 1 : worldCount;
+
+                        // NOTE: Experiment with running the DB requests in parallel, on both Mono and Windows CLRs.
+                        var worlds = new World[worldCount];
+
+                        for (int i = 0; i < worldCount; ++i)
+                        {
+                            worlds[i] = GetRandomWorld(db, random);
+                        }
+                        return worlds;
+                    }
+                }
+            };
+        }
+
+        private World GetRandomWorld(IDbConnection db, Random random)
+        {
+            var id = random.Next(1, 10001);
+            return db.Query<World>("SELECT id, randomNumber FROM world WHERE id = @id", new { id = id }).Single();
+        }
+    }
+
+    public class World
+    {
+        public int id { get; set; }
+        public int randomNumber { get; set; }
+    }
+}

+ 1 - 0
nancy/src/Global.asax

@@ -0,0 +1 @@
+<%@ Application Codebehind="Global.asax.cs" Inherits="NancyBenchmark.Global" Language="C#" %>

+ 16 - 0
nancy/src/Global.asax.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Web;
+using Nancy;
+using Nancy.ErrorHandling;
+
+namespace NancyBenchmark
+{
+    public class Global : HttpApplication
+    {
+        protected void Application_Start()
+        {
+            
+        }
+    }
+}

+ 19 - 0
nancy/src/JsonModule.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Nancy;
+
+namespace NancyBenchmark
+{
+    public class JsonModule : NancyModule
+    {
+        public JsonModule() : base("/json")
+        {
+            Get["/"] = x =>
+            {
+                return Response.AsJson(new { message = "Hello, World!" });
+            };
+        }
+    }
+}

+ 109 - 0
nancy/src/NancyBenchmark.csproj

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}</ProjectGuid>
+    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>NancyBenchmark</RootNamespace>
+    <AssemblyName>NancyBenchmark</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject />
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Dapper">
+      <HintPath>..\lib\Dapper.1.12.1\lib\net40\Dapper.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\lib\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
+    </Reference>
+    <Reference Include="Nancy">
+      <HintPath>..\lib\Nancy.0.17.1\lib\net40\Nancy.dll</HintPath>
+    </Reference>
+    <Reference Include="Nancy.Hosting.Aspnet">
+      <HintPath>..\lib\Nancy.Hosting.Aspnet.0.17.1\lib\net40\Nancy.Hosting.Aspnet.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Web" />
+    <Reference Include="System.Web.ApplicationServices" />
+    <Reference Include="System.Web.DynamicData" />
+    <Reference Include="System.Web.Entity" />
+    <Reference Include="System.Web.Extensions" />
+    <Reference Include="System.Xml.Linq" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Web.config">
+      <SubType>Designer</SubType>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="DbModule.cs" />
+    <Content Include="Global.asax" />
+    <Compile Include="Global.asax.cs">
+      <DependentUpon>Global.asax</DependentUpon>
+    </Compile>
+    <Compile Include="JsonModule.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="packages.config" />
+    <None Include="Web.Debug.config">
+      <DependentUpon>Web.config</DependentUpon>
+      <SubType>Designer</SubType>
+    </None>
+    <None Include="Web.Release.config">
+      <DependentUpon>Web.config</DependentUpon>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+  </PropertyGroup>
+  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != '' And Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
+  <Import Project="..\lib\VisualStudio.MsBuild.11.0\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' == '' Or !Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
+  <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
+    <AspNetCompiler VirtualPath="/" PhysicalPath="$(WebProjectOutputDir)" />
+  </Target>
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+        <WebProjectProperties>
+          <SaveServerSettingsInUserFile>True</SaveServerSettingsInUserFile>
+        </WebProjectProperties>
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+</Project>

+ 25 - 0
nancy/src/NancyBenchmark.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NancyBenchmark", "NancyBenchmark.csproj", "{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0C24E4BD-94BD-4AFD-B912-00A5FF825E6B}"
+	ProjectSection(SolutionItems) = preProject
+		NuGet.config = NuGet.config
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{80CF41AB-455B-4EB9-BFCC-3F8C4E1D8354}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 6 - 0
nancy/src/NuGet.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <config>
+    <add key="repositoryPath" value="..\lib" />
+  </config>
+</configuration>

+ 30 - 0
nancy/src/Web.Debug.config

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+  <!--
+    In the example below, the "SetAttributes" transform will change the value of 
+    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator 
+    finds an attribute "name" that has a value of "MyDB".
+    
+    <connectionStrings>
+      <add name="MyDB" 
+        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
+        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+    </connectionStrings>
+  -->
+  <system.web>
+    <!--
+      In the example below, the "Replace" transform will replace the entire 
+      <customErrors> section of your web.config file.
+      Note that because there is only one customErrors section under the 
+      <system.web> node, there is no need to use the "xdt:Locator" attribute.
+      
+      <customErrors defaultRedirect="GenericError.htm"
+        mode="RemoteOnly" xdt:Transform="Replace">
+        <error statusCode="500" redirect="InternalError.htm"/>
+      </customErrors>
+    -->
+  </system.web>
+</configuration>

+ 31 - 0
nancy/src/Web.Release.config

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+  <!--
+    In the example below, the "SetAttributes" transform will change the value of 
+    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator 
+    finds an attribute "name" that has a value of "MyDB".
+    
+    <connectionStrings>
+      <add name="MyDB" 
+        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
+        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+    </connectionStrings>
+  -->
+  <system.web>
+    <compilation xdt:Transform="RemoveAttributes(debug)" />
+    <!--
+      In the example below, the "Replace" transform will replace the entire 
+      <customErrors> section of your web.config file.
+      Note that because there is only one customErrors section under the 
+      <system.web> node, there is no need to use the "xdt:Locator" attribute.
+      
+      <customErrors defaultRedirect="GenericError.htm"
+        mode="RemoteOnly" xdt:Transform="Replace">
+        <error statusCode="500" redirect="InternalError.htm"/>
+      </customErrors>
+    -->
+  </system.web>
+</configuration>

+ 31 - 0
nancy/src/Web.config

@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<configuration>
+  <appSettings>
+    <add key="ConnectionString.MySQL" value="server=localhost;user id=benchmarkdbuser;password=benchmarkdbpass;database=hello_world"/>
+    <add key="ConnectionString.PostgreSQL" value="server=localhost;user id=benchmarkdbuser;password=benchmarkdbpass;database=hello_world"/>
+    <add key="ConnectionString.MongoDB" value="mongodb://localhost"/>
+  </appSettings>
+  <system.web>
+    <customErrors mode="Off"/>
+    <compilation debug="true" targetFramework="4.5"/>
+    <pages controlRenderingCompatibilityVersion="4.0"/>
+    <httpHandlers>
+      <add verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/>
+    </httpHandlers>
+  </system.web>
+  <system.webServer>
+    <validation validateIntegratedModeConfiguration="false"/>
+    <modules runAllManagedModulesForAllRequests="true"/>
+    <handlers>
+      <add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="*"/>
+    </handlers>
+  </system.webServer>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-6.6.5.0" newVersion="6.6.5.0"/>
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 7 - 0
nancy/src/packages.config

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Dapper" version="1.12.1" targetFramework="net45" />
+  <package id="MySql.Data" version="6.6.5" targetFramework="net45" />
+  <package id="Nancy" version="0.17.1" targetFramework="net45" />
+  <package id="Nancy.Hosting.Aspnet" version="0.17.1" targetFramework="net45" />
+</packages>