Browse Source

Merge branch 'windows' of https://github.com/pdonald/FrameworkBenchmarks into pdonald-windows

Patrick Falls 12 years ago
parent
commit
13b5fdfc75
100 changed files with 10450 additions and 1444 deletions
  1. 0 50
      aspnet-mono/benchmark_config
  2. 0 20
      aspnet-mono/project/Benchmarks.Mono.AspNet.sln
  3. 0 3
      aspnet-mono/project/packages/MySql.Data.6.7.2/Readme.md
  4. 0 4
      aspnet-mono/project/packages/repositories.config
  5. 0 0
      aspnet/.gitignore
  6. 32 1
      aspnet/README.md
  7. 0 0
      aspnet/__init__.py
  8. 95 0
      aspnet/benchmark_config
  9. 5 5
      aspnet/lib/EntityFramework.6.0.0-alpha3/Content/App.config.transform
  10. 5 5
      aspnet/lib/EntityFramework.6.0.0-alpha3/Content/Web.config.transform
  11. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/EntityFramework.6.0.0-alpha3.nupkg
  12. 24 24
      aspnet/lib/EntityFramework.6.0.0-alpha3/EntityFramework.6.0.0-alpha3.nuspec
  13. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.SqlServer.dll
  14. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.SqlServer.xml
  15. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.dll
  16. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.xml
  17. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.SqlServer.dll
  18. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.SqlServer.xml
  19. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.dll
  20. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.xml
  21. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PS3.psd1
  22. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PowerShell.Utility.dll
  23. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PowerShell.dll
  24. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.psd1
  25. 777 777
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.psm1
  26. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/about_EntityFramework.help.txt
  27. 178 178
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/init.ps1
  28. 172 172
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/install.ps1
  29. 0 0
      aspnet/lib/EntityFramework.6.0.0-alpha3/tools/migrate.exe
  30. 0 0
      aspnet/lib/Microsoft.AspNet.Mvc.4.0.20710.0/Microsoft.AspNet.Mvc.4.0.20710.0.nupkg
  31. 20 20
      aspnet/lib/Microsoft.AspNet.Mvc.4.0.20710.0/Microsoft.AspNet.Mvc.4.0.20710.0.nuspec
  32. 0 0
      aspnet/lib/Microsoft.AspNet.Mvc.4.0.20710.0/lib/net40/System.Web.Mvc.dll
  33. 0 0
      aspnet/lib/Microsoft.AspNet.Mvc.4.0.20710.0/lib/net40/System.Web.Mvc.xml
  34. 0 0
      aspnet/lib/Microsoft.AspNet.Razor.2.0.20715.0/Microsoft.AspNet.Razor.2.0.20715.0.nupkg
  35. 20 20
      aspnet/lib/Microsoft.AspNet.Razor.2.0.20715.0/Microsoft.AspNet.Razor.2.0.20715.0.nuspec
  36. 0 0
      aspnet/lib/Microsoft.AspNet.Razor.2.0.20715.0/lib/net40/System.Web.Razor.dll
  37. 0 0
      aspnet/lib/Microsoft.AspNet.Razor.2.0.20715.0/lib/net40/System.Web.Razor.xml
  38. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/Microsoft.AspNet.WebPages.2.0.20710.0.nupkg
  39. 28 28
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/Microsoft.AspNet.WebPages.2.0.20710.0.nuspec
  40. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.Helpers.dll
  41. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.Helpers.xml
  42. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Deployment.dll
  43. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Deployment.xml
  44. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Razor.dll
  45. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Razor.xml
  46. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.dll
  47. 0 0
      aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.xml
  48. BIN
      aspnet/lib/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg
  49. 16 0
      aspnet/lib/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nuspec
  50. BIN
      aspnet/lib/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll
  51. BIN
      aspnet/lib/MySql.Data.6.7.2/MySql.Data.Entity.dll
  52. 0 0
      aspnet/lib/MySql.Data.6.7.2/MySql.Data.dll
  53. 3 0
      aspnet/lib/MySql.Data.6.7.2/Readme.md
  54. BIN
      aspnet/lib/Npgsql.2.0.12-EF6/Mono.Security.dll
  55. 0 0
      aspnet/lib/Npgsql.2.0.12-EF6/Npgsql.dll
  56. 3 0
      aspnet/lib/Npgsql.2.0.12-EF6/Readme.md
  57. 1 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Readme.md
  58. 181 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.AllFilesInProjectFolder.targets
  59. 242 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.AllFilesInTheProject.targets
  60. 445 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/CollectFiles/Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets
  61. 59 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FPSE.targets
  62. 60 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FTP.targets
  63. 116 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.FileSystem.targets
  64. 49 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.MsDeploy.targets
  65. 54 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.Deploy.Package.targets
  66. 1192 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Deploy/Microsoft.Web.Publishing.MsDeploy.Common.targets
  67. BIN
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.Publishing.Tasks.dll
  68. 4678 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.Publishing.targets
  69. BIN
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.XmlTransform.dll
  70. 530 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.WebSite.Publishing.targets
  71. 767 0
      aspnet/lib/VisualStudio.MsBuild.11.0/Web/Transform/Microsoft.Web.Publishing.AspNetCompileMerge.targets
  72. BIN
      aspnet/lib/VisualStudio.MsBuild.11.0/WebApplications/Microsoft.WebApplication.Build.Tasks.Dll
  73. 389 0
      aspnet/lib/VisualStudio.MsBuild.11.0/WebApplications/Microsoft.WebApplication.targets
  74. 0 0
      aspnet/lib/mongocsharpdriver.1.8.1/License.rtf
  75. 0 0
      aspnet/lib/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Bson.XML
  76. 0 0
      aspnet/lib/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Bson.dll
  77. 0 0
      aspnet/lib/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Driver.XML
  78. 0 0
      aspnet/lib/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Driver.dll
  79. 0 0
      aspnet/lib/mongocsharpdriver.1.8.1/mongocsharpdriver.1.8.1.nupkg
  80. 22 22
      aspnet/lib/mongocsharpdriver.1.8.1/mongocsharpdriver.1.8.1.nuspec
  81. 3 1
      aspnet/lib/packages.config
  82. 4 0
      aspnet/lib/repositories.config
  83. 0 0
      aspnet/nginx.conf
  84. 19 0
      aspnet/setup_iis.ps1
  85. 22 0
      aspnet/setup_iis.py
  86. 9 3
      aspnet/setup_nginx.py
  87. 10 4
      aspnet/setup_xsp.py
  88. 70 75
      aspnet/src/Benchmarks.AspNet.csproj
  89. 31 0
      aspnet/src/Benchmarks.sln
  90. 2 2
      aspnet/src/Controllers/AdoController.cs
  91. 2 2
      aspnet/src/Controllers/EntityFrameworkController.cs
  92. 12 12
      aspnet/src/Controllers/JsonController.cs
  93. 2 2
      aspnet/src/Controllers/MongoDBController.cs
  94. 1 1
      aspnet/src/Global.asax
  95. 10 4
      aspnet/src/Global.asax.cs
  96. 1 1
      aspnet/src/Models/EntityFramework.cs
  97. 1 1
      aspnet/src/Models/Fortune.cs
  98. 7 7
      aspnet/src/Models/World.cs
  99. 6 0
      aspnet/src/NuGet.config
  100. 75 0
      aspnet/src/Properties/PublishProfiles/IIS.pubxml

+ 0 - 50
aspnet-mono/benchmark_config

@@ -1,50 +0,0 @@
-{
-  "framework": "aspnet-mono",
-  "tests": [{
-    "default": {
-      "setup_file": "setup-nginx",
-      "json_url": "/json",
-      "port": 8080,
-      "sort": 90
-    },
-    "mysql-raw": {
-      "setup_file": "setup-nginx",
-      "db_url": "/ado/mysql",
-      "query_url": "/ado/mysql?queries=",
-      "fortune_url": "/ado/mysql/fortunes",
-      "port": 8080,
-      "sort": 91
-    },
-    "postgresql-raw": {
-      "setup_file": "setup-nginx",
-      "db_url": "/ado/postgresql",
-      "query_url": "/ado/postgresql?queries=",
-      "fortune_url": "/ado/postgresql/fortunes",
-      "port": 8080,
-      "sort": 92
-    },
-    "mongodb-raw": {
-      "setup_file": "setup-nginx",
-      "db_url": "/mongodb",
-      "query_url": "/mongodb?queries=",
-      "port": 8080,
-      "sort": 93
-    },
-    "mysql-entityframework": {
-      "setup_file": "setup-nginx",
-      "db_url": "/entityframework/mysql",
-      "query_url": "/entityframework/mysql?queries=",
-      "fortune_url": "/entityframework/mysql/fortunes",
-      "port": 8080,
-      "sort": 94
-    },
-    "postgresql-entityframework": {
-      "setup_file": "setup-nginx",
-      "db_url": "/entityframework/postgresql",
-      "query_url": "/entityframework/postgresql?queries=",
-      "fortune_url": "/entityframework/postgresql/fortunes",
-      "port": 8080,
-      "sort": 95
-    }
-  }]
-}

+ 0 - 20
aspnet-mono/project/Benchmarks.Mono.AspNet.sln

@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks.Mono.AspNet", "Benchmarks.Mono.AspNet\Benchmarks.Mono.AspNet.csproj", "{62C3DEA2-2696-4200-BD83-011679316847}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Release|Any CPU = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{62C3DEA2-2696-4200-BD83-011679316847}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{62C3DEA2-2696-4200-BD83-011679316847}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{62C3DEA2-2696-4200-BD83-011679316847}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{62C3DEA2-2696-4200-BD83-011679316847}.Release|Any CPU.Build.0 = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

+ 0 - 3
aspnet-mono/project/packages/MySql.Data.6.7.2/Readme.md

@@ -1,3 +0,0 @@
-Rebuilt MySQL Connector/Net to work with Entity Framework v6
-
-Source: https://github.com/pdonald/mysql-connector-net

+ 0 - 4
aspnet-mono/project/packages/repositories.config

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

+ 0 - 0
aspnet-mono/project/.gitignore → aspnet/.gitignore


+ 32 - 1
aspnet-mono/README.md → aspnet/README.md

@@ -1,4 +1,4 @@
-# Mono ASP.NET MVC
+# ASP.NET MVC on Mono and Windows
 
 ## Tests
 
@@ -66,4 +66,35 @@
     make
     sudo make install
 
+## Versions
 
+**Language**
+
+* C# 5.0
+
+**Platforms**
+
+* .NET Framework 4.5 (Windows)
+* Mono 3.0.10 (Linux)
+
+**Web Servers**
+
+* IIS 8 (Windows)
+* XSP 2.11.0.0 (3.0?) (Linux)
+* nginx 1.4.0 & XSP FastCGI (Linux)
+
+**Web Stack**
+
+* ASP.NET 4.5
+* ASP.NET MVC Framework 4
+
+**Databases**
+
+* MySQL Connector/Net 6.7.2-beta (custom build)
+* Npgsql 2.0.12 (custom build)
+* Entity Framework 6.0.0-alpha3
+* Mongo C# Driver 1.8.1
+
+**Developer Tools**
+
+* Visual Studio 2012 Update 2

+ 0 - 0
aspnet-mono/__init__.py → aspnet/__init__.py


+ 95 - 0
aspnet/benchmark_config

@@ -0,0 +1,95 @@
+{
+  "framework": "aspnet",
+  "tests": [{
+    "default": {
+      "setup_file": "setup_iis",
+      "json_url": "/json",
+      "port": 8080,
+      "sort": 90
+    },
+    "mysql-raw": {
+      "setup_file": "setup_iis",
+      "db_url": "/ado/mysql",
+      "query_url": "/ado/mysql?queries=",
+      "fortune_url": "/ado/mysql/fortunes",
+      "port": 8080,
+      "sort": 91
+    },
+    "postgresql-raw": {
+      "setup_file": "setup_iis",
+      "db_url": "/ado/postgresql",
+      "query_url": "/ado/postgresql?queries=",
+      "fortune_url": "/ado/postgresql/fortunes",
+      "port": 8080,
+      "sort": 92
+    },
+    "mongodb-raw": {
+      "setup_file": "setup_iis",
+      "db_url": "/mongodb",
+      "query_url": "/mongodb?queries=",
+      "port": 8080,
+      "sort": 93
+    },
+    "mysql-entityframework": {
+      "setup_file": "setup_iis",
+      "db_url": "/entityframework/mysql",
+      "query_url": "/entityframework/mysql?queries=",
+      "fortune_url": "/entityframework/mysql/fortunes",
+      "port": 8080,
+      "sort": 94
+    },
+    "postgresql-entityframework": {
+      "setup_file": "setup_iis",
+      "db_url": "/entityframework/postgresql",
+      "query_url": "/entityframework/postgresql?queries=",
+      "fortune_url": "/entityframework/postgresql/fortunes",
+      "port": 8080,
+      "sort": 95
+    },
+    "mono": {
+      "setup_file": "setup_nginx",
+      "json_url": "/json",
+      "port": 8080,
+      "sort": 98
+    },
+    "mono-mysql-raw": {
+      "setup_file": "setup_nginx",
+      "db_url": "/ado/mysql",
+      "query_url": "/ado/mysql?queries=",
+      "fortune_url": "/ado/mysql/fortunes",
+      "port": 8080,
+      "sort": 99
+    },
+    "mono-postgresql-raw": {
+      "setup_file": "setup_nginx",
+      "db_url": "/ado/postgresql",
+      "query_url": "/ado/postgresql?queries=",
+      "fortune_url": "/ado/postgresql/fortunes",
+      "port": 8080,
+      "sort": 100
+    },
+    "mono-mongodb-raw": {
+      "setup_file": "setup_nginx",
+      "db_url": "/mongodb",
+      "query_url": "/mongodb?queries=",
+      "port": 8080,
+      "sort": 101
+    },
+    "mono-mysql-entityframework": {
+      "setup_file": "setup_nginx",
+      "db_url": "/entityframework/mysql",
+      "query_url": "/entityframework/mysql?queries=",
+      "fortune_url": "/entityframework/mysql/fortunes",
+      "port": 8080,
+      "sort": 102
+    },
+    "mono-postgresql-entityframework": {
+      "setup_file": "setup_nginx",
+      "db_url": "/entityframework/postgresql",
+      "query_url": "/entityframework/postgresql?queries=",
+      "fortune_url": "/entityframework/postgresql/fortunes",
+      "port": 8080,
+      "sort": 103
+    }
+  }]
+}

+ 5 - 5
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/Content/App.config.transform → aspnet/lib/EntityFramework.6.0.0-alpha3/Content/App.config.transform

@@ -1,5 +1,5 @@
-<configuration>
-    <configSections>
-        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    </configSections>
-</configuration>
+<configuration>
+    <configSections>
+        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+    </configSections>
+</configuration>

+ 5 - 5
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/Content/Web.config.transform → aspnet/lib/EntityFramework.6.0.0-alpha3/Content/Web.config.transform

@@ -1,5 +1,5 @@
-<configuration>
-    <configSections>
-        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    </configSections>
-</configuration>
+<configuration>
+    <configSections>
+        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+    </configSections>
+</configuration>

+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/EntityFramework.6.0.0-alpha3.nupkg → aspnet/lib/EntityFramework.6.0.0-alpha3/EntityFramework.6.0.0-alpha3.nupkg


+ 24 - 24
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/EntityFramework.6.0.0-alpha3.nuspec → aspnet/lib/EntityFramework.6.0.0-alpha3/EntityFramework.6.0.0-alpha3.nuspec

@@ -1,25 +1,25 @@
-<?xml version="1.0"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
-  <metadata>
-    <id>EntityFramework</id>
-    <version>6.0.0-alpha3</version>
-    <title>EntityFramework</title>
-    <authors>Microsoft</authors>
-    <owners>Microsoft</owners>
-    <licenseUrl>http://go.microsoft.com/fwlink/?LinkId=285426</licenseUrl>
-    <projectUrl>http://go.microsoft.com/fwlink/?LinkID=285425</projectUrl>
-    <requireLicenseAcceptance>true</requireLicenseAcceptance>
-    <description>Entity Framework is Microsoft's recommended data access technology for new applications.</description>
-    <summary>Entity Framework is Microsoft's recommended data access technology for new applications.</summary>
-    <releaseNotes />
-    <copyright />
-    <language>en-US</language>
-    <frameworkAssemblies>
-      <frameworkAssembly assemblyName="System.ComponentModel.DataAnnotations" targetFramework="" />
-    </frameworkAssemblies>
-    <references>
-      <reference file="EntityFramework.dll" />
-      <reference file="EntityFramework.SqlServer.dll" />
-    </references>
-  </metadata>
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
+  <metadata>
+    <id>EntityFramework</id>
+    <version>6.0.0-alpha3</version>
+    <title>EntityFramework</title>
+    <authors>Microsoft</authors>
+    <owners>Microsoft</owners>
+    <licenseUrl>http://go.microsoft.com/fwlink/?LinkId=285426</licenseUrl>
+    <projectUrl>http://go.microsoft.com/fwlink/?LinkID=285425</projectUrl>
+    <requireLicenseAcceptance>true</requireLicenseAcceptance>
+    <description>Entity Framework is Microsoft's recommended data access technology for new applications.</description>
+    <summary>Entity Framework is Microsoft's recommended data access technology for new applications.</summary>
+    <releaseNotes />
+    <copyright />
+    <language>en-US</language>
+    <frameworkAssemblies>
+      <frameworkAssembly assemblyName="System.ComponentModel.DataAnnotations" targetFramework="" />
+    </frameworkAssemblies>
+    <references>
+      <reference file="EntityFramework.dll" />
+      <reference file="EntityFramework.SqlServer.dll" />
+    </references>
+  </metadata>
 </package>

+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.SqlServer.dll → aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.SqlServer.dll


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.SqlServer.xml → aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.SqlServer.xml


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.dll → aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.dll


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.xml → aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net40/EntityFramework.xml


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.SqlServer.dll → aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.SqlServer.dll


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.SqlServer.xml → aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.SqlServer.xml


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.dll → aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.dll


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.xml → aspnet/lib/EntityFramework.6.0.0-alpha3/lib/net45/EntityFramework.xml


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PS3.psd1 → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PS3.psd1


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PowerShell.Utility.dll → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PowerShell.Utility.dll


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PowerShell.dll → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.PowerShell.dll


+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/EntityFramework.psd1 → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.psd1


+ 777 - 777
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/EntityFramework.psm1 → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/EntityFramework.psm1

@@ -1,777 +1,777 @@
-# Copyright (c) Microsoft Corporation.  All rights reserved.
-
-$InitialDatabase = '0'
-
-$knownExceptions = @(
-    'System.Data.Entity.Migrations.Infrastructure.MigrationsException',
-    'System.Data.Entity.Migrations.Infrastructure.AutomaticMigrationsDisabledException',
-    'System.Data.Entity.Migrations.Infrastructure.AutomaticDataLossException',
-    'System.Data.Entity.Migrations.Infrastructure.MigrationsPendingException',
-    'System.Data.Entity.Migrations.ProjectTypeNotSupportedException'
-)
-
-<#
-.SYNOPSIS
-    Enables Code First Migrations in a project.
-
-.DESCRIPTION
-    Enables Migrations by scaffolding a migrations configuration class in the project. If the
-    target database was created by an initializer, an initial migration will be created (unless
-    automatic migrations are enabled via the EnableAutomaticMigrations parameter).
-
-.PARAMETER ContextTypeName
-    Specifies the context to use. If omitted, migrations will attempt to locate a
-    single context type in the target project.
-
-.PARAMETER EnableAutomaticMigrations
-    Specifies whether automatic migrations will be enabled in the scaffolded migrations configuration.
-    If omitted, automatic migrations will be disabled.
-
-.PARAMETER MigrationsDirectory
-    Specifies the name of the directory that will contain migrations code files.
-    If omitted, the directory will be named "Migrations". 
-
-.PARAMETER ProjectName
-    Specifies the project that the scaffolded migrations configuration class will
-    be added to. If omitted, the default project selected in package manager
-    console is used.
-
-.PARAMETER StartUpProjectName
-    Specifies the configuration file to use for named connection strings. If
-    omitted, the specified project's configuration file is used.
-
-.PARAMETER ConnectionStringName
-    Specifies the name of a connection string to use from the application's
-    configuration file.
-
-.PARAMETER ConnectionString
-    Specifies the the connection string to use. If omitted, the context's
-    default connection will be used.
-
-.PARAMETER ConnectionProviderName
-    Specifies the provider invariant name of the connection string.
-
-.PARAMETER Force
-    Specifies that the migrations configuration be overwritten when running more
-    than once for a given project.
-#>
-function Enable-Migrations
-{
-    [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')] 
-    param (
-        [string] $ContextTypeName,
-        [alias('Auto')]
-        [switch] $EnableAutomaticMigrations,
-        [string] $MigrationsDirectory,
-        [string] $ProjectName,
-        [string] $StartUpProjectName,
-        [parameter(ParameterSetName = 'ConnectionStringName')]
-        [string] $ConnectionStringName,
-        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
-            Mandatory = $true)]
-        [string] $ConnectionString,
-        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
-            Mandatory = $true)]
-        [string] $ConnectionProviderName,
-        [switch] $Force
-    )
-
-    $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $null $ConnectionStringName $ConnectionString $ConnectionProviderName
-
-    try
-    {
-        Invoke-RunnerCommand $runner System.Data.Entity.Migrations.EnableMigrationsCommand @( $EnableAutomaticMigrations.IsPresent, $Force.IsPresent ) @{ 'ContextTypeName' = $ContextTypeName; 'MigrationsDirectory' = $MigrationsDirectory }        		
-		$error = Get-RunnerError $runner					
-
-        if ($error)
-        {
-            if ($knownExceptions -notcontains $error.TypeName)
-            {
-                Write-Host $error.StackTrace
-            }
-
-            throw $error.Message
-        }
-
-		$(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()	        
-    }
-    finally
-    {				
-        Remove-Runner $runner		
-    }
-}
-
-<#
-.SYNOPSIS
-    Scaffolds a migration script for any pending model changes.
-
-.DESCRIPTION
-    Scaffolds a new migration script and adds it to the project.
-
-.PARAMETER Name
-    Specifies the name of the custom script.
-
-.PARAMETER Force
-    Specifies that the migration user code be overwritten when re-scaffolding an
-    existing migration.
-
-.PARAMETER ProjectName
-    Specifies the project that contains the migration configuration type to be
-    used. If omitted, the default project selected in package manager console
-    is used.
-
-.PARAMETER StartUpProjectName
-    Specifies the configuration file to use for named connection strings. If
-    omitted, the specified project's configuration file is used.
-
-.PARAMETER ConfigurationTypeName
-    Specifies the migrations configuration to use. If omitted, migrations will
-    attempt to locate a single migrations configuration type in the target
-    project.
-
-.PARAMETER ConnectionStringName
-    Specifies the name of a connection string to use from the application's
-    configuration file.
-
-.PARAMETER ConnectionString
-    Specifies the the connection string to use. If omitted, the context's
-    default connection will be used.
-
-.PARAMETER ConnectionProviderName
-    Specifies the provider invariant name of the connection string.
-
-.PARAMETER IgnoreChanges
-    Scaffolds an empty migration ignoring any pending changes detected in the current model.
-    This can be used to create an initial, empty migration to enable Migrations for an existing
-    database. N.B. Doing this assumes that the target database schema is compatible with the
-    current model.
-
-#>
-function Add-Migration
-{
-    [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
-    param (
-        [parameter(Position = 0,
-            Mandatory = $true)]
-        [string] $Name,
-        [switch] $Force,
-        [string] $ProjectName,
-        [string] $StartUpProjectName,
-        [string] $ConfigurationTypeName,
-        [parameter(ParameterSetName = 'ConnectionStringName')]
-        [string] $ConnectionStringName,
-        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
-            Mandatory = $true)]
-        [string] $ConnectionString,
-        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
-            Mandatory = $true)]
-        [string] $ConnectionProviderName,
-        [switch] $IgnoreChanges)
-
-    $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
-
-    try
-    {
-        Invoke-RunnerCommand $runner System.Data.Entity.Migrations.AddMigrationCommand @( $Name, $Force.IsPresent, $IgnoreChanges.IsPresent )
-        $error = Get-RunnerError $runner       		
-
-        if ($error)
-        {
-            if ($knownExceptions -notcontains $error.TypeName)
-            {
-                Write-Host $error.StackTrace
-            }
-
-            throw $error.Message
-        }		
-		$(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()	        
-    }
-    finally
-    {			
-        Remove-Runner $runner		
-    }	
-}
-
-<#
-.SYNOPSIS
-    Applies any pending migrations to the database.
-
-.DESCRIPTION
-    Updates the database to the current model by applying pending migrations.
-
-.PARAMETER SourceMigration
-    Only valid with -Script. Specifies the name of a particular migration to use
-    as the update's starting point. If omitted, the last applied migration in
-    the database will be used.
-
-.PARAMETER TargetMigration
-    Specifies the name of a particular migration to update the database to. If
-    omitted, the current model will be used.
-
-.PARAMETER Script
-    Generate a SQL script rather than executing the pending changes directly.
-
-.PARAMETER Force
-    Specifies that data loss is acceptable during automatic migration of the
-    database.
-
-.PARAMETER ProjectName
-    Specifies the project that contains the migration configuration type to be
-    used. If omitted, the default project selected in package manager console
-    is used.
-
-.PARAMETER StartUpProjectName
-    Specifies the configuration file to use for named connection strings. If
-    omitted, the specified project's configuration file is used.
-
-.PARAMETER ConfigurationTypeName
-    Specifies the migrations configuration to use. If omitted, migrations will
-    attempt to locate a single migrations configuration type in the target
-    project.
-
-.PARAMETER ConnectionStringName
-    Specifies the name of a connection string to use from the application's
-    configuration file.
-
-.PARAMETER ConnectionString
-    Specifies the the connection string to use. If omitted, the context's
-    default connection will be used.
-
-.PARAMETER ConnectionProviderName
-    Specifies the provider invariant name of the connection string.
-#>
-function Update-Database
-{
-    [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
-    param (
-        [string] $SourceMigration,
-        [string] $TargetMigration,
-        [switch] $Script,
-        [switch] $Force,
-        [string] $ProjectName,
-        [string] $StartUpProjectName,
-        [string] $ConfigurationTypeName,
-        [parameter(ParameterSetName = 'ConnectionStringName')]
-        [string] $ConnectionStringName,
-        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
-            Mandatory = $true)]
-        [string] $ConnectionString,
-        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
-            Mandatory = $true)]
-        [string] $ConnectionProviderName)
-
-    $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
-
-    try
-    {
-        Invoke-RunnerCommand $runner System.Data.Entity.Migrations.UpdateDatabaseCommand @( $SourceMigration, $TargetMigration, $Script.IsPresent, $Force.IsPresent, $Verbose.IsPresent )
-        $error = Get-RunnerError $runner
-        
-        if ($error)
-        {
-            if ($knownExceptions -notcontains $error.TypeName)
-            {
-                Write-Host $error.StackTrace
-            }
-
-            throw $error.Message
-        }		
-		$(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()	        
-    }
-    finally
-    {		     
-	    Remove-Runner $runner
-    }
-}
-
-<#
-.SYNOPSIS
-    Displays the migrations that have been applied to the target database.
-
-.DESCRIPTION
-    Displays the migrations that have been applied to the target database.
-
-.PARAMETER ProjectName
-    Specifies the project that contains the migration configuration type to be
-    used. If omitted, the default project selected in package manager console
-    is used.
-
-.PARAMETER StartUpProjectName
-    Specifies the configuration file to use for named connection strings. If
-    omitted, the specified project's configuration file is used.
-
-.PARAMETER ConfigurationTypeName
-    Specifies the migrations configuration to use. If omitted, migrations will
-    attempt to locate a single migrations configuration type in the target
-    project.
-
-.PARAMETER ConnectionStringName
-    Specifies the name of a connection string to use from the application's
-    configuration file.
-
-.PARAMETER ConnectionString
-    Specifies the the connection string to use. If omitted, the context's
-    default connection will be used.
-
-.PARAMETER ConnectionProviderName
-    Specifies the provider invariant name of the connection string.
-#>
-function Get-Migrations
-{
-    [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
-    param (
-        [string] $ProjectName,
-        [string] $StartUpProjectName,
-        [string] $ConfigurationTypeName,
-        [parameter(ParameterSetName = 'ConnectionStringName')]
-        [string] $ConnectionStringName,
-        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
-            Mandatory = $true)]
-        [string] $ConnectionString,
-        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
-            Mandatory = $true)]
-        [string] $ConnectionProviderName)
-
-    $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
-
-    try
-    {
-        Invoke-RunnerCommand $runner System.Data.Entity.Migrations.GetMigrationsCommand
-        $error = Get-RunnerError $runner
-        
-        if ($error)
-        {
-            if ($knownExceptions -notcontains $error.TypeName)
-            {
-                Write-Host $error.StackTrace
-            }
-
-            throw $error.Message
-        }
-    }
-    finally
-    {
-        Remove-Runner $runner
-    }
-}
-
-function New-MigrationsRunner($ProjectName, $StartUpProjectName, $ConfigurationTypeName, $ConnectionStringName, $ConnectionString, $ConnectionProviderName)
-{
-    $startUpProject = Get-MigrationsStartUpProject $StartUpProjectName $ProjectName
-    Build-Project $startUpProject
-
-    $project = Get-MigrationsProject $ProjectName
-    Build-Project $project
-
-    $installPath = Get-EntityFrameworkInstallPath $project
-    $toolsPath = Join-Path $installPath tools
-
-    $info = New-Object System.AppDomainSetup -Property @{
-            ShadowCopyFiles = 'true';
-            ApplicationBase = $installPath;
-            PrivateBinPath = 'tools';
-            ConfigurationFile = ([AppDomain]::CurrentDomain.SetupInformation.ConfigurationFile)
-        }
-    
-    $targetFrameworkVersion = (New-Object System.Runtime.Versioning.FrameworkName ($project.Properties.Item('TargetFrameworkMoniker').Value)).Version
-
-    if ($targetFrameworkVersion -lt (New-Object Version @( 4, 5 )))
-    {
-        $info.PrivateBinPath += ';lib\net40'
-    }
-    else
-    {
-        $info.PrivateBinPath += ';lib\net45'
-    }
-
-    $domain = [AppDomain]::CreateDomain('Migrations', $null, $info)
-    $domain.SetData('project', $project)
-    $domain.SetData('startUpProject', $startUpProject)
-    $domain.SetData('configurationTypeName', $ConfigurationTypeName)
-    $domain.SetData('connectionStringName', $ConnectionStringName)
-    $domain.SetData('connectionString', $ConnectionString)
-    $domain.SetData('connectionProviderName', $ConnectionProviderName)
-    
-    [AppDomain]::CurrentDomain.SetShadowCopyFiles()
-    $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path $toolsPath EntityFramework.PowerShell.Utility.dll))
-    $dispatcher = $utilityAssembly.CreateInstance(
-        'System.Data.Entity.Migrations.Utilities.DomainDispatcher',
-        $false,
-        [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::Public,
-        $null,
-        $PSCmdlet,
-        $null,
-        $null)        
-    $domain.SetData('efDispatcher', $dispatcher)
-
-    return @{
-        Domain = $domain;
-        ToolsPath = $toolsPath
-    }
-}
-
-function Remove-Runner($runner)
-{
-    [AppDomain]::Unload($runner.Domain)
-}
-
-function Invoke-RunnerCommand($runner, $command, $parameters, $anonymousArguments)
-{
-    $domain = $runner.Domain
-
-	if ($anonymousArguments)
-	{
-		$anonymousArguments.GetEnumerator() | %{
-			$domain.SetData($_.Name, $_.Value)
-		}
-	}
-
-    $domain.CreateInstanceFrom(
-        (Join-Path $runner.ToolsPath EntityFramework.PowerShell.dll),
-        $command,
-        $false,
-        0,
-        $null,
-        $parameters,
-        $null,
-        $null) | Out-Null
-}
-
-function Get-RunnerError($runner)
-{
-    $domain = $runner.Domain
-
-    if (!$domain.GetData('wasError'))
-    {
-        return $null
-    }
-
-    return @{
-            Message = $domain.GetData('error.Message');
-            TypeName = $domain.GetData('error.TypeName');
-            StackTrace = $domain.GetData('error.StackTrace')
-    }
-}
-
-function Get-MigrationsProject($name, $hideMessage)
-{
-    if ($name)
-    {
-        return Get-SingleProject $name
-    }
-
-    $project = Get-Project
-    $projectName = $project.Name
-
-    if (!$hideMessage)
-    {
-        Write-Verbose "Using NuGet project '$projectName'."
-    }
-
-    return $project
-}
-
-function Get-MigrationsStartUpProject($name, $fallbackName)
-{    
-    $startUpProject = $null
-
-    if ($name)
-    {
-        $startUpProject = Get-SingleProject $name
-    }
-    else
-    {
-        $startupProjectPaths = $DTE.Solution.SolutionBuild.StartupProjects
-
-        if ($startupProjectPaths)
-        {
-            if ($startupProjectPaths.Length -eq 1)
-            {
-                $startupProjectPath = $startupProjectPaths[0]
-
-                if (!(Split-Path -IsAbsolute $startupProjectPath))
-                {
-                    $solutionPath = Split-Path $DTE.Solution.Properties.Item('Path').Value
-                    $startupProjectPath = Join-Path $solutionPath $startupProjectPath -Resolve
-                }
-
-                $startupProject = Get-SolutionProjects | ?{
-					try
-					{
-						$fullName = $_.FullName
-					}
-					catch [NotImplementedException]
-					{
-						return $false
-					}
-
-                    if ($fullName -and $fullName.EndsWith('\'))
-                    {
-                        $fullName = $fullName.Substring(0, $fullName.Length - 1)
-                    }
-
-                    return $fullName -eq $startupProjectPath
-                }
-            }
-            else
-            {
-                Write-Verbose 'More than one start-up project found.'
-            }
-        }
-        else
-        {
-            Write-Verbose 'No start-up project found.'
-        }
-    }
-
-    if (!($startUpProject -and (Test-StartUpProject $startUpProject)))
-    {
-        $startUpProject = Get-MigrationsProject $fallbackName $true
-        $startUpProjectName = $startUpProject.Name
-
-        Write-Warning "Cannot determine a valid start-up project. Using project '$startUpProjectName' instead. Your configuration file and working directory may not be set as expected. Use the -StartUpProjectName parameter to set one explicitly. Use the -Verbose switch for more information."
-    }
-    else
-    {
-        $startUpProjectName = $startUpProject.Name
-
-        Write-Verbose "Using StartUp project '$startUpProjectName'."
-    }
-
-    return $startUpProject
-}
-
-function Get-SolutionProjects()
-{
-    $projects = New-Object System.Collections.Stack
-    
-    $DTE.Solution.Projects | %{
-        $projects.Push($_)
-    }
-    
-    while ($projects.Count -ne 0)
-    {
-        $project = $projects.Pop();
-        
-        # NOTE: This line is similar to doing a "yield return" in C#
-        $project
-
-        if ($project.ProjectItems)
-        {
-            $project.ProjectItems | ?{ $_.SubProject } | %{
-                $projects.Push($_.SubProject)
-            }
-        }
-    }
-}
-
-function Get-SingleProject($name)
-{
-    $project = Get-Project $name
-
-    if ($project -is [array])
-    {
-        throw "More than one project '$name' was found. Specify the full name of the one to use."
-    }
-
-    return $project
-}
-
-function Test-StartUpProject($project)
-{    
-    if ($project.Kind -eq '{cc5fd16d-436d-48ad-a40c-5a424c6e3e79}')
-    {
-        $projectName = $project.Name
-        Write-Verbose "Cannot use start-up project '$projectName'. The Windows Azure Project type isn't supported."
-        
-        return $false
-    }
-    
-    return $true
-}
-
-function Build-Project($project)
-{
-    $configuration = $DTE.Solution.SolutionBuild.ActiveConfiguration.Name
-
-    $DTE.Solution.SolutionBuild.BuildProject($configuration, $project.UniqueName, $true)
-
-    if ($DTE.Solution.SolutionBuild.LastBuildInfo)
-    {
-        $projectName = $project.Name
-
-        throw "The project '$projectName' failed to build."
-    }
-}
-
-function Get-EntityFrameworkInstallPath($project)
-{
-    $package = Get-Package -ProjectName $project.FullName | ?{ $_.Id -eq 'EntityFramework' }
-
-    if (!$package)
-    {
-        $projectName = $project.Name
-
-        throw "The EntityFramework package is not installed on project '$projectName'."
-    }
-    
-    return Get-PackageInstallPath $package
-}
-    
-function Get-PackageInstallPath($package)
-    {
-    $componentModel = Get-VsComponentModel
-    $packageInstallerServices = $componentModel.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])
-
-    $vsPackage = $packageInstallerServices.GetInstalledPackages() | ?{ $_.Id -eq $package.Id -and $_.Version -eq $package.Version }
-    
-    return $vsPackage.InstallPath
-}
-
-Export-ModuleMember @( 'Enable-Migrations', 'Add-Migration', 'Update-Database', 'Get-Migrations' ) -Variable InitialDatabase
-
-# SIG # Begin signature block
-# MIIanQYJKoZIhvcNAQcCoIIajjCCGooCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
-# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
-# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUhBFz4Itt1wDYyur2mJt4qMN2
-# aESgghV5MIIEujCCA6KgAwIBAgIKYQKSSgAAAAAAIDANBgkqhkiG9w0BAQUFADB3
-# MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVk
-# bW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEwHwYDVQQDExhN
-# aWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTIwMTA5MjIyNTU5WhcNMTMwNDA5
-# MjIyNTU5WjC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IDAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
-# hkiG9w0BCQUxDxcNMTMwMjIyMTkxMTA2WjAjBgkqhkiG9w0BCQQxFgQUmW7sRqG8
-# eSOCjAFX0gZ7T1shm28wDQYJKoZIhvcNAQEFBQAEggEAo0K+BgNxnEtg02oxycUT
-# 442aVruVBTf8egY0GFthF4jgMdegRW/+e1U4jpOfONuNKEe2sdvB6jwPJ9ZQy2W6
-# kwnSQ8JrWXUgdnLAuDRYsCp1X4xO/HfsfX9i8WLWJVgUasgmKAkaywCdazeeF6YD
-# vtGVGNCXnxdvtmTmhVgICU0099NOEcs7M/nU3puc7qCt9ozwJYeeGQrG6VFQEzye
-# HHN0Ooumxjlkro5w6OWNV4ASkc4zpz5JWfGGCe7aw+KV5J+FapyeMXFykdG35MK8
-# RlAKqatsLQRWVpyGbHVEEn6UIbgxqJAuQtS7BRApgzOg6M3HNFxnIZcJ8QkVc74h
-# Jg==
-# SIG # End signature block
+# Copyright (c) Microsoft Corporation.  All rights reserved.
+
+$InitialDatabase = '0'
+
+$knownExceptions = @(
+    'System.Data.Entity.Migrations.Infrastructure.MigrationsException',
+    'System.Data.Entity.Migrations.Infrastructure.AutomaticMigrationsDisabledException',
+    'System.Data.Entity.Migrations.Infrastructure.AutomaticDataLossException',
+    'System.Data.Entity.Migrations.Infrastructure.MigrationsPendingException',
+    'System.Data.Entity.Migrations.ProjectTypeNotSupportedException'
+)
+
+<#
+.SYNOPSIS
+    Enables Code First Migrations in a project.
+
+.DESCRIPTION
+    Enables Migrations by scaffolding a migrations configuration class in the project. If the
+    target database was created by an initializer, an initial migration will be created (unless
+    automatic migrations are enabled via the EnableAutomaticMigrations parameter).
+
+.PARAMETER ContextTypeName
+    Specifies the context to use. If omitted, migrations will attempt to locate a
+    single context type in the target project.
+
+.PARAMETER EnableAutomaticMigrations
+    Specifies whether automatic migrations will be enabled in the scaffolded migrations configuration.
+    If omitted, automatic migrations will be disabled.
+
+.PARAMETER MigrationsDirectory
+    Specifies the name of the directory that will contain migrations code files.
+    If omitted, the directory will be named "Migrations". 
+
+.PARAMETER ProjectName
+    Specifies the project that the scaffolded migrations configuration class will
+    be added to. If omitted, the default project selected in package manager
+    console is used.
+
+.PARAMETER StartUpProjectName
+    Specifies the configuration file to use for named connection strings. If
+    omitted, the specified project's configuration file is used.
+
+.PARAMETER ConnectionStringName
+    Specifies the name of a connection string to use from the application's
+    configuration file.
+
+.PARAMETER ConnectionString
+    Specifies the the connection string to use. If omitted, the context's
+    default connection will be used.
+
+.PARAMETER ConnectionProviderName
+    Specifies the provider invariant name of the connection string.
+
+.PARAMETER Force
+    Specifies that the migrations configuration be overwritten when running more
+    than once for a given project.
+#>
+function Enable-Migrations
+{
+    [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')] 
+    param (
+        [string] $ContextTypeName,
+        [alias('Auto')]
+        [switch] $EnableAutomaticMigrations,
+        [string] $MigrationsDirectory,
+        [string] $ProjectName,
+        [string] $StartUpProjectName,
+        [parameter(ParameterSetName = 'ConnectionStringName')]
+        [string] $ConnectionStringName,
+        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
+            Mandatory = $true)]
+        [string] $ConnectionString,
+        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
+            Mandatory = $true)]
+        [string] $ConnectionProviderName,
+        [switch] $Force
+    )
+
+    $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $null $ConnectionStringName $ConnectionString $ConnectionProviderName
+
+    try
+    {
+        Invoke-RunnerCommand $runner System.Data.Entity.Migrations.EnableMigrationsCommand @( $EnableAutomaticMigrations.IsPresent, $Force.IsPresent ) @{ 'ContextTypeName' = $ContextTypeName; 'MigrationsDirectory' = $MigrationsDirectory }        		
+		$error = Get-RunnerError $runner					
+
+        if ($error)
+        {
+            if ($knownExceptions -notcontains $error.TypeName)
+            {
+                Write-Host $error.StackTrace
+            }
+
+            throw $error.Message
+        }
+
+		$(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()	        
+    }
+    finally
+    {				
+        Remove-Runner $runner		
+    }
+}
+
+<#
+.SYNOPSIS
+    Scaffolds a migration script for any pending model changes.
+
+.DESCRIPTION
+    Scaffolds a new migration script and adds it to the project.
+
+.PARAMETER Name
+    Specifies the name of the custom script.
+
+.PARAMETER Force
+    Specifies that the migration user code be overwritten when re-scaffolding an
+    existing migration.
+
+.PARAMETER ProjectName
+    Specifies the project that contains the migration configuration type to be
+    used. If omitted, the default project selected in package manager console
+    is used.
+
+.PARAMETER StartUpProjectName
+    Specifies the configuration file to use for named connection strings. If
+    omitted, the specified project's configuration file is used.
+
+.PARAMETER ConfigurationTypeName
+    Specifies the migrations configuration to use. If omitted, migrations will
+    attempt to locate a single migrations configuration type in the target
+    project.
+
+.PARAMETER ConnectionStringName
+    Specifies the name of a connection string to use from the application's
+    configuration file.
+
+.PARAMETER ConnectionString
+    Specifies the the connection string to use. If omitted, the context's
+    default connection will be used.
+
+.PARAMETER ConnectionProviderName
+    Specifies the provider invariant name of the connection string.
+
+.PARAMETER IgnoreChanges
+    Scaffolds an empty migration ignoring any pending changes detected in the current model.
+    This can be used to create an initial, empty migration to enable Migrations for an existing
+    database. N.B. Doing this assumes that the target database schema is compatible with the
+    current model.
+
+#>
+function Add-Migration
+{
+    [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
+    param (
+        [parameter(Position = 0,
+            Mandatory = $true)]
+        [string] $Name,
+        [switch] $Force,
+        [string] $ProjectName,
+        [string] $StartUpProjectName,
+        [string] $ConfigurationTypeName,
+        [parameter(ParameterSetName = 'ConnectionStringName')]
+        [string] $ConnectionStringName,
+        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
+            Mandatory = $true)]
+        [string] $ConnectionString,
+        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
+            Mandatory = $true)]
+        [string] $ConnectionProviderName,
+        [switch] $IgnoreChanges)
+
+    $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
+
+    try
+    {
+        Invoke-RunnerCommand $runner System.Data.Entity.Migrations.AddMigrationCommand @( $Name, $Force.IsPresent, $IgnoreChanges.IsPresent )
+        $error = Get-RunnerError $runner       		
+
+        if ($error)
+        {
+            if ($knownExceptions -notcontains $error.TypeName)
+            {
+                Write-Host $error.StackTrace
+            }
+
+            throw $error.Message
+        }		
+		$(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()	        
+    }
+    finally
+    {			
+        Remove-Runner $runner		
+    }	
+}
+
+<#
+.SYNOPSIS
+    Applies any pending migrations to the database.
+
+.DESCRIPTION
+    Updates the database to the current model by applying pending migrations.
+
+.PARAMETER SourceMigration
+    Only valid with -Script. Specifies the name of a particular migration to use
+    as the update's starting point. If omitted, the last applied migration in
+    the database will be used.
+
+.PARAMETER TargetMigration
+    Specifies the name of a particular migration to update the database to. If
+    omitted, the current model will be used.
+
+.PARAMETER Script
+    Generate a SQL script rather than executing the pending changes directly.
+
+.PARAMETER Force
+    Specifies that data loss is acceptable during automatic migration of the
+    database.
+
+.PARAMETER ProjectName
+    Specifies the project that contains the migration configuration type to be
+    used. If omitted, the default project selected in package manager console
+    is used.
+
+.PARAMETER StartUpProjectName
+    Specifies the configuration file to use for named connection strings. If
+    omitted, the specified project's configuration file is used.
+
+.PARAMETER ConfigurationTypeName
+    Specifies the migrations configuration to use. If omitted, migrations will
+    attempt to locate a single migrations configuration type in the target
+    project.
+
+.PARAMETER ConnectionStringName
+    Specifies the name of a connection string to use from the application's
+    configuration file.
+
+.PARAMETER ConnectionString
+    Specifies the the connection string to use. If omitted, the context's
+    default connection will be used.
+
+.PARAMETER ConnectionProviderName
+    Specifies the provider invariant name of the connection string.
+#>
+function Update-Database
+{
+    [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
+    param (
+        [string] $SourceMigration,
+        [string] $TargetMigration,
+        [switch] $Script,
+        [switch] $Force,
+        [string] $ProjectName,
+        [string] $StartUpProjectName,
+        [string] $ConfigurationTypeName,
+        [parameter(ParameterSetName = 'ConnectionStringName')]
+        [string] $ConnectionStringName,
+        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
+            Mandatory = $true)]
+        [string] $ConnectionString,
+        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
+            Mandatory = $true)]
+        [string] $ConnectionProviderName)
+
+    $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
+
+    try
+    {
+        Invoke-RunnerCommand $runner System.Data.Entity.Migrations.UpdateDatabaseCommand @( $SourceMigration, $TargetMigration, $Script.IsPresent, $Force.IsPresent, $Verbose.IsPresent )
+        $error = Get-RunnerError $runner
+        
+        if ($error)
+        {
+            if ($knownExceptions -notcontains $error.TypeName)
+            {
+                Write-Host $error.StackTrace
+            }
+
+            throw $error.Message
+        }		
+		$(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]).Show()	        
+    }
+    finally
+    {		     
+	    Remove-Runner $runner
+    }
+}
+
+<#
+.SYNOPSIS
+    Displays the migrations that have been applied to the target database.
+
+.DESCRIPTION
+    Displays the migrations that have been applied to the target database.
+
+.PARAMETER ProjectName
+    Specifies the project that contains the migration configuration type to be
+    used. If omitted, the default project selected in package manager console
+    is used.
+
+.PARAMETER StartUpProjectName
+    Specifies the configuration file to use for named connection strings. If
+    omitted, the specified project's configuration file is used.
+
+.PARAMETER ConfigurationTypeName
+    Specifies the migrations configuration to use. If omitted, migrations will
+    attempt to locate a single migrations configuration type in the target
+    project.
+
+.PARAMETER ConnectionStringName
+    Specifies the name of a connection string to use from the application's
+    configuration file.
+
+.PARAMETER ConnectionString
+    Specifies the the connection string to use. If omitted, the context's
+    default connection will be used.
+
+.PARAMETER ConnectionProviderName
+    Specifies the provider invariant name of the connection string.
+#>
+function Get-Migrations
+{
+    [CmdletBinding(DefaultParameterSetName = 'ConnectionStringName')]
+    param (
+        [string] $ProjectName,
+        [string] $StartUpProjectName,
+        [string] $ConfigurationTypeName,
+        [parameter(ParameterSetName = 'ConnectionStringName')]
+        [string] $ConnectionStringName,
+        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
+            Mandatory = $true)]
+        [string] $ConnectionString,
+        [parameter(ParameterSetName = 'ConnectionStringAndProviderName',
+            Mandatory = $true)]
+        [string] $ConnectionProviderName)
+
+    $runner = New-MigrationsRunner $ProjectName $StartUpProjectName $ConfigurationTypeName $ConnectionStringName $ConnectionString $ConnectionProviderName
+
+    try
+    {
+        Invoke-RunnerCommand $runner System.Data.Entity.Migrations.GetMigrationsCommand
+        $error = Get-RunnerError $runner
+        
+        if ($error)
+        {
+            if ($knownExceptions -notcontains $error.TypeName)
+            {
+                Write-Host $error.StackTrace
+            }
+
+            throw $error.Message
+        }
+    }
+    finally
+    {
+        Remove-Runner $runner
+    }
+}
+
+function New-MigrationsRunner($ProjectName, $StartUpProjectName, $ConfigurationTypeName, $ConnectionStringName, $ConnectionString, $ConnectionProviderName)
+{
+    $startUpProject = Get-MigrationsStartUpProject $StartUpProjectName $ProjectName
+    Build-Project $startUpProject
+
+    $project = Get-MigrationsProject $ProjectName
+    Build-Project $project
+
+    $installPath = Get-EntityFrameworkInstallPath $project
+    $toolsPath = Join-Path $installPath tools
+
+    $info = New-Object System.AppDomainSetup -Property @{
+            ShadowCopyFiles = 'true';
+            ApplicationBase = $installPath;
+            PrivateBinPath = 'tools';
+            ConfigurationFile = ([AppDomain]::CurrentDomain.SetupInformation.ConfigurationFile)
+        }
+    
+    $targetFrameworkVersion = (New-Object System.Runtime.Versioning.FrameworkName ($project.Properties.Item('TargetFrameworkMoniker').Value)).Version
+
+    if ($targetFrameworkVersion -lt (New-Object Version @( 4, 5 )))
+    {
+        $info.PrivateBinPath += ';lib\net40'
+    }
+    else
+    {
+        $info.PrivateBinPath += ';lib\net45'
+    }
+
+    $domain = [AppDomain]::CreateDomain('Migrations', $null, $info)
+    $domain.SetData('project', $project)
+    $domain.SetData('startUpProject', $startUpProject)
+    $domain.SetData('configurationTypeName', $ConfigurationTypeName)
+    $domain.SetData('connectionStringName', $ConnectionStringName)
+    $domain.SetData('connectionString', $ConnectionString)
+    $domain.SetData('connectionProviderName', $ConnectionProviderName)
+    
+    [AppDomain]::CurrentDomain.SetShadowCopyFiles()
+    $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path $toolsPath EntityFramework.PowerShell.Utility.dll))
+    $dispatcher = $utilityAssembly.CreateInstance(
+        'System.Data.Entity.Migrations.Utilities.DomainDispatcher',
+        $false,
+        [System.Reflection.BindingFlags]::Instance -bor [System.Reflection.BindingFlags]::Public,
+        $null,
+        $PSCmdlet,
+        $null,
+        $null)        
+    $domain.SetData('efDispatcher', $dispatcher)
+
+    return @{
+        Domain = $domain;
+        ToolsPath = $toolsPath
+    }
+}
+
+function Remove-Runner($runner)
+{
+    [AppDomain]::Unload($runner.Domain)
+}
+
+function Invoke-RunnerCommand($runner, $command, $parameters, $anonymousArguments)
+{
+    $domain = $runner.Domain
+
+	if ($anonymousArguments)
+	{
+		$anonymousArguments.GetEnumerator() | %{
+			$domain.SetData($_.Name, $_.Value)
+		}
+	}
+
+    $domain.CreateInstanceFrom(
+        (Join-Path $runner.ToolsPath EntityFramework.PowerShell.dll),
+        $command,
+        $false,
+        0,
+        $null,
+        $parameters,
+        $null,
+        $null) | Out-Null
+}
+
+function Get-RunnerError($runner)
+{
+    $domain = $runner.Domain
+
+    if (!$domain.GetData('wasError'))
+    {
+        return $null
+    }
+
+    return @{
+            Message = $domain.GetData('error.Message');
+            TypeName = $domain.GetData('error.TypeName');
+            StackTrace = $domain.GetData('error.StackTrace')
+    }
+}
+
+function Get-MigrationsProject($name, $hideMessage)
+{
+    if ($name)
+    {
+        return Get-SingleProject $name
+    }
+
+    $project = Get-Project
+    $projectName = $project.Name
+
+    if (!$hideMessage)
+    {
+        Write-Verbose "Using NuGet project '$projectName'."
+    }
+
+    return $project
+}
+
+function Get-MigrationsStartUpProject($name, $fallbackName)
+{    
+    $startUpProject = $null
+
+    if ($name)
+    {
+        $startUpProject = Get-SingleProject $name
+    }
+    else
+    {
+        $startupProjectPaths = $DTE.Solution.SolutionBuild.StartupProjects
+
+        if ($startupProjectPaths)
+        {
+            if ($startupProjectPaths.Length -eq 1)
+            {
+                $startupProjectPath = $startupProjectPaths[0]
+
+                if (!(Split-Path -IsAbsolute $startupProjectPath))
+                {
+                    $solutionPath = Split-Path $DTE.Solution.Properties.Item('Path').Value
+                    $startupProjectPath = Join-Path $solutionPath $startupProjectPath -Resolve
+                }
+
+                $startupProject = Get-SolutionProjects | ?{
+					try
+					{
+						$fullName = $_.FullName
+					}
+					catch [NotImplementedException]
+					{
+						return $false
+					}
+
+                    if ($fullName -and $fullName.EndsWith('\'))
+                    {
+                        $fullName = $fullName.Substring(0, $fullName.Length - 1)
+                    }
+
+                    return $fullName -eq $startupProjectPath
+                }
+            }
+            else
+            {
+                Write-Verbose 'More than one start-up project found.'
+            }
+        }
+        else
+        {
+            Write-Verbose 'No start-up project found.'
+        }
+    }
+
+    if (!($startUpProject -and (Test-StartUpProject $startUpProject)))
+    {
+        $startUpProject = Get-MigrationsProject $fallbackName $true
+        $startUpProjectName = $startUpProject.Name
+
+        Write-Warning "Cannot determine a valid start-up project. Using project '$startUpProjectName' instead. Your configuration file and working directory may not be set as expected. Use the -StartUpProjectName parameter to set one explicitly. Use the -Verbose switch for more information."
+    }
+    else
+    {
+        $startUpProjectName = $startUpProject.Name
+
+        Write-Verbose "Using StartUp project '$startUpProjectName'."
+    }
+
+    return $startUpProject
+}
+
+function Get-SolutionProjects()
+{
+    $projects = New-Object System.Collections.Stack
+    
+    $DTE.Solution.Projects | %{
+        $projects.Push($_)
+    }
+    
+    while ($projects.Count -ne 0)
+    {
+        $project = $projects.Pop();
+        
+        # NOTE: This line is similar to doing a "yield return" in C#
+        $project
+
+        if ($project.ProjectItems)
+        {
+            $project.ProjectItems | ?{ $_.SubProject } | %{
+                $projects.Push($_.SubProject)
+            }
+        }
+    }
+}
+
+function Get-SingleProject($name)
+{
+    $project = Get-Project $name
+
+    if ($project -is [array])
+    {
+        throw "More than one project '$name' was found. Specify the full name of the one to use."
+    }
+
+    return $project
+}
+
+function Test-StartUpProject($project)
+{    
+    if ($project.Kind -eq '{cc5fd16d-436d-48ad-a40c-5a424c6e3e79}')
+    {
+        $projectName = $project.Name
+        Write-Verbose "Cannot use start-up project '$projectName'. The Windows Azure Project type isn't supported."
+        
+        return $false
+    }
+    
+    return $true
+}
+
+function Build-Project($project)
+{
+    $configuration = $DTE.Solution.SolutionBuild.ActiveConfiguration.Name
+
+    $DTE.Solution.SolutionBuild.BuildProject($configuration, $project.UniqueName, $true)
+
+    if ($DTE.Solution.SolutionBuild.LastBuildInfo)
+    {
+        $projectName = $project.Name
+
+        throw "The project '$projectName' failed to build."
+    }
+}
+
+function Get-EntityFrameworkInstallPath($project)
+{
+    $package = Get-Package -ProjectName $project.FullName | ?{ $_.Id -eq 'EntityFramework' }
+
+    if (!$package)
+    {
+        $projectName = $project.Name
+
+        throw "The EntityFramework package is not installed on project '$projectName'."
+    }
+    
+    return Get-PackageInstallPath $package
+}
+    
+function Get-PackageInstallPath($package)
+    {
+    $componentModel = Get-VsComponentModel
+    $packageInstallerServices = $componentModel.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])
+
+    $vsPackage = $packageInstallerServices.GetInstalledPackages() | ?{ $_.Id -eq $package.Id -and $_.Version -eq $package.Version }
+    
+    return $vsPackage.InstallPath
+}
+
+Export-ModuleMember @( 'Enable-Migrations', 'Add-Migration', 'Update-Database', 'Get-Migrations' ) -Variable InitialDatabase
+
+# SIG # Begin signature block
+# MIIanQYJKoZIhvcNAQcCoIIajjCCGooCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
+# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
+# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4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ojsGwgvztvI8dElKmGSFUFJH71I+LcHa/FpYTr/
+# XwDbPR2PD7GEP0IMbdH0YqESFFmLP8KOl8o95UsAoYICHzCCAhsGCSqGSIb3DQEJ
+# BjGCAgwwggIIAgEBMIGFMHcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5n
+# dG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9y
+# YXRpb24xITAfBgNVBAMTGE1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQQIKYQKSSgAA
+# AAAAIDAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
+# hkiG9w0BCQUxDxcNMTMwMjIyMTkxMTA2WjAjBgkqhkiG9w0BCQQxFgQUmW7sRqG8
+# eSOCjAFX0gZ7T1shm28wDQYJKoZIhvcNAQEFBQAEggEAo0K+BgNxnEtg02oxycUT
+# 442aVruVBTf8egY0GFthF4jgMdegRW/+e1U4jpOfONuNKEe2sdvB6jwPJ9ZQy2W6
+# kwnSQ8JrWXUgdnLAuDRYsCp1X4xO/HfsfX9i8WLWJVgUasgmKAkaywCdazeeF6YD
+# vtGVGNCXnxdvtmTmhVgICU0099NOEcs7M/nU3puc7qCt9ozwJYeeGQrG6VFQEzye
+# HHN0Ooumxjlkro5w6OWNV4ASkc4zpz5JWfGGCe7aw+KV5J+FapyeMXFykdG35MK8
+# RlAKqatsLQRWVpyGbHVEEn6UIbgxqJAuQtS7BRApgzOg6M3HNFxnIZcJ8QkVc74h
+# Jg==
+# SIG # End signature block

+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/about_EntityFramework.help.txt → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/about_EntityFramework.help.txt


+ 178 - 178
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/init.ps1 → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/init.ps1

@@ -1,178 +1,178 @@
-param($installPath, $toolsPath, $package, $project)
-
-$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
-
-if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
-{
-	$thisModuleManifest = 'EntityFramework.PS3.psd1'
-}
-else
-{
-	$thisModuleManifest = 'EntityFramework.psd1'
-}
-
-$thisModule = Test-ModuleManifest (Join-Path $toolsPath $thisModuleManifest)
-$shouldImport = $true
-
-if ($importedModule)
-{
-    if ($importedModule.Version -le $thisModule.Version)
-    {
-        Remove-Module EntityFramework
-    }
-    else
-    {
-        $shouldImport = $false
-    }    
-}
-
-if ($shouldImport)
-{
-    Import-Module $thisModule
-}
-
-# SIG # Begin signature block
-# MIIanQYJKoZIhvcNAQcCoIIajjCCGooCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
-# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
-# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU4JbMotbKQrAO4s/cceCMbJQG
-# 482gghV5MIIEujCCA6KgAwIBAgIKYQKOQgAAAAAAHzANBgkqhkiG9w0BAQUFADB3
-# MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVk
-# bW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEwHwYDVQQDExhN
-# aWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTIwMTA5MjIyNTU4WhcNMTMwNDA5
-# MjIyNTU4WjCBszELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAO
-# BgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEN
-# MAsGA1UECxMETU9QUjEnMCUGA1UECxMebkNpcGhlciBEU0UgRVNOOkY1MjgtMzc3
-# Ny04QTc2MSUwIwYDV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mnoy6K/QAvpk2r7kwPtah0d/cODG1qrPhu6kYbFFSsD9GJhw4zF/qLB
-# 41wSns8s7hkSoP/9ErKClPcE7rJj2iyEXE4qtudZnZYnRyGprMKmYvNC+cMUpBCP
-# OVNeZeXN2xe+fMZ9kCIjmFIndm9tk6bb4PoTGO2+jt/0qxk0Bq6V47hqMuSKdZMt
-# 4u/NBfZKYoVnNtvQsPDc5vobVLqSjv4JUutEt5JP1Z5BQeR5S4kKa+Fqd8F+1KUA
-# DlKYkCPhfa2U1TI5RoiQGYl0V1Q9082zRESTGk6vscUGX5v172rZwCerAkjAtnAd
-# eA==
-# SIG # End signature block
+param($installPath, $toolsPath, $package, $project)
+
+$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
+
+if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
+{
+	$thisModuleManifest = 'EntityFramework.PS3.psd1'
+}
+else
+{
+	$thisModuleManifest = 'EntityFramework.psd1'
+}
+
+$thisModule = Test-ModuleManifest (Join-Path $toolsPath $thisModuleManifest)
+$shouldImport = $true
+
+if ($importedModule)
+{
+    if ($importedModule.Version -le $thisModule.Version)
+    {
+        Remove-Module EntityFramework
+    }
+    else
+    {
+        $shouldImport = $false
+    }    
+}
+
+if ($shouldImport)
+{
+    Import-Module $thisModule
+}
+
+# SIG # Begin signature block
+# MIIanQYJKoZIhvcNAQcCoIIajjCCGooCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
+# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
+# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU4JbMotbKQrAO4s/cceCMbJQG
+# 482gghV5MIIEujCCA6KgAwIBAgIKYQKOQgAAAAAAHzANBgkqhkiG9w0BAQUFADB3
+# MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVk
+# bW9uZDEeMBwGA1UE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DVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9y
+# YXRpb24xITAfBgNVBAMTGE1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQQIKYQKOQgAA
+# AAAAHzAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
+# hkiG9w0BCQUxDxcNMTMwMjIyMTkxMTA2WjAjBgkqhkiG9w0BCQQxFgQUrst06mQI
+# 9Yy5kDhbfcE5sm48vvUwDQYJKoZIhvcNAQEFBQAEggEANdaheYsiflzXdj4Pra9v
+# 5JiVWGeUzmnoy6K/QAvpk2r7kwPtah0d/cODG1qrPhu6kYbFFSsD9GJhw4zF/qLB
+# 41wSns8s7hkSoP/9ErKClPcE7rJj2iyEXE4qtudZnZYnRyGprMKmYvNC+cMUpBCP
+# OVNeZeXN2xe+fMZ9kCIjmFIndm9tk6bb4PoTGO2+jt/0qxk0Bq6V47hqMuSKdZMt
+# 4u/NBfZKYoVnNtvQsPDc5vobVLqSjv4JUutEt5JP1Z5BQeR5S4kKa+Fqd8F+1KUA
+# DlKYkCPhfa2U1TI5RoiQGYl0V1Q9082zRESTGk6vscUGX5v172rZwCerAkjAtnAd
+# eA==
+# SIG # End signature block

+ 172 - 172
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/install.ps1 → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/install.ps1

@@ -1,172 +1,172 @@
-param($installPath, $toolsPath, $package, $project)
-
-function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
-{
-    $appDomain = [AppDomain]::CreateDomain(
-        'EntityFramework.PowerShell',
-        $null,
-        (New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
-
-    $appDomain.CreateInstanceFrom(
-        $assemblyPath,
-        'System.Data.Entity.ConnectionFactoryConfig.ConnectionFactoryConfigurator',
-        $false,
-        0,
-        $null,
-        $project,
-        $null,
-        $null) | Out-Null
-
-    [AppDomain]::Unload($appDomain)
-}
-
-Invoke-ConnectionFactoryConfigurator (Join-Path $toolsPath EntityFramework.PowerShell.dll) $project
-
-Write-Host
-Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework commands."
-
-# SIG # Begin signature block
-# MIIanQYJKoZIhvcNAQcCoIIajjCCGooCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
-# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
-# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU4nG54zEClXzFX9aYwYpo8BH3
-# YWygghV5MIIEujCCA6KgAwIBAgIKYQKOQgAAAAAAHzANBgkqhkiG9w0BAQUFADB3
-# MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVk
-# bW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEwHwYDVQQDExhN
-# aWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTIwMTA5MjIyNTU4WhcNMTMwNDA5
-# MjIyNTU4WjCBszELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAO
-# BgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEN
-# MAsGA1UECxMETU9QUjEnMCUGA1UECxMebkNpcGhlciBEU0UgRVNOOkY1MjgtMzc3
-# Ny04QTc2MSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNlMIIB
-# IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluyOR01UwlyVgNdOCz2/l0PD
-# S+NgZxEvAU0M2NFGLxBA3gukUFISiAtDei0/7khuZseR5gPKbux5qWojm81ins1q
-# pD/no0P/YkehtLpE+t9AwYVUfuigpyxDI5tSHzI19P6aVp+NY3d7MJ4KM4VyG8pK
-#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e9bkqhQYD9wiM+qoi+50+
-# z9k1/V+1D1yRLTo8qD+tZL9oU0b7WtNv/EQotNSrRSVDOL2qVfYBQ3yf8ZF4y6mA
-# pw==
-# SIG # End signature block
+param($installPath, $toolsPath, $package, $project)
+
+function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
+{
+    $appDomain = [AppDomain]::CreateDomain(
+        'EntityFramework.PowerShell',
+        $null,
+        (New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
+
+    $appDomain.CreateInstanceFrom(
+        $assemblyPath,
+        'System.Data.Entity.ConnectionFactoryConfig.ConnectionFactoryConfigurator',
+        $false,
+        0,
+        $null,
+        $project,
+        $null,
+        $null) | Out-Null
+
+    [AppDomain]::Unload($appDomain)
+}
+
+Invoke-ConnectionFactoryConfigurator (Join-Path $toolsPath EntityFramework.PowerShell.dll) $project
+
+Write-Host
+Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework commands."
+
+# SIG # Begin signature block
+# MIIanQYJKoZIhvcNAQcCoIIajjCCGooCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
+# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
+# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU4nG54zEClXzFX9aYwYpo8BH3
+# YWygghV5MIIEujCCA6KgAwIBAgIKYQKOQgAAAAAAHzANBgkqhkiG9w0BAQUFADB3
+# MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVk
+# bW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEwHwYDVQQDExhN
+# aWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTIwMTA5MjIyNTU4WhcNMTMwNDA5
+# MjIyNTU4WjCBszELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAO
+# BgNVBAcT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ATAcBgkq
+# hkiG9w0BCQUxDxcNMTMwMjIyMTkxMTA2WjAjBgkqhkiG9w0BCQQxFgQU1bASg5Fu
+# gh8+Un+w7Ca/bdkNcbswDQYJKoZIhvcNAQEFBQAEggEAGXj5wpX05a0Nz3/59lU8
+# za4OKeBSrsw4bsgncyzcrjlIDZEOcEA1DyG6EB89houP4KC1RsoUYi+1MGF9QlM2
+# +kSnCh/T1NlurkjNiT+zKdy1JENtXUIbtgGb6WbLmqLh0vOFkzK2OuMVc9RB5bn3
+# CC5UaCtYkyj+0nKVKapfC3XvrEywlXl9KGjpgEIFfT8xtO9r9hQoSG3tgrUXfpz2
+# FfjKTjsON5+AY3g/utxZb9RqT5mZDm2OIHy2PjzNjbqe9bkqhQYD9wiM+qoi+50+
+# z9k1/V+1D1yRLTo8qD+tZL9oU0b7WtNv/EQotNSrRSVDOL2qVfYBQ3yf8ZF4y6mA
+# pw==
+# SIG # End signature block

+ 0 - 0
aspnet-mono/project/packages/EntityFramework.6.0.0-alpha3/tools/migrate.exe → aspnet/lib/EntityFramework.6.0.0-alpha3/tools/migrate.exe


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.Mvc.4.0.20710.0/Microsoft.AspNet.Mvc.4.0.20710.0.nupkg → aspnet/lib/Microsoft.AspNet.Mvc.4.0.20710.0/Microsoft.AspNet.Mvc.4.0.20710.0.nupkg


+ 20 - 20
aspnet-mono/project/packages/Microsoft.AspNet.Mvc.4.0.20710.0/Microsoft.AspNet.Mvc.4.0.20710.0.nuspec → aspnet/lib/Microsoft.AspNet.Mvc.4.0.20710.0/Microsoft.AspNet.Mvc.4.0.20710.0.nuspec

@@ -1,21 +1,21 @@
-<?xml version="1.0"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
-  <metadata>
-    <id>Microsoft.AspNet.Mvc</id>
-    <version>4.0.20710.0</version>
-    <title>Microsoft ASP.NET MVC 4</title>
-    <authors>Microsoft</authors>
-    <owners>Microsoft</owners>
-    <licenseUrl>http://www.microsoft.com/web/webpi/eula/MVC_4_eula_ENU.htm</licenseUrl>
-    <projectUrl>http://www.asp.net/mvc</projectUrl>
-    <requireLicenseAcceptance>true</requireLicenseAcceptance>
-    <description>This package contains the runtime assemblies for ASP.NET MVC. ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and that gives you full control over markup.</description>
-    <language>en-US</language>
-    <tags>Microsoft AspNet Mvc AspNetMvc</tags>
-    <dependencies>
-      <dependency id="Microsoft.AspNet.WebPages" version="[2.0.20710.0, 2.1)" />
-      <dependency id="Microsoft.AspNet.Razor" version="[2.0.20710.0, 2.1)" />
-    </dependencies>
-    <references />
-  </metadata>
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+  <metadata>
+    <id>Microsoft.AspNet.Mvc</id>
+    <version>4.0.20710.0</version>
+    <title>Microsoft ASP.NET MVC 4</title>
+    <authors>Microsoft</authors>
+    <owners>Microsoft</owners>
+    <licenseUrl>http://www.microsoft.com/web/webpi/eula/MVC_4_eula_ENU.htm</licenseUrl>
+    <projectUrl>http://www.asp.net/mvc</projectUrl>
+    <requireLicenseAcceptance>true</requireLicenseAcceptance>
+    <description>This package contains the runtime assemblies for ASP.NET MVC. ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and that gives you full control over markup.</description>
+    <language>en-US</language>
+    <tags>Microsoft AspNet Mvc AspNetMvc</tags>
+    <dependencies>
+      <dependency id="Microsoft.AspNet.WebPages" version="[2.0.20710.0, 2.1)" />
+      <dependency id="Microsoft.AspNet.Razor" version="[2.0.20710.0, 2.1)" />
+    </dependencies>
+    <references />
+  </metadata>
 </package>

+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.Mvc.4.0.20710.0/lib/net40/System.Web.Mvc.dll → aspnet/lib/Microsoft.AspNet.Mvc.4.0.20710.0/lib/net40/System.Web.Mvc.dll


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.Mvc.4.0.20710.0/lib/net40/System.Web.Mvc.xml → aspnet/lib/Microsoft.AspNet.Mvc.4.0.20710.0/lib/net40/System.Web.Mvc.xml


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.Razor.2.0.20715.0/Microsoft.AspNet.Razor.2.0.20715.0.nupkg → aspnet/lib/Microsoft.AspNet.Razor.2.0.20715.0/Microsoft.AspNet.Razor.2.0.20715.0.nupkg


+ 20 - 20
aspnet-mono/project/packages/Microsoft.AspNet.Razor.2.0.20715.0/Microsoft.AspNet.Razor.2.0.20715.0.nuspec → aspnet/lib/Microsoft.AspNet.Razor.2.0.20715.0/Microsoft.AspNet.Razor.2.0.20715.0.nuspec

@@ -1,21 +1,21 @@
-<?xml version="1.0"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
-  <metadata>
-    <id>Microsoft.AspNet.Razor</id>
-    <version>2.0.20715.0</version>
-    <title>Microsoft ASP.NET Razor 2</title>
-    <authors>Microsoft</authors>
-    <owners>Microsoft</owners>
-    <licenseUrl>http://www.microsoft.com/web/webpi/eula/WebPages_2_eula_ENU.htm</licenseUrl>
-    <projectUrl>http://www.asp.net/web-pages</projectUrl>
-    <requireLicenseAcceptance>true</requireLicenseAcceptance>
-    <description>This package contains the runtime assemblies for ASP.NET Web Pages. ASP.NET Web Pages and the new Razor syntax provide a fast, terse, clean and lightweight way to combine server code with HTML to create dynamic web content.</description>
-    <releaseNotes />
-    <copyright />
-    <language>en-US</language>
-    <tags>Microsoft AspNet WebPages AspNetWebPages Razor</tags>
-    <references>
-      <reference file="System.Web.Razor.dll" />
-    </references>
-  </metadata>
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+  <metadata>
+    <id>Microsoft.AspNet.Razor</id>
+    <version>2.0.20715.0</version>
+    <title>Microsoft ASP.NET Razor 2</title>
+    <authors>Microsoft</authors>
+    <owners>Microsoft</owners>
+    <licenseUrl>http://www.microsoft.com/web/webpi/eula/WebPages_2_eula_ENU.htm</licenseUrl>
+    <projectUrl>http://www.asp.net/web-pages</projectUrl>
+    <requireLicenseAcceptance>true</requireLicenseAcceptance>
+    <description>This package contains the runtime assemblies for ASP.NET Web Pages. ASP.NET Web Pages and the new Razor syntax provide a fast, terse, clean and lightweight way to combine server code with HTML to create dynamic web content.</description>
+    <releaseNotes />
+    <copyright />
+    <language>en-US</language>
+    <tags>Microsoft AspNet WebPages AspNetWebPages Razor</tags>
+    <references>
+      <reference file="System.Web.Razor.dll" />
+    </references>
+  </metadata>
 </package>

+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.Razor.2.0.20715.0/lib/net40/System.Web.Razor.dll → aspnet/lib/Microsoft.AspNet.Razor.2.0.20715.0/lib/net40/System.Web.Razor.dll


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.Razor.2.0.20715.0/lib/net40/System.Web.Razor.xml → aspnet/lib/Microsoft.AspNet.Razor.2.0.20715.0/lib/net40/System.Web.Razor.xml


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/Microsoft.AspNet.WebPages.2.0.20710.0.nupkg → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/Microsoft.AspNet.WebPages.2.0.20710.0.nupkg


+ 28 - 28
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/Microsoft.AspNet.WebPages.2.0.20710.0.nuspec → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/Microsoft.AspNet.WebPages.2.0.20710.0.nuspec

@@ -1,29 +1,29 @@
-<?xml version="1.0"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
-  <metadata>
-    <id>Microsoft.AspNet.WebPages</id>
-    <version>2.0.20710.0</version>
-    <title>Microsoft ASP.NET Web Pages 2</title>
-    <authors>Microsoft</authors>
-    <owners>Microsoft</owners>
-    <licenseUrl>http://www.microsoft.com/web/webpi/eula/WebPages_2_eula_ENU.htm</licenseUrl>
-    <projectUrl>http://www.asp.net/web-pages</projectUrl>
-    <iconUrl>https://download-codeplex.sec.s-msft.com/Download?ProjectName=aspnetwebstack&amp;DownloadId=360555</iconUrl>
-    <requireLicenseAcceptance>true</requireLicenseAcceptance>
-    <description>This package contains core runtime assemblies shared between ASP.NET MVC and ASP.NET Web Pages.</description>
-    <releaseNotes />
-    <copyright />
-    <language />
-    <tags>Microsoft AspNet WebPages AspNetWebPages</tags>
-    <dependencies>
-      <dependency id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
-      <dependency id="Microsoft.AspNet.Razor" version="[2.0.20710.0, 2.1)" />
-    </dependencies>
-    <references>
-      <reference file="System.Web.Helpers.dll" />
-      <reference file="System.Web.WebPages.Deployment.dll" />
-      <reference file="System.Web.WebPages.dll" />
-      <reference file="System.Web.WebPages.Razor.dll" />
-    </references>
-  </metadata>
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+  <metadata>
+    <id>Microsoft.AspNet.WebPages</id>
+    <version>2.0.20710.0</version>
+    <title>Microsoft ASP.NET Web Pages 2</title>
+    <authors>Microsoft</authors>
+    <owners>Microsoft</owners>
+    <licenseUrl>http://www.microsoft.com/web/webpi/eula/WebPages_2_eula_ENU.htm</licenseUrl>
+    <projectUrl>http://www.asp.net/web-pages</projectUrl>
+    <iconUrl>https://download-codeplex.sec.s-msft.com/Download?ProjectName=aspnetwebstack&amp;DownloadId=360555</iconUrl>
+    <requireLicenseAcceptance>true</requireLicenseAcceptance>
+    <description>This package contains core runtime assemblies shared between ASP.NET MVC and ASP.NET Web Pages.</description>
+    <releaseNotes />
+    <copyright />
+    <language />
+    <tags>Microsoft AspNet WebPages AspNetWebPages</tags>
+    <dependencies>
+      <dependency id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
+      <dependency id="Microsoft.AspNet.Razor" version="[2.0.20710.0, 2.1)" />
+    </dependencies>
+    <references>
+      <reference file="System.Web.Helpers.dll" />
+      <reference file="System.Web.WebPages.Deployment.dll" />
+      <reference file="System.Web.WebPages.dll" />
+      <reference file="System.Web.WebPages.Razor.dll" />
+    </references>
+  </metadata>
 </package>

+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.Helpers.dll → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.Helpers.dll


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.Helpers.xml → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.Helpers.xml


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Deployment.dll → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Deployment.dll


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Deployment.xml → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Deployment.xml


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Razor.dll → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Razor.dll


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Razor.xml → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.Razor.xml


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.dll → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.dll


+ 0 - 0
aspnet-mono/project/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.xml → aspnet/lib/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/System.Web.WebPages.xml


BIN
aspnet/lib/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg


+ 16 - 0
aspnet/lib/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nuspec

@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+  <metadata>
+    <id>Microsoft.Web.Infrastructure</id>
+    <version>1.0.0.0</version>
+    <title>Microsoft.Web.Infrastructure</title>
+    <authors>Microsoft</authors>
+    <owners>Microsoft</owners>
+    <licenseUrl>http://go.microsoft.com/fwlink/?LinkID=214339</licenseUrl>
+    <projectUrl>http://www.asp.net</projectUrl>
+    <requireLicenseAcceptance>false</requireLicenseAcceptance>
+    <description>This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time.</description>
+    <language>en-US</language>
+    <references />
+  </metadata>
+</package>

BIN
aspnet/lib/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll


BIN
aspnet-mono/project/packages/MySql.Data.6.7.2/MySql.Data.Entity.dll → aspnet/lib/MySql.Data.6.7.2/MySql.Data.Entity.dll


+ 0 - 0
aspnet-mono/project/packages/MySql.Data.6.7.2/MySql.Data.dll → aspnet/lib/MySql.Data.6.7.2/MySql.Data.dll


+ 3 - 0
aspnet/lib/MySql.Data.6.7.2/Readme.md

@@ -0,0 +1,3 @@
+Custom build of MySQL Connector/Net to get it to work with Entity Framework v6
+
+https://github.com/pdonald/mysql-connector-net

BIN
aspnet/lib/Npgsql.2.0.12-EF6/Mono.Security.dll


+ 0 - 0
aspnet-mono/project/packages/Npgsql.2.0.12-EF6/Npgsql.dll → aspnet/lib/Npgsql.2.0.12-EF6/Npgsql.dll


+ 3 - 0
aspnet/lib/Npgsql.2.0.12-EF6/Readme.md

@@ -0,0 +1,3 @@
+Custom build of Npgsql to get it to work with Entity Framework v6
+
+https://github.com/pdonald/Npgsql2

+ 1 - 0
aspnet/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
aspnet/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
aspnet/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
aspnet/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
aspnet/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
aspnet/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
aspnet/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
aspnet/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
aspnet/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
aspnet/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
aspnet/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.Publishing.Tasks.dll


+ 4678 - 0
aspnet/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
aspnet/lib/VisualStudio.MsBuild.11.0/Web/Microsoft.Web.XmlTransform.dll


+ 530 - 0
aspnet/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
aspnet/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
aspnet/lib/VisualStudio.MsBuild.11.0/WebApplications/Microsoft.WebApplication.Build.Tasks.Dll


+ 389 - 0
aspnet/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>

+ 0 - 0
aspnet-mono/project/packages/mongocsharpdriver.1.8.1/License.rtf → aspnet/lib/mongocsharpdriver.1.8.1/License.rtf


+ 0 - 0
aspnet-mono/project/packages/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Bson.XML → aspnet/lib/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Bson.XML


+ 0 - 0
aspnet-mono/project/packages/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Bson.dll → aspnet/lib/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Bson.dll


+ 0 - 0
aspnet-mono/project/packages/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Driver.XML → aspnet/lib/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Driver.XML


+ 0 - 0
aspnet-mono/project/packages/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Driver.dll → aspnet/lib/mongocsharpdriver.1.8.1/lib/net35/MongoDB.Driver.dll


+ 0 - 0
aspnet-mono/project/packages/mongocsharpdriver.1.8.1/mongocsharpdriver.1.8.1.nupkg → aspnet/lib/mongocsharpdriver.1.8.1/mongocsharpdriver.1.8.1.nupkg


+ 22 - 22
aspnet-mono/project/packages/mongocsharpdriver.1.8.1/mongocsharpdriver.1.8.1.nuspec → aspnet/lib/mongocsharpdriver.1.8.1/mongocsharpdriver.1.8.1.nuspec

@@ -1,23 +1,23 @@
-<?xml version="1.0"?>
-<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
-  <metadata>
-    <id>mongocsharpdriver</id>
-    <version>1.8.1</version>
-    <title>Official MongoDB C# driver</title>
-    <authors>10gen,  Inc.</authors>
-    <owners>10gen,  Inc.</owners>
-    <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
-    <projectUrl>http://www.mongodb.org/display/DOCS/CSharp+Language+Center</projectUrl>
-    <iconUrl>http://jobs.mongodb.org/files/logos/889002/889002.png</iconUrl>
-    <requireLicenseAcceptance>true</requireLicenseAcceptance>
-    <description>Official 10gen supported C# driver for MongoDB</description>
-    <releaseNotes />
-    <copyright />
-    <language>en-US</language>
-    <tags>mongodb mongo nosql</tags>
-    <references>
-      <reference file="MongoDB.Bson.dll" />
-      <reference file="MongoDB.Driver.dll" />
-    </references>
-  </metadata>
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+  <metadata>
+    <id>mongocsharpdriver</id>
+    <version>1.8.1</version>
+    <title>Official MongoDB C# driver</title>
+    <authors>10gen,  Inc.</authors>
+    <owners>10gen,  Inc.</owners>
+    <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
+    <projectUrl>http://www.mongodb.org/display/DOCS/CSharp+Language+Center</projectUrl>
+    <iconUrl>http://jobs.mongodb.org/files/logos/889002/889002.png</iconUrl>
+    <requireLicenseAcceptance>true</requireLicenseAcceptance>
+    <description>Official 10gen supported C# driver for MongoDB</description>
+    <releaseNotes />
+    <copyright />
+    <language>en-US</language>
+    <tags>mongodb mongo nosql</tags>
+    <references>
+      <reference file="MongoDB.Bson.dll" />
+      <reference file="MongoDB.Driver.dll" />
+    </references>
+  </metadata>
 </package>

+ 3 - 1
aspnet-mono/project/Benchmarks.Mono.AspNet/packages.config → aspnet/lib/packages.config

@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
+  <package id="mongocsharpdriver" version="1.8.1" targetFramework="net45" />
   <package id="EntityFramework" version="6.0.0-alpha3" targetFramework="net45" />
   <package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net45" />
   <package id="Microsoft.AspNet.Razor" version="2.0.20715.0" targetFramework="net45" />
   <package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
-  <package id="mongocsharpdriver" version="1.8.1" targetFramework="net45" />
+  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /> 
+  <package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
 </packages>

+ 4 - 0
aspnet/lib/repositories.config

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

+ 0 - 0
aspnet-mono/nginx.conf → aspnet/nginx.conf


+ 19 - 0
aspnet/setup_iis.ps1

@@ -0,0 +1,19 @@
+param($action)
+
+$wwwroot = "C:\FrameworkBenchmarks\aspnet\www"
+$source = "C:\FrameworkBenchmarks\aspnet\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\Benchmarks.AspNet.csproj" /p:Configuration=Release /p:Platform="x64" /t:Clean
+    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe "$source\Benchmarks.AspNet.csproj" /p:Configuration=Release /p:Platform="x64" /p:DeployOnBuild=true /p:PublishProfile=IIS
+}

+ 22 - 0
aspnet/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("aspnet/src/Web.config", "localhost", args.database_host)
+    subprocess.check_call("powershell -File setup_iis.ps1 start", cwd="aspnet")
+    return 0
+  except subprocess.CalledProcessError:
+    return 1
+
+def stop():
+  if os.name != 'nt':
+    return 0
+  
+  subprocess.Popen("powershell -File setup_iis.ps1 stop", cwd="aspnet")
+  return 0

+ 9 - 3
aspnet-mono/setup-nginx.py → aspnet/setup_nginx.py

@@ -3,16 +3,19 @@ import sys
 import setup_util
 import os
 
-root = os.getcwd() + "/aspnet-mono"
-app = root + "/project/Benchmarks.Mono.AspNet"
+root = os.getcwd() + "/aspnet"
+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", shell=True, cwd=app)
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd=app)
     
     # nginx
     workers = 'worker_processes ' + str(args.max_threads) + ';'
@@ -27,6 +30,9 @@ def start(args):
     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)

+ 10 - 4
aspnet-mono/setup-xsp.py → aspnet/setup_xsp.py

@@ -4,17 +4,23 @@ import setup_util
 import os
 
 def start(args):
-  setup_util.replace_text("aspnet-mono/project/Benchmarks.Mono.AspNet/Web.config", "localhost", args.database_host)
+  if os.name == 'nt':
+    return 1
+  
+  setup_util.replace_text("aspnet/src/Web.config", "localhost", args.database_host)
 
   try:
-    subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet-mono/project/Benchmarks.Mono.AspNet")
-    subprocess.check_call("xbuild", shell=True, cwd="aspnet-mono/project")
-    subprocess.Popen("xsp4 --nonstop", shell=True, cwd="aspnet-mono/project/Benchmarks.Mono.AspNet")
+    subprocess.check_call("rm -rf bin obj", shell=True, cwd="aspnet/src")
+    subprocess.check_call("xbuild /p:Configuration=Release", shell=True, cwd="aspnet/src")
+    subprocess.Popen("xsp4 --nonstop", shell=True, cwd="aspnet/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():

+ 70 - 75
aspnet-mono/project/Benchmarks.Mono.AspNet/Benchmarks.Mono.AspNet.csproj → aspnet/src/Benchmarks.AspNet.csproj

@@ -1,95 +1,106 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?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>
-    <ProductVersion>
-    </ProductVersion>
+    <ProductVersion />
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{62C3DEA2-2696-4200-BD83-011679316847}</ProjectGuid>
     <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Benchmarks.Mono.AspNet</RootNamespace>
-    <AssemblyName>Benchmarks.Mono.AspNet</AssemblyName>
+    <RootNamespace>Benchmarks.AspNet</RootNamespace>
+    <AssemblyName>Benchmarks.AspNet</AssemblyName>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <MvcBuildViews>false</MvcBuildViews>
-    <UseIISExpress>true</UseIISExpress>
+    <UseIISExpress>false</UseIISExpress>
     <IISExpressSSLPort />
     <IISExpressAnonymousAuthentication />
     <IISExpressWindowsAuthentication />
     <IISExpressUseClassicPipelineMode />
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
     <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
     <OutputPath>bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
     <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
+    <PublishDatabases>true</PublishDatabases>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
+  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
     <OutputPath>bin\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
     <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
+    <PublishDatabases>true</PublishDatabases>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Platform)' == 'x86'">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Platform)' == 'x64'">
+    <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="MySql.Data">
+    <Reference Include="System" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Web" />
+    <Reference Include="System.Web.Mvc.dll">
       <Private>True</Private>
-      <HintPath>..\packages\MySql.Data.6.7.2\MySql.Data.dll</HintPath>
+      <HintPath>..\lib\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
     </Reference>
-    <Reference Include="MySql.Data.Entity">
+    <Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <Private>True</Private>
-      <HintPath>..\packages\MySql.Data.6.7.2\MySql.Data.Entity.dll</HintPath>
+      <HintPath>..\lib\Microsoft.AspNet.Razor.2.0.20715.0\lib\net40\System.Web.Razor.dll</HintPath>
     </Reference>
-    <Reference Include="Npgsql">
+    <Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <Private>True</Private>
-      <HintPath>..\packages\Npgsql.2.0.12-EF6\Npgsql.dll</HintPath>
+      <HintPath>..\lib\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
     </Reference>
-    <Reference Include="MongoDB.Driver">
+    <Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <Private>True</Private>
-      <HintPath>..\packages\mongocsharpdriver.1.8.1\lib\net35\MongoDB.Driver.dll</HintPath>
+      <HintPath>..\lib\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
     </Reference>
-    <Reference Include="MongoDB.Bson">
+    <Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <Private>True</Private>
-      <HintPath>..\packages\mongocsharpdriver.1.8.1\lib\net35\MongoDB.Bson.dll</HintPath>
+      <HintPath>..\lib\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
     </Reference>
-    <Reference Include="EntityFramework">
+    <Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <Private>True</Private>
-      <HintPath>..\packages\EntityFramework.6.0.0-alpha3\lib\net45\EntityFramework.dll</HintPath>
+      <HintPath>..\lib\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
     </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Configuration" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Web" />
-    <Reference Include="System.Web.Mvc.dll">
+    <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <Private>True</Private>
-      <HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
+      <HintPath>..\lib\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
     </Reference>
-    <Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+    <Reference Include="MySql.Data">
       <Private>True</Private>
-      <HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20715.0\lib\net40\System.Web.Razor.dll</HintPath>
+      <HintPath>..\lib\MySql.Data.6.7.2\MySql.Data.dll</HintPath>
     </Reference>
-    <Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+    <Reference Include="MySql.Data.Entity">
       <Private>True</Private>
-      <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
+      <HintPath>..\lib\MySql.Data.6.7.2\MySql.Data.Entity.dll</HintPath>
     </Reference>
-    <Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+    <Reference Include="Npgsql">
       <Private>True</Private>
-      <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
+      <HintPath>..\lib\Npgsql.2.0.12-EF6\Npgsql.dll</HintPath>
     </Reference>
-    <Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+    <Reference Include="Npgsql">
       <Private>True</Private>
-      <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
+      <HintPath>..\lib\Npgsql.2.0.12-EF6\Mono.Security.dll</HintPath>
     </Reference>
-    <Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+    <Reference Include="MongoDB.Driver">
+      <Private>True</Private>
+      <HintPath>..\lib\mongocsharpdriver.1.8.1\lib\net35\MongoDB.Driver.dll</HintPath>
+    </Reference>
+    <Reference Include="MongoDB.Bson">
+      <Private>True</Private>
+      <HintPath>..\lib\mongocsharpdriver.1.8.1\lib\net35\MongoDB.Bson.dll</HintPath>
+    </Reference>
+    <Reference Include="EntityFramework">
       <Private>True</Private>
-      <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
+      <HintPath>..\lib\EntityFramework.6.0.0-alpha3\lib\net45\EntityFramework.dll</HintPath>
     </Reference>
   </ItemGroup>
   <ItemGroup>
@@ -97,57 +108,41 @@
     <Compile Include="Controllers\AdoController.cs" />
     <Compile Include="Controllers\EntityFrameworkController.cs" />
     <Compile Include="Controllers\MongoDBController.cs" />
-    <Compile Include="Global.asax.cs">
-      <DependentUpon>Global.asax</DependentUpon>
-    </Compile>
     <Compile Include="Models\EntityFramework.cs" />
     <Compile Include="Models\World.cs" />
     <Compile Include="Models\Fortune.cs" />
-  </ItemGroup>
-  <ItemGroup>
     <Content Include="Global.asax" />
-    <Content Include="Web.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="packages.config">
+    <Compile Include="Global.asax.cs">
+      <DependentUpon>Global.asax</DependentUpon>
+    </Compile>
+    <Content Include="Web.config">
       <SubType>Designer</SubType>
     </Content>
+    <Content Include="Views\Fortunes.cshtml">
+      <Generator>RazorGenerator</Generator>
+    </Content>
+    <Content Include="Views\Web.config" />
   </ItemGroup>
   <ItemGroup>
-    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="Views\Fortunes.cshtml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="Views\Web.config" />
+    <None Include="Properties\PublishProfiles\IIS.pubxml" />
   </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
-    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
     <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
   </PropertyGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <!--<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />-->
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
+  <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="temp" PhysicalPath="$(WebProjectOutputDir)" />
+    <AspNetCompiler VirtualPath="/" PhysicalPath="$(WebProjectOutputDir)" />
   </Target>
   <ProjectExtensions>
     <VisualStudio>
       <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
         <WebProjectProperties>
-          <UseIIS>True</UseIIS>
-          <AutoAssignPort>True</AutoAssignPort>
-          <DevelopmentServerPort>52936</DevelopmentServerPort>
-          <DevelopmentServerVPath>/</DevelopmentServerVPath>
-          <IISUrl>http://localhost:55347/</IISUrl>
-          <NTLMAuthentication>False</NTLMAuthentication>
-          <UseCustomServer>False</UseCustomServer>
-          <CustomServerUrl>
-          </CustomServerUrl>
-          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+          <SaveServerSettingsInUserFile>True</SaveServerSettingsInUserFile>
         </WebProjectProperties>
       </FlavorProperties>
     </VisualStudio>
   </ProjectExtensions>
-</Project>
+</Project>

+ 31 - 0
aspnet/src/Benchmarks.sln

@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks.AspNet", "Benchmarks.AspNet.csproj", "{62C3DEA2-2696-4200-BD83-011679316847}"
+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|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{62C3DEA2-2696-4200-BD83-011679316847}.Debug|x64.ActiveCfg = Debug|x64
+		{62C3DEA2-2696-4200-BD83-011679316847}.Debug|x64.Build.0 = Debug|x64
+		{62C3DEA2-2696-4200-BD83-011679316847}.Debug|x86.ActiveCfg = Debug|x86
+		{62C3DEA2-2696-4200-BD83-011679316847}.Debug|x86.Build.0 = Debug|x86
+		{62C3DEA2-2696-4200-BD83-011679316847}.Release|x64.ActiveCfg = Release|x64
+		{62C3DEA2-2696-4200-BD83-011679316847}.Release|x64.Build.0 = Release|x64
+		{62C3DEA2-2696-4200-BD83-011679316847}.Release|x86.ActiveCfg = Release|x86
+		{62C3DEA2-2696-4200-BD83-011679316847}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 2 - 2
aspnet-mono/project/Benchmarks.Mono.AspNet/Controllers/AdoController.cs → aspnet/src/Controllers/AdoController.cs

@@ -5,9 +5,9 @@ using System.Data;
 using System.Data.Common;
 using System.Web.Mvc;
 
-using Benchmarks.Mono.AspNet.Models;
+using Benchmarks.AspNet.Models;
 
-namespace Benchmarks.Mono.AspNet.Controllers
+namespace Benchmarks.AspNet.Controllers
 {
     public class AdoController : Controller
     {

+ 2 - 2
aspnet-mono/project/Benchmarks.Mono.AspNet/Controllers/EntityFrameworkController.cs → aspnet/src/Controllers/EntityFrameworkController.cs

@@ -2,9 +2,9 @@ using System;
 using System.Collections.Generic;
 using System.Web.Mvc;
 
-using Benchmarks.Mono.AspNet.Models;
+using Benchmarks.AspNet.Models;
 
-namespace Benchmarks.Mono.AspNet.Controllers
+namespace Benchmarks.AspNet.Controllers
 {
     public class EntityFrameworkController : Controller
     {

+ 12 - 12
aspnet-mono/project/Benchmarks.Mono.AspNet/Controllers/JsonController.cs → aspnet/src/Controllers/JsonController.cs

@@ -1,12 +1,12 @@
-using System.Web.Mvc;
-
-namespace Benchmarks.Mono.AspNet.Controllers
-{
-    public class JsonController : Controller
-    {
-        public ActionResult Index()
-        {
-            return Json(new { message = "Hello World" }, JsonRequestBehavior.AllowGet);
-        }
-    }
-}
+using System.Web.Mvc;
+
+namespace Benchmarks.AspNet.Controllers
+{
+    public class JsonController : Controller
+    {
+        public ActionResult Index()
+        {
+            return Json(new { message = "Hello World" }, JsonRequestBehavior.AllowGet);
+        }
+    }
+}

+ 2 - 2
aspnet-mono/project/Benchmarks.Mono.AspNet/Controllers/MongoDBController.cs → aspnet/src/Controllers/MongoDBController.cs

@@ -7,9 +7,9 @@ using MongoDB.Bson.Serialization;
 using MongoDB.Driver;
 using MongoDB.Driver.Builders;
 
-using Benchmarks.Mono.AspNet.Models;
+using Benchmarks.AspNet.Models;
 
-namespace Benchmarks.Mono.AspNet.Controllers
+namespace Benchmarks.AspNet.Controllers
 {
     public class MongoDBController : Controller
     {

+ 1 - 1
aspnet-mono/project/Benchmarks.Mono.AspNet/Global.asax → aspnet/src/Global.asax

@@ -1 +1 @@
-<%@ Application Codebehind="Global.asax.cs" Inherits="Benchmarks.Mono.AspNet.MvcApplication" Language="C#" %>
+<%@ Application Codebehind="Global.asax.cs" Inherits="Benchmarks.AspNet.MvcApplication" Language="C#" %>

+ 10 - 4
aspnet-mono/project/Benchmarks.Mono.AspNet/Global.asax.cs → aspnet/src/Global.asax.cs

@@ -1,16 +1,16 @@
+using System.Web;
 using System.Web.Mvc;
 using System.Web.Routing;
+using System.Web.WebPages;
 
-namespace Benchmarks.Mono.AspNet
+namespace Benchmarks.AspNet
 {
     public class MvcApplication : System.Web.HttpApplication
     {
         protected void Application_Start()
         {
-            ViewEngines.Engines.Clear();
-            ViewEngines.Engines.Add(new RazorViewEngine { ViewLocationFormats = new[] { "~/Views/{0}.cshtml" } });
-
             Routes();
+            Views();
         }
 
         private void Routes()
@@ -33,5 +33,11 @@ namespace Benchmarks.Mono.AspNet
                 defaults: new { action = "Index" }
             );
         }
+
+        public static void Views()
+        {
+            ViewEngines.Engines.Clear();
+            ViewEngines.Engines.Add(new RazorViewEngine { ViewLocationFormats = new[] { "~/Views/{0}.cshtml" } });
+        }
     }
 }

+ 1 - 1
aspnet-mono/project/Benchmarks.Mono.AspNet/Models/EntityFramework.cs → aspnet/src/Models/EntityFramework.cs

@@ -6,7 +6,7 @@ using System.Data.Entity.ModelConfiguration.Configuration.Types;
 using System.Data.Entity.ModelConfiguration.Conventions;
 using System.Reflection;
 
-namespace Benchmarks.Mono.AspNet.Models
+namespace Benchmarks.AspNet.Models
 {
     public class EntityFramework : DbContext
     {

+ 1 - 1
aspnet-mono/project/Benchmarks.Mono.AspNet/Models/Fortune.cs → aspnet/src/Models/Fortune.cs

@@ -1,6 +1,6 @@
 using System;
 
-namespace Benchmarks.Mono.AspNet.Models
+namespace Benchmarks.AspNet.Models
 {
     public class Fortune : IComparable<Fortune>
     {

+ 7 - 7
aspnet-mono/project/Benchmarks.Mono.AspNet/Models/World.cs → aspnet/src/Models/World.cs

@@ -1,8 +1,8 @@
-namespace Benchmarks.Mono.AspNet.Models
-{
-    public class World
-    {
-        public int id { get; set; }
-        public int randomNumber { get; set; }
-    }
+namespace Benchmarks.AspNet.Models
+{
+    public class World
+    {
+        public int id { get; set; }
+        public int randomNumber { get; set; }
+    }
 }

+ 6 - 0
aspnet/src/NuGet.config

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

+ 75 - 0
aspnet/src/Properties/PublishProfiles/IIS.pubxml

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file is used by the publish/package process of your Web project. You can customize the behavior of this process
+by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. 
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>MSDeploy</WebPublishMethod>
+    <MSDeployServiceURL>localhost</MSDeployServiceURL>
+    <DeployIisAppPath>Benchmarks</DeployIisAppPath>
+    <RemoteSitePhysicalPath />
+    <SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
+    <MSDeployPublishMethod>InProc</MSDeployPublishMethod>
+    <UserName />
+    <_SavePWD>False</_SavePWD>
+    <PublishDatabaseSettings>
+      <Objects xmlns="">
+        <ObjectGroup Name="Benchmarks.AspNet.Models.EntityFramework" Order="1" Enabled="False">
+          <Destination Path="" />
+          <Object Type="DbCodeFirst">
+            <Source Path="DBContext" DbContext="Benchmarks.AspNet.Models.EntityFramework, Benchmarks.AspNet" />
+          </Object>
+        </ObjectGroup>
+        <ObjectGroup Name="PostgreSQL" Order="2" Enabled="False">
+          <Destination Path="" />
+          <Object Type="DbDacFx">
+            <PreSource Path="server=localhost;user id=benchmarkdbuser;password=benchmarkdbpass;database=hello_world" includeData="False" />
+            <Source Path="$(IntermediateOutputPath)AutoScripts\PostgreSQL_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
+          </Object>
+          <UpdateFrom Type="Web.Config">
+            <Source MatchValue="server=localhost;user id=benchmarkdbuser;password=benchmarkdbpass;database=hello_world" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
+          </UpdateFrom>
+        </ObjectGroup>
+        <ObjectGroup Name="MongoDB" Order="3" Enabled="False">
+          <Destination Path="" />
+          <Object Type="DbDacFx">
+            <PreSource Path="mongodb://localhost" includeData="False" />
+            <Source Path="$(IntermediateOutputPath)AutoScripts\MongoDB_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
+          </Object>
+          <UpdateFrom Type="Web.Config">
+            <Source MatchValue="mongodb://localhost" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
+          </UpdateFrom>
+        </ObjectGroup>
+        <ObjectGroup Name="MySQL" Order="4" Enabled="False">
+          <Destination Path="" />
+          <Object Type="DbDacFx">
+            <PreSource Path="server=localhost;user id=benchmarkdbuser;password=benchmarkdbpass;database=hello_world" includeData="False" />
+            <Source Path="$(IntermediateOutputPath)AutoScripts\MySQL_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
+          </Object>
+          <UpdateFrom Type="Web.Config">
+            <Source MatchValue="server=localhost;user id=benchmarkdbuser;password=benchmarkdbpass;database=hello_world" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
+          </UpdateFrom>
+        </ObjectGroup>
+      </Objects>
+    </PublishDatabaseSettings>
+    <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
+    <LastUsedPlatform>x64</LastUsedPlatform>
+    <ExcludeApp_Data>True</ExcludeApp_Data>
+    <EnableMSDeployBackup>False</EnableMSDeployBackup>
+    <SiteUrlToLaunchAfterPublish>/</SiteUrlToLaunchAfterPublish>
+    <PrecompileBeforePublish>True</PrecompileBeforePublish>
+    <EnableUpdateable>False</EnableUpdateable>
+    <DebugSymbols>False</DebugSymbols>
+    <WDPMergeOption>DonotMerge</WDPMergeOption>
+  </PropertyGroup>
+  <ItemGroup>
+    <MSDeployParameterValue Include="$(DeployParameterPrefix)Benchmarks.AspNet.Models.EntityFramework-Web.config Connection String" />
+    <MSDeployParameterValue Include="$(DeployParameterPrefix)MongoDB-Web.config Connection String" />
+    <MSDeployParameterValue Include="$(DeployParameterPrefix)MySQL-Web.config Connection String" />
+    <MSDeployParameterValue Include="$(DeployParameterPrefix)PostgreSQL-Web.config Connection String" />
+  </ItemGroup>
+  <ItemGroup>
+    <_ConnectionStringsToInsert Include="Benchmarks.AspNet.Models.EntityFramework" />
+  </ItemGroup>
+</Project>

Some files were not shown because too many files changed in this diff