diff --git a/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.AllFilesInProjectFolder.targets b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.AllFilesInProjectFolder.targets
new file mode 100644
index 0000000..74f7b56
--- /dev/null
+++ b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.AllFilesInProjectFolder.targets
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+ $(PublishPipelineCollectFilesCore);
+ CollectFilesFromProjectFolder;
+
+ <_CollectFiles_IncludeIgnorableFile Condition="'$(_CollectFiles_IncludeIgnorableFile)'==''">False
+
+
+ False
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_KnownProjectItems Include="@(EmbeddedResource)" />
+ <_KnownProjectItems Include="@(None)" />
+ <_KnownProjectItems Include="@(Content)" />
+ <_KnownProjectItems Include="@(Compile)" />
+
+
+
+ <_ProjectBaseIntermediateOutputPath Include="$(BaseIntermediateOutputPath)"/>
+
+
+
+
+
+
+ <_ExcludeRelativePathFromProjectFolder>^[^\\]*\.out$
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SetExcludeFromProjectFolder;
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromProjectFolder_ExcludeSccFiles);
+
+
+
+
+
+ <_ExcludeRelativePathFromProjectFolder>$(_ExcludeRelativePathFromProjectFolder);[^\\]*\.scc$;[^\\]*\.vssscc$;[^\\]*\.vspscc$
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SetExcludeFromProjectFolder;
+ CollectFilesFromProjectFolder_ExcludeSccFiles;
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromProjectFolder);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(_KnownProjectItems.Identity)
+ CollectFilesFromProjectFolder.KonwnProjectItems
+ AllFilesInProjectFolder
+
+
+ %(_KnownProjectItems.Link)
+ CollectFilesFromProjectFolder.KonwnProjectItems
+ AllFilesInProjectFolder
+ $(ExcludeLinkFilesInProject)
+ Link
+
+
+
+ %(_AllFilesUnderProjectFolderExceptKnownProjectItems.Identity)
+ CollectFilesFromProjectFolder.ExceptKonwnProjectItems
+ AllFilesInProjectFolder
+
+
+
+
+
+
diff --git a/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.AllFilesInTheProject.targets b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.AllFilesInTheProject.targets
new file mode 100644
index 0000000..b9cd8b5
--- /dev/null
+++ b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.AllFilesInTheProject.targets
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+
+
+ $(PublishPipelineCollectFilesCore);
+ CollectFilesFromCompile;
+ CollectFilesFromEmbeddedResource;
+ CollectFilesFromNone;
+ CollectFilesFromBaseApplicationManifest;
+ CollectFilesFromProjectFile;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromCompile);
+
+
+
+
+
+
+
+
+
+
+
+ %(Compile.Identity)
+ CollectFilesFromCompile
+ ProjectNotRunRequired
+
+
+ %(Compile.Link)
+ CollectFilesFromCompile
+ ProjectNotRunRequired
+ $(ExcludeLinkFilesInProject)
+ Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromEmbeddedResource);
+
+
+
+
+
+
+
+
+
+
+ %(EmbeddedResource.Identity)
+ CollectFilesFromEmbeddedResource
+ ProjectNotRunRequired
+
+
+ %(EmbeddedResource.Link)
+ CollectFilesFromEmbeddedResource
+ ProjectNotRunRequired
+ $(ExcludeLinkFilesInProject)
+ Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromNone);
+
+
+
+
+
+
+
+
+
+ %(None.Identity)
+ CollectFilesFromNone
+ ProjectNotRunRequired
+
+
+ %(None.Link)
+ CollectFilesFromNone
+ ProjectNotRunRequired
+ $(ExcludeLinkFilesInProject)
+ Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromBaseApplicationManifest);
+
+
+
+
+
+
+
+
+
+
+
+ %(BaseApplicationManifest.Identity)
+ CollectFilesFromBaseApplicationManifest
+ ProjectNotRunRequired
+
+
+ %(BaseApplicationManifest.Link)
+ CollectFilesFromBaseApplicationManifest
+ ProjectNotRunRequired
+ $(ExcludeLinkFilesInProject)
+ Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromProjectFile);
+
+
+
+
+
+
+
+
+
+
+ $(MSBuildProjectFile)
+ CollectFilesFromProjectFile
+ ProjectNotRunRequired
+
+
+ $(MSBuildProjectFile).user
+ CollectFilesFromProjectFile
+ ProjectNotRunRequired
+
+
+
+
+
+
diff --git a/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets
new file mode 100644
index 0000000..127b210
--- /dev/null
+++ b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets
@@ -0,0 +1,481 @@
+
+
+
+
+
+
+
+ $(PublishPipelineCollectFilesCore);
+ CollectFilesFromIntermediateAssembly;
+ CollectFilesFromContent;
+ CollectFilesFromAddModules;
+ CollectFilesFrom_SGenDllCreated;
+ CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath;
+ CollectFilesFromReference;
+ CollectFilesFromAllExtraReferenceFiles;
+ CollectFilesFrom_SourceItemsToCopyToOutputDirectory;
+ CollectFilesFromDocFileItem;
+ CollectFilesFrom_WebApplicationSilverlightXapFiles;
+ CollectFilesFrom_binDeployableAssemblies;
+
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromIntermediateAssembly);
+
+
+
+
+
+
+
+
+
+
+
+ bin\%(FileName)%(Extension)
+ CollectFilesFromIntermediateAssembly
+ Run
+
+
+
+
+
+ bin\%(FileName).pdb
+ CollectFilesFromIntermediateAssembly
+ Debug
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromContent);
+
+
+
+
+
+
+
+
+
+ %(Content.Identity)
+ CollectFilesFromContent
+ Run
+
+
+ %(Content.Link)
+ CollectFilesFromContent
+ Run
+ $(ExcludeLinkFilesInProject)
+ Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromAddModulesDependsOn);
+
+
+
+
+
+
+
+
+
+ bin\%(FileName)%(Extension)
+ CollectFilesFromAddModules
+ Run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFrom_SGenDllCreated);
+
+
+
+
+
+
+
+
+
+ bin\$(_SGenDllName)
+ CollectFilesFrom_SGenDllCreated
+ Run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromIntermediateSatelliteAssembliesWithTargetPath);
+
+
+
+
+
+
+
+
+
+ bin\%(IntermediateSatelliteAssembliesWithTargetPath.TargetPath)
+ CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath
+ Run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromReference);
+ ResolveAssemblyReferences;
+
+
+
+
+
+
+
+
+
+ bin\%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)
+ CollectFilesFromReference
+ Run
+
+
+
+
+
+ bin\%(FileName)%(Extension)
+ CollectFilesFromReference
+ Run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromAllExtraReferenceFiles);
+
+
+
+
+
+
+
+
+
+ bin\%(FileName)%(Extension)
+ CollectFilesFromAllExtraReferenceFiles
+ Run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFrom_SourceItemsToCopyToOutputDirectory);
+
+
+
+
+
+
+
+
+ <_TempSourceItemsToCopyToOutputDirectory Include="@(_SourceItemsToCopyToOutputDirectoryAlways); @(_SourceItemsToCopyToOutputDirectory)" />
+
+
+
+
+
+ bin\%(_TempSourceItemsToCopyToOutputDirectory.TargetPath)
+ CollectFilesFrom_SourceItemsToCopyToOutputDirectory
+ Run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFromDocFileItem);
+
+
+
+
+
+
+
+
+
+ bin\%(FileName)%(Extension)
+ CollectFilesFromDocFileItem
+ Run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFrom_WebApplicationSilverlightXapFiles);
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(_WebApplicationSilverlightXapFiles.Identity)
+ CollectFilesFrom_WebApplicationSilverlightXapFiles
+ Run
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCollectFilesFrom_binDeployableAssemblies);
+ _CopyBinDeployableAssemblies;
+
+
+
+
+
+
+
+
+ bin\%(RecursiveDir)%(FileName)%(Extension)
+ CollectFilesFrom_binDeployableAssemblies
+ Run
+
+
+
+
+
+
diff --git a/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.Tasks.Dll b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.Tasks.Dll
new file mode 100644
index 0000000..ef8df73
Binary files /dev/null and b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.Tasks.Dll differ
diff --git a/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.targets b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.targets
new file mode 100644
index 0000000..9b02352
--- /dev/null
+++ b/Reference Assemblies/Microsoft.Web.Publishing.Tasks/Microsoft.Web.Publishing.targets
@@ -0,0 +1,3919 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_WPPVerstion>1.5
+ <_WPPSupports>IISExpress
+
+
+
+ <_WPPSupports Include="$(_WPPSupports)" />
+
+
+
+
+
+ <_IISApplicationPool Include="Clr4IntegratedAppPool">
+ ASP.NET v4.0
+
+ <_IISApplicationPool Include="Clr4ClassicAppPool">
+ ASP.NET v4.0 Classic
+
+ <_IISApplicationPool Include="Clr2IntegratedAppPool">
+ DefaultAppPool
+
+ <_IISApplicationPool Include="Clr2ClassicAppPool">
+ Classic .NET AppPool
+
+
+
+
+
+
+
+
+
+
+ obj\
+ $(BaseIntermediateOutputPath)\
+
+
+
+ $(BaseIntermediateOutputPath)$(Configuration)\
+ $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\
+ $(IntermediateOutputPath)\
+
+
+
+
+
+
+ $(MSBuildProjectDirectory)
+ $(WebPublishPipelineProjectDirectory)
+
+ $(MSBuildProjectName)
+ False
+ <_MSDeployVersionsToTry Condition="'$(_MSDeployVersionsToTry)'==''">7.1;7.5;8.0
+ $(MSBuildProjectFullPath)
+ <_WPPDefaultIntermediateOutputPathPathRoot Condition="'$(WebPublishPipelineProjectDirectory)' != '$(MSBuildProjectDirectory)'">$(MSBuildProjectDirectory)\
+
+
+ <_WPPDefaultIntermediateOutputPath>$(IntermediateOutputPath)
+ <_WPPDefaultIntermediateOutputPath Condition="'$([System.IO.Path]::IsPathRooted($(IntermediateOutputPath)))' == 'False'">$(_WPPDefaultIntermediateOutputPathPathRoot)$(IntermediateOutputPath)
+ <_WPPDefaultIntermediateOutputFullPath>$([System.IO.Path]::GetFullPath($(_WPPDefaultIntermediateOutputPath)))
+
+
+
+
+
+
+
+
+
+ $(WebPublishPipelineProjectDirectory)\$(WebPublishPipelineProjectName).wpp.targets
+
+
+
+
+
+
+
+
+
+ $(CleanDependsOn);
+ CleanWebsitesPackage;
+ CleanWebsitesPackageTempDir;
+ CleanWebsitesTransformParametersFiles;
+
+
+
+
+
+
+
+
+ OnlyFilesToRunTheApp
+
+
+
+
+
+ AllFilesInProjectFolder
+ $(WebPublishPipelineProjectDirectory)
+ $(AlternativeProjectDirectory)
+
+
+
+ True
+ False
+ False
+ $(ExcludeApp_Data)
+ False
+
+
+ True
+
+ False
+
+ False
+
+ False
+
+ True
+
+ True
+ True
+ True
+ False
+
+ False
+
+ True
+ False
+ CSAutoParameterize
+ $(_WPPDefaultIntermediateOutputPath)$(AutoParameterizationWebConfigConnectionStringsIntermediateOutput)
+
+
+
+
+
+
+
+
+ Database
+ $(_WPPDefaultIntermediateOutputPath)$(DatabaseDeployIntermediateRelativePath)
+ <_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile>$(AutoParameterizationWebConfigConnectionStringsLocation).parameters.xml
+
+ Microsoft.Web.Publishing.$(FilesToIncludeForPublish).targets
+ Package
+ PipelineDeployPhase
+ 2
+ False
+ $(DeployOnBuildDefault)
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+
+ True
+ False
+
+
+ <_DeployOnBuild>$(DeployOnBuild)
+ <_DeployOnBuild Condition="'$(BuildingInsideVisualStudio)' == 'true'">False
+
+
+
+
+ $(PrepareForRunDependsOn);
+ $(DeployTarget);
+
+
+
+
+
+
+ False
+ True
+ False
+
+
+ $(PipelineDependsOn);
+ Build;
+
+
+
+
+
+ $(PipelineDependsOn);
+ BeforeBuild;
+ BuildOnlySettings;
+ ResolveReferences;
+ PrepareResourceNames;
+ ComputeIntermediateSatelliteAssemblies;
+ GetCopyToOutputDirectoryItems;
+ _SGenCheckForOutputs;
+ AfterBuild;
+
+
+
+
+
+
+
+
+ Web.config
+
+
+
+ <_VSProjectConfigFileName Include="$(ProjectConfigFileName)" />
+
+
+ @(_VSProjectConfigFileName->'%(FileName).$(Configuration)%(Extension)')
+ true
+ False
+ False
+ TransformWebConfig
+ $(_WPPDefaultIntermediateOutputPath)$(TransformWebConfigIntermediateOutput)
+ <_WebConfigTransformOutputParametersFile>$(TransformWebConfigIntermediateLocation).parameters.xml
+ True
+
+
+
+
+
+
+
+
+ True
+ False
+ $(WebProjectOutputDirInsideProjectDefault)
+ True
+ False
+
+
+
+
+
+
+
+ $(OutDir)_PublishedWebsites\$(WebPublishPipelineProjectName)_Package
+ $(_WPPDefaultIntermediateOutputPath)Package
+ $(WebPublishPipelineProjectName).zip
+ Default Web Site
+ _deploy
+ $(WebPublishPipelineProjectName)
+ $(DefaultMSDeployDestinationSite)/$(DefaultMSDeployDestinationApplicationName)$(DefaultMsDeployAltSuffix)
+ $(DefaultMSDeployDestinationApplicationName)$(DefaultMsDeployAltSuffix)
+
+
+
+
+
+
+ True
+
+ $(DesktopBuildPackageLocation)
+ $(PackageLocation)
+ $(DefaultPackageOutputDir)\$(DefaultPackageFileName)
+ $(PackageLocation)
+ $(DefaultPackageOutputDir)
+ $(_WPPDefaultIntermediateOutputPath)Package
+
+ true
+ True
+ True
+ False
+ $(TargetFrameworkVersion)
+
+
+
+
+
+
+ True
+
+ $(DefaultPackageOutputDir)\Log
+ False
+
+ Info
+ <_CreatePackage Condition="'$(_CreatePackage)'==''" >True
+ <_UseDefaultLinkExtensionValue>False
+ <_UseDefaultLinkExtensionValue Condition="'$(PackageEnableLinks)'=='' and '$(PackageDisableLinks)'==''">True
+
+ AppPoolExtension;ContentExtension;CertificateExtension
+ AppPoolExtension
+ ContentExtension;CertificateExtension
+ $(MSBuildProjectDirectory)\Parameters.xml
+ $(WebPublishPipelineProjectDirectory)\Parameters.xml
+ False
+ $(WebPublishPipelineProjectName)
+ $(DeployParameterPrefix)IIS Web Application Name
+ $(DeployParameterPrefix)IIS Web Application Pool Name
+ $(DeployParameterPrefix)Add write permission to App_Data Folder
+ $(DeployParameterPrefix)Web Application Physical Path
+
+
+ True
+
+
+
+
+
+
+ SqlConnectionString
+ SqlCommandVariable
+
+
+
+
+
+ :Connect;:!!;:Exit;:Help;:r;:Quit;
+ True
+
+ False
+ <_PackageTempDir>$(PackageTempRootDir)\PackageTmp
+ <_PackageTempDirFullPath>$([System.IO.Path]::GetFullPath($(_PackageTempDir))
+
+
+
+
+ True
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(WebPublishPipelineProjectDirectory)$(DefaultMsDeployAltSuffix)
+
+ <_DestinationIisAppPhysicalPath>$(DeployIisAppPhysicalPath)
+ <_DestinationIisAppPhysicalPath Condition="'$(_DestinationIisAppPhysicalPath)'==''">$(DefaultDeployIisAppPhysicalPath)
+
+
+
+ $(PackageEnableLinks)
+ $(PackageDisableLinks)
+
+ False
+
+
+
+
+
+
+
+
+
+
+ -100
+ -80
+ -70
+ -60
+ -50
+ -40
+ 60
+ 100
+
+
+
+
+
+
+
+ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3@InstallPath)
+ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2@InstallPath)
+ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1@InstallPath)
+
+
+
+
+
+
+
+ <_MSDeployPackageFile Include="$(PackageFileName)" />
+ <_MSDeployArchiveDir Include="$(PackageArchiveRootDir)\Archive" />
+ <_MSDeployPackageLocation Condition="$(PackageAsSingleFile)" Include="$(PackageFileName)" />
+ <_MSDeployPackageLocation Condition="!$(PackageAsSingleFile)" Include="@(_MSDeployArchiveDir)" />
+
+
+
+ @(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).deploy.cmd')
+
+ @(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).SourceManifest.xml')
+ False
+ @(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).Package.Parameters.xml')
+ @(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).Publish.Parameters.xml')
+ @(_MSDeployPackageLocation->'%(FileName).deploy.cmd')
+ @(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).deploy.cmd')
+ @(_MSDeployPackageLocation->'%(FileName).deploy-readme.txt')
+ @(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).deploy-readme.txt')
+ @(_MSDeployPackageLocation->'%(RootDir)%(Directory)%(FileName).SetParameters.xml')
+ $(GenerateSampleParametersValueLocationDefault)
+ @(_MSDeployPackageLocation->'%(FileName).SetParameters.xml')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unknown
+
+
+ Unknown
+
+
+
+
+
+
+
+
+
+
+ False
+ Unknown
+ Run
+ Default
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ExcludeApp_Data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ExcludeGeneratedDebugSymbol
+
+
+
+
+
+
+
+
+
+ ExcludeApp_Data;
+ ExcludeGeneratedDebugSymbol;
+
+
+
+
+
+ $(OnBeforeExcludeFilesFromPackage);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeImportParametersFiles);
+
+
+
+
+
+
+
+
+
+
+ %(_ImportedMSDeployDeclareParameters.DefaultValue)
+ $(UserParametersFileParametersPriority)
+
+
+
+
+
+
+
+
+
+
+
+
+ GetProjectWebProperties;
+
+
+
+
+
+
+ $(OnBeforeValidateGlobalPackageSetting);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_CheckPackageLocation Condition="$(PackageAsSingleFile)">$(PackageFileName)
+ <_CheckPackageLocation Condition="!$(PackageAsSingleFile)">$(PackageArchiveRootDir)
+ <_CheckPackageLocationArchiveDir Condition="!$(PackageAsSingleFile)">$(PackageArchiveRootDir)\Archive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ WPPCopyWebApplicaitonPipelineCircularDependencyError;
+ ProcessItemToExcludeFromDeployment;
+ GetProjectWebProperties;
+ ValidateGlobalPackageSetting;
+ $(PipelineDependsOn);
+
+
+
+ ExcludeFilesFromPackage;
+ ImportParametersFiles;
+
+
+
+ $(OnBeforePipelineCollectFilesPhase);
+ $(PublishPipelineCollectFilesCore);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeTransformWebConfig)
+ PreTransformWebConfig;
+ TransformWebConfigCore;
+ ParameterizeTransformWebConfigCore;
+ PostTransformWebConfig;
+
+
+
+
+
+
+
+
+
+
+
+ PipelineCollectFilesPhase;
+
+
+
+
+
+
+
+ %(RelativeDir)$(ProjectConfigTransformFileName)
+ $(TransformWebConfigIntermediateLocation)\original\%(DestinationRelativePath)
+ $(TransformWebConfigIntermediateLocation)\transformed\%(DestinationRelativePath)
+ $([System.IO.Path]::GetFullPath($(_PackageTempDir)\%(DestinationRelativePath)))
+
+ <_WebConfigsToTransformOuputs Include="@(WebConfigsToTransform->'%(TransformOutputFile)')" />
+
+
+
+ <_WebConfigsToTransformOuputsDirectories>@(_WebConfigsToTransformOuputs->'%(RootDir)%(Directory)')
+
+
+
+ <_WebConfigsToTransformOuputsDirectories Include="$(_WebConfigsToTransformOuputsDirectories)" />
+
+
+
+
+ <_MessageArguments>@(WebConfigsToTransform->'%(DestinationRelativePath)', ', ')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CollectWebConfigsToTransform;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+
+ <_TempNoTrnasformWebConfigToTransform Include="@(WebConfigsToTransform)"
+ Condition="!Exists(%(TransformFile))" />
+
+
+
+
+
+
+ <_WebConfigTransformOutput>@(WebConfigsToTransform->'%(TransformOutputFile)')
+ <_WebConfigTransformOutput Condition="$(UseParameterizeToTransformWebConfig)">$(_WebConfigTransformOutput);$(_WebConfigTransformOutputParametersFile)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreTransformWebConfig;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreTransformWebConfig;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TransformWebConfigCore;
+ ParameterizeTransformWebConfigCore;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(_ImportParameterizeTransformWebConfig.DefaultValue)
+ $(UserWebConfigParametersPriority)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PipelineTransformPhase;
+
+
+
+
+
+ <_WebConfigsToAutoParmeterizeCS Include="@(FilesForPackagingFromProject)"
+ Condition="'%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)' And !%(FilesForPackagingFromProject.Exclude)">
+ $(AutoParameterizationWebConfigConnectionStringsLocation)\original\%(DestinationRelativePath)
+ $(AutoParameterizationWebConfigConnectionStringsLocation)\transformed\%(DestinationRelativePath)
+ $([System.IO.Path]::GetFullPath($(_PackageTempDir)\%(DestinationRelativePath)))
+
+ <_WebConfigsToAutoParmeterizeCSOuputFiles Include="@(_WebConfigsToAutoParmeterizeCS->'%(TransformOutputFile)')">
+
+
+
+
+ <_WebConfigsToAutoParmeterizeCSOuputDirectories>@(_WebConfigsToAutoParmeterizeCSOuputFiles->'%(RootDir)%(Directory)')
+ <_WebConfigsToAutoParmeterizeCSOuput>@(_WebConfigsToAutoParmeterizeCS->'%(TransformOutputFile)');$(_WebConfigsToAutoParmeterizeCsTransformOutputParametersFile)
+
+
+
+ <_WebConfigsToAutoParmeterizeCSOuputDirectories Include="$(_WebConfigsToAutoParmeterizeCSOuputDirectories)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(DeployParameterPrefix)%24(name)-$(ProjectConfigFileName) Connection String
+ %24(name) $(_PublishLocalizedString_WebConfigConnectionStringParameterDescription)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_AutoParameterizeCSTransform>$(_AutoParameterizeCSTransformWithDefaultValue)
+ <_AutoParameterizeCSTransform Condition="$(AutoParameterizationWebConfigCSNoDefaultValue)">$(_AutoParameterizeCSTransformNoDefaultValue)
+ <_AutoParameterizeCSUseXPath Condition="'$(_AutoParameterizeCSUseXPath)'==''">True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %(_ImportAutoParameterizeCSTransformWebConfig.DefaultValue)
+ $(VsWebConfigAutoCsParametersPriority)
+
+
+
+
+
+
+
+
+
+
+
+
+ PipelineTransformPhase;
+
+
+
+
+
+ $(OnBeforeAutoParameterizationWebConfigConnectionStrings);
+ PreAutoParameterizationWebConfigConnectionStrings;
+ AutoParameterizationWebConfigConnectionStringsCore;
+ PostAutoParameterizationWebConfigConnectionStrings;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+ PipeLineCollectFilesPhase;
+
+
+
+
+
+ $(OnBeforePipelineTransformPhase);
+ TransformWebConfig;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBefore_WPPCopyWebApplication);
+ CleanWebProjectOutputDir;
+ PipelineTransformPhase;
+
+
+
+
+
+ <_WPPCopyWebApplicationDependsOn Condition="'$(_WPPCopyWebApplicationDependsOn)' == ''">
+ $(OnBefore_WPPCopyWebApplication);
+
+
+
+
+
+ <_AllExtraFilesUnderProjectOuputFolder Include="$(WebProjectOutputDir)\**" />
+ <_AllExtraFilesUnderProjectOuputFolder
+ Remove="@(FilesForPackagingFromProject->'$(WebProjectOutputDir)\%(DestinationRelativePath)')" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforePipelinePreDeployCopyAllFilesToOneFolder);
+ PipelineTransformPhase;
+ AutoParameterizationWebConfigConnectionStrings;
+ CopyAllFilesToSingleFolderForPackage;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Inetstp@MajorVersion)
+ 0
+
+
+
+
+
+
+
+
+
+
+ <_DeploymentUseIis Condition="'$(_DeploymentUseIis)'=='' And $(IncludeIisSettings)">$(UseIis)
+ <_DeploymentUseIis Condition="'$(_DeploymentUseIis)'==''">False
+ <_DeploymentAsIisApp>$(DeployAsIisApp)
+ <_DeploymentAsIisApp Condition="$(_DeploymentUseIis)">False
+ $(UseIis)
+ False
+ <_DeploymentUseIISExpressHint>$(UseIISExpress)
+ <_DeploymentUseIISExpressHint Condition="'$(_DeploymentUseIISExpressHint)'==''">False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Destination_IisServer_IisAppPoolName Condition="'@(_IISApplicationPoolFound)'!=''">%(_IISApplicationPoolFound.DestinationIISApplicationPool)
+ <_Destination_IisServer_IisAppPoolName Condition="'$(_Destination_IisServer_IisAppPoolName)'==''">$(IisServer_IisAppPoolName)
+
+
+
+ <_IsRootWebsite>False
+ <_IsRootWebsite Condition="('$(IisUrl_SiteRelativePath)' == '/')">True
+ $(DefaultDeployIisRootAppPath)
+ $(IisServer_IisMajorVersion)
+ $(LocalIisVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PipelinePreDeployCopyAllFilesToOneFolder;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_PackageFileLocation Include="$(PackageFileName)" />
+
+
+
+ <_PackageRoot Condition="$(PackageAsSingleFile)">@(_PackageFileLocation->'%(RootDir)%(Directory)')
+ <_PackageRoot Condition="!$(PackageAsSingleFile)">$(PackageArchiveRootDir)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforeCopyAllFilesToSingleFolderForPackage);
+ CleanWebsitesPackageTempDir;
+
+
+
+
+
+
+ $(OnBeforeCopyAllFilesToSingleFolderForPackage);
+
+
+
+
+
+ <_AllExtraFilesUnderTempFolder Include="$(_PackageTempDir)\**" />
+ <_AllExtraFilesUnderTempFolder
+ Remove="@(FilesForPackagingFromProject->'$(_PackageTempDir)\%(DestinationRelativePath)')" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddIis7ToSourceManifest);
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+
+
+
+
+
+
+
+
+
+ $(_MSDeployIisUrlSource_AppHostConfigPath)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddDeclareParametersItemsForIis7);
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+
+
+
+
+
+
+
+
+
+ ProviderPath
+ AppHostConfig
+ ^$(_EscapeRegEx_MSDeployIisUrlSource_AppHostConfigPath)$
+ $(DeployParameterIISAppNameDescription)
+ $(_MSDeployIisAppPathIIS7)
+ $(_MSDeployIisAppPathIIS7)
+ IisApp
+ $(VsIisAppParametersPriority)
+
+
+
+ DeploymentObjectAttribute
+ application
+ application[@applicationPool='$(IisServer_IisAppPoolName)']/@applicationPool
+ $(DeployParameterIISAppPoolNameDescription)
+ $(_Destination_IisServer_IisAppPoolName)
+ $(_Destination_IisServer_IisAppPoolName)
+
+ $(VsIisAppParametersPriority)
+ $(VsIisAppParametersPriority)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddIis6ToSourceManifest);
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+
+
+
+
+
+
+
+
+
+
+ $(_MSDeployIisUrlSource_MetakeyPath)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddDeclareParametersItemsForIis6);
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ProviderPath
+ MetaKey
+ ^$(_EscapeRegEx_MSDeployIisUrlSource_MetakeyPathSearchPath)$
+ $(DeployParameterIISAppNameDescription)
+ $(_MSDeployIisAppPathIIS6)
+ $(_MSDeployIisAppPathIIS6)
+ IisApp
+ $(VsIisAppParametersPriority)
+
+
+
+ DeploymentObjectAttribute
+ metaProperty
+ metaProperty[@name='AppPoolId' and @value='$(IisServer_IisAppPoolName)']/@value
+ $(DeployParameterIISAppPoolNameDescription)
+ $(_Destination_IisServer_IisAppPoolName)
+ $(_Destination_IisServer_IisAppPoolName)
+
+ $(VsIisAppParametersPriority)
+ $(VsIisAppParametersPriority)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddIisSettingAndFileContentsToSourceManifest);
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+ AddContentPathToSourceManifest;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddContentPathToSourceManifest);
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+ AddIis7ToSourceManifest;
+ AddIis6ToSourceManifest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_DeployManagedRuntimeVersion Condition="'$(DeployManagedRuntimeVersionNumeric)' != '' And ($(DeployManagedRuntimeVersionNumeric) >= '4.0') ">$(DeployManagedRuntimeVersion)
+
+ <_DeployManagedRuntimeVersion Condition="'$(DeployManagedRuntimeVersionNumeric)' == '' And '$(DeployManagedRuntimeVersion)'!=''">$(DeployManagedRuntimeVersion)
+
+
+
+
+
+
+ $(_MSDeployDirPath_FullPath)
+ $(_DeployManagedRuntimeVersion)
+ $(DeployEnable32bitAppOnWin64)
+ $(DeployManagedPipelineMode)
+ managedRuntimeVersion;enable32bitAppOnWin64;managedPipelineMode
+
+
+
+ $(_MSDeployDirPath_FullPath)
+
+
+
+
+ $(_MSDeployDirPath_FullPath)
+ Directory
+ setAclResourceType
+
+
+
+
+
+ $(_MSDeployDirPath_FullPath)
+ anonymousAuthenticationUser
+ Directory
+ setAclUser;setAclResourceType
+
+
+
+
+
+ $(_MSDeployDirPath_FullPath)\App_Data
+ Write
+ Directory
+ setAclResourceType;setAclAccess
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddIisAndContentDeclareParametersItems);
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+ AddDeclareParametersItemsForContentPath;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddDeclareParametersItemsForContentPath);
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+ AddDeclareParametersItemsForIis7;
+ AddDeclareParametersItemsForIis6;
+
+
+
+
+
+
+
+ <_DestinationContentPath>$(_DestinationIisAppPhysicalPath)
+
+ <_DestinationContentPath Condition="($(DestinationUseIis) or $(_DeploymentAsIisApp)) And ($(DestinationIisVersion) < '7') And ('$(_MSDeployIisAppPathIIS6)'!= '') " >$(_MSDeployIisAppPathIIS6)
+
+ <_DestinationContentPath Condition="($(DestinationUseIis) or $(_DeploymentAsIisApp)) And ($(DestinationIisVersion) >= '7') And ('$(_MSDeployIisAppPathIIS7)' !='')">$(_MSDeployIisAppPathIIS7)
+
+ <_MsDeployParameterNameForContentPath>$(DeployParameterIISAppName)
+ <_MsDeployParameterNameForContentPath Condition="$(_DeploymentUseIis) And (!$(DestinationUseIis))">$(DeployParameterIISAppPhysicalPath)
+ <_MsDeployParameterTagForContentPath>PhysicalPath
+ <_MsDeployParameterTagForContentPath Condition="$(_DeploymentAsIisApp)">IisApp
+ <_MsDeployParameterDefaultValueForContentPath>$(_DestinationContentPath)
+ <_MsDeployParameterExcludeSetParameterForContentPath>False
+ <_MsDeployParameterPhysicalFolderForSetAcl>{$(_MsDeployParameterNameForContentPath)}
+ <_MsDeployParameterPhysicalFolderAppDataForSetAcl>{$(_MsDeployParameterNameForContentPath)}/App_Data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ProviderPath
+ IisApp
+ ^$(_EscapeRegEx_MSDeployDirPath)$
+ $(DeployParameterIISAppNameDescription)
+ $(_MsDeployParameterDefaultValueForContentPath)
+ $(_DestinationContentPath)
+ $(_MsDeployParameterTagForContentPath)
+ $(VsIisAppParametersPriority)
+ $(_MsDeployParameterExcludeSetParameterForContentPath)
+
+
+
+ ProviderPath
+ contentPath
+ ^$(_EscapeRegEx_MSDeployDirPath)$
+ $(DeployParameterIISAppPhysicalPathDescription)
+ $(_MsDeployParameterDefaultValueForContentPath)
+ $(_DestinationContentPath)
+ $(_MsDeployParameterTagForContentPath)
+ $(VsContentPathParametersPriority)
+ $(_MsDeployParameterExcludeSetParameterForContentPath)
+
+
+
+
+
+
+
+ ProviderPath
+ setAcl
+ ^$(_EscapeRegEx_MSDeployDirPath)$
+ $(DeployParameterIISAppPhysicalPathDescription)
+ $(_MsDeployParameterDefaultValueForContentPath)
+ $(_DestinationContentPath)
+
+ $(_MsDeployParameterExcludeSetParameterForContentPath)
+ $(VsSetAclPriority)
+
+
+
+ ProviderPath
+ setAcl
+ ^$(_EscapeRegEx_MSDeployDirPath)\\App_Data$
+ Add write permission to App_Data folder
+ {$(_MsDeployParameterNameForContentPath)}/App_Data
+ $(_DestinationContentPath)/App_Data
+ Hidden
+ $(VsSetAclPriority)
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddDatabasesToSourceManifest);
+ CollectDatabasesToPublish;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddDeclareParametersItemsForDatabaseScript);
+ CollectDatabasesToPublish;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_VsPublish_DatabaseToPackage_DeclareParameters Include="@(_DatabasesToPackage->'$(DeployParameterPrefix)%(DestinationGroup) Connection String')">
+ ProviderPath
+ %(_DatabasesToPackage.SourceProvider)
+ ^%(_DatabasesToPackage.SourcePath_RegExExcaped)$
+ $(DeployParameterIISAppConnectionStringDescription)
+ %(_DatabasesToPackage.DestinationPath)
+ %(_DatabasesToPackage.DestinationPath)
+ $(MsDeployDatabaseTag)
+
+
+ <_VsPublish_DatabaseToPackage_DeclareParameters Include="@(_DatabasesToPackage_SqlVariables->'$(DeployParameterPrefix)Sql script variable %24(%(Identity)) in %(DestinationGroup) scripts')"
+ Condition="$(EnableSqlScriptVariableParameterize)">
+ $(MsDeploySqlCommandVariableKind)
+ ^%(_DatabasesToPackage_SqlVariables.SourcePath_RegExExcaped)$
+ %(_DatabasesToPackage_SqlVariables.Identity)
+ $(DeployParameterSqlScriptVariablesDescription)
+ %(_DatabasesToPackage_SqlVariables.Value)
+ %(_DatabasesToPackage_SqlVariables.Value)
+ sql
+
+
+
+ <_VsPublish_DatabaseToPackage_DeclareParameters Include="@(_DatabasesToPackage_SqlVariables->'$(DeployParameterPrefix)Sql script variable %24(%(Identity)) in %(DestinationGroup) scripts')"
+ Condition="$(EnableSqlScriptVariableParameterize) and ('%(_DatabasesToPackage_SqlVariables.Value)' == '') and ('%(_DatabasesToPackage_SqlVariables.IsDeclared)' == 'true')">
+ parameterValidation
+ AllowEmpty
+
+
+
+ $(VsSQLDatabaseScriptParametersPriority)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeWriteItemsToSourceManifest);
+ AddIisSettingAndFileContentsToSourceManifest;
+ AddDatabasesToSourceManifest;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BeforeAddDeclareParametersItems);
+ AddIisAndContentDeclareParametersItems;
+ AddDeclareParametersItemsForDatabaseScript;
+
+
+
+
+ <_PublishDefaultVDirectoryPath>$(RemoteSitePhysicalPath)
+ <_PublishDefaultVDirectoryPath Condition="'$(_PublishDefaultVDirectoryPath)'==''">$(_DestinationIisAppPhysicalPath)
+
+
+
+
+
+
+
+ <_MSBuildReplaceRuleItemMSBuildProjectDirectory Include="$(WebPublishPipelineProjectDirectory)" />
+
+
+
+
+
+
+
+
+ DestinationVirtualDirectory
+ .*
+ ^$(_EscapeRegExMSBuildProjectDirectory)$
+ $(DeployParameterIISAppPhysicalPathDescription)
+ $(_DestinationIisAppPhysicalPath)
+
+ $(_PublishDefaultVDirectoryPath)
+ PhysicalPath
+ $(VsDestinationVDirParametersPriority)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_MSDeployDirPath Include="$(_PackageTempDir)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_MSDeployDirPath_FullPath>@(_MSDeployDirPath->'%(FullPath)')
+ <_MSDeployIisAppPathIIS7>$(DeployIisAppPath)
+ <_MSDeployIisAppPathIIS6>$(DeployIisAppPath)
+ <_MSDeployIisAppPathIIS7 Condition="'$(_MSDeployIisAppPathIIS7)'==''">$(DefaultDeployIisAppPath)
+ <_MSDeployIisAppPathIIS6 Condition="'$(_MSDeployIisAppPathIIS6)'==''">$(DefaultDeployIisAppPath)
+
+
+
+ <_MSDeploySourceManifest Include="$(PackageSourceManifest)" />
+ <_MSDeployParametersFile Include="$(PackageParametersFile)" />
+ <_MSDeploySampleParametersValue Condition="$(GenerateSampleDeployScript)" Include="$(GenerateSampleParametersValueLocation)" />
+ <_MSDeployGenerateSampleDeployScriptReadMeLocation Condition="$(GenerateSampleDeployScript)" Include="$(GenerateSampleDeployScriptReadMeLocation)" />
+
+
+
+
+
+
+
+
+ GenerateMsDeployManifestSettings;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GenerateMsDeployManifestSettings;
+ CleanWebsitesPackageCore;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GenerateMsDeployManifestSettings;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AddDeclareParametersItems;
+ CheckAndCleanMSDeployPackageIfNeeded;
+
+
+ PipelinePreDeployCopyAllFilesToOneFolder;
+ GenerateMsDeployManifestSettings;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dirPath
+ $(_Escaped_PackageTempDir)\\App_Data$
+
+
+
+
+
+
+
+
+
+
+
+
+ GenerateSampleDeployScript;
+
+
+ $(OnBeforePackageUsingManifest);
+ GenerateMsDeployManifestSettings;
+ GenerateMsdeployManifestFiles;
+ GenerateSkipRuleForAppData;
+
+
+
+
+
+
+
+ manifest
+ @(_MSDeploySourceManifest->'%(FullPath)')
+
+ archiveDir
+ @(_MSDeployArchiveDir->'%(FullPath)')
+ package
+ @(_MSDeployPackageFile->'%(FullPath)')
+ True
+
+
+
+
+
+
+
+
+
+ $(PackageSourceRoot)
+ $(DeployEncryptKey)
+ $(IisServer_WebServerAppHostConfigDirectory)
+ $(IisServer_WebServerManifest)
+ $(IisServer_WebServerDirectory)
+
+
+
+ $(PackageDestinationRoot)
+ $(DeployEncryptKey)
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_VsPackageParametersFile>
+ <_VsPackageParametersFile Condition="$(UseDeclareParametersXMLInMsDeploy)">$(PackageParametersFile)
+
+
+
+ <_Package_MsDeployDeclareParameters Include="@(MsDeployDeclareParameters)" Condition="!$(UseDeclareParametersXMLInMsDeploy)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GenerateMsDeployManifestSettings;
+ GenerateMsdeployManifestFiles;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ manifest
+ @(_MSDeploySourceManifest->'%(FileName)%(Extension)')
+ %25RootPath%25$(GenerateSampleDeployScriptSourceFileName)
+ package
+ @(_MSDeployPackageFile->'%(FileName)%(Extension)')
+ archiveDir
+ @(_MSDeployArchiveDir->'%(FileName)%(Extension)')
+ %25RootPath%25$(GenerateSampleDeployScriptSourceFileName)
+ %25_Destination%25
+
+ @(_MSDeploySampleParametersValue->'%25RootPath%25%(FileName)%(Extension)')
+ <_ScriptGenerateSampleDeployScriptReadMeLocation>%25RootPath%25$(GenerateSampleDeployScriptReadMeFileName)
+ <_MSdeployFwdLink>http://go.microsoft.com/?linkid=9278654
+ <_SampleDeployCmdFwdLink>http://go.microsoft.com/fwlink/?LinkID=183544
+
+
+
+ <_MsDeployDeclareParametersNotExclude Include="@(MsDeployDeclareParameters)" Condition="'%(ExcludeFromSetParameter)' != true" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(GenerateSampleDeployScriptSourceRoot)
+ $(DeployEncryptKey)
+
+
+
+ $(GenerateSampleDeployScriptDestinationRoot)
+ $(DeployEncryptKey)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GenerateMsDeployManifestSettings;
+ GenerateMsdeployManifestFiles;
+ Package;
+
+
+
+
+
+
+
+
+
+
+
+ manifest
+ @(_MSDeploySourceManifest->'%(FullPath)')
+ package
+ @(_MSDeployPackageFile->'%(FullPath)')
+ archiveDir
+ @(_MSDeployArchiveDir->'%(FullPath)')
+
+ auto
+
+
+
+
+
+
+
+ $(TestDeployPackageToLocalSourceRoot)
+ $(DeployEncryptKey)
+
+
+
+ $(TestDeployPackageToLocalDestinationRoot)
+ $(DeployEncryptKey)
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ Basic
+
+ WMSVC
+
+ GetProjectWebProperties;
+
+
+
+
+
+ <_UseWMSVC>false
+ <_UseWMSVC Condition="'$(MSDeployPublishMethod)'=='WMSVC'">true
+ <_UseRemoteAgent>false
+ <_UseRemoteAgent Condition="'$(MSDeployPublishMethod)'=='RemoteAgent'">true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LinkExtensioninfo.xml
+ HttpCertConfigExtension;CertificateExtension;FrameworkConfigExtension
+ ContentExtension
+
+
+
+
+
+
+
+
+ false
+
+ GenerateGlobalPublishSetting;
+ ValidateGlobalPackageSetting;
+ GenerateMsDeployManifestSettings;
+ GenerateMsdeployManifestFiles;
+ GenerateSkipRuleForAppData;
+ Package;
+
+
+
+
+
+
+
+
+
+
+
+
+ manifest
+ @(_MSDeploySourceManifest->'%(FullPath)')
+ package
+ @(_MSDeployPackageFile->'%(FullPath)')
+ archiveDir
+ @(_MSDeployArchiveDir->'%(FullPath)')
+
+ auto
+
+
+ DoNotDeleteRule
+
+
+
+ <_MSDeploySourceWebServerAppHostConfigDirectory>$(IisServer_WebServerAppHostConfigDirectory)
+ <_MSDeploySourceWebServerManifest>$(IisServer_WebServerManifest)
+ <_MSDeploySourceWebServerDirectory>$(IisServer_WebServerDirectory)
+
+
+
+
+
+
+
+
+
+
+
+ <_PublishMsDeployServiceUrl>$(MsDeployServiceUrl)
+ <_PublishMsDeployServiceUrl Condition="('$(MSDeployPublishMethod)'=='INPROC')">
+
+
+
+
+
+ $(MSDeployPublishSourceRoot)
+ $(DeployEncryptKey)
+ $(_MSDeploySourceWebServerAppHostConfigDirectory)
+ $(_MSDeploySourceWebServerManifest)
+ $(_MSDeploySourceWebServerDirectory)
+
+
+
+ $(MSDeployPublishDestinationRoot)
+ $(_PublishMsDeployServiceUrl)
+ $(UserName)
+ $(Password)
+ $(DeployEncryptKey)
+ False
+ $(AuthType)
+ $(_MSDeployDestinationWebServerAppHostConfigDirectory)
+ $(_MSDeployDestinationWebServerManifest)
+ $(_MSDeployDestinationWebServerDirectory)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_VsPublishParametersFile>
+ <_VsPublishParametersFile Condition="$(UseDeclareParametersXMLInMsDeploy) and '$(_VsPublishParametersFile)'==''">$(PublishParametersFile)
+
+
+
+
+
+ <_VsPublish_MsDeployDeclareParameters Include="@(MsDeployDeclareParameters)" Condition="!$(UseDeclareParametersXMLInMsDeploy) And !$(CreatePackageOnPublish)" />
+
+
+
+
+
+
+
+
+
+
+ MSDeploy
+
+ MSDeployPublish;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(OnBeforePipelineDeployPhase);
+ $(DeployDefaultTarget);
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TransformHelper.sln b/TransformHelper.sln
index 0559cee..342417a 100644
--- a/TransformHelper.sln
+++ b/TransformHelper.sln
@@ -5,6 +5,17 @@ VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransformHelper", "TransformHelper\TransformHelper.csproj", "{719A34E7-81D0-474D-BB33-33D784127611}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reference Assemblies", "Reference Assemblies", "{850569B3-85E0-4190-B735-C67C1BCA8585}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Web.Publishing.Tasks", "Microsoft.Web.Publishing.Tasks", "{0E89CA29-F473-4B55-A727-328C85A963E8}"
+ ProjectSection(SolutionItems) = preProject
+ Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.AllFilesInProjectFolder.targets = Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.AllFilesInProjectFolder.targets
+ Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.AllFilesInTheProject.targets = Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.AllFilesInTheProject.targets
+ Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets = Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.OnlyFilesToRunTheApp.targets
+ Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.targets = Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.targets
+ Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.Tasks.Dll = Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.Tasks.Dll
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -19,4 +30,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {0E89CA29-F473-4B55-A727-328C85A963E8} = {850569B3-85E0-4190-B735-C67C1BCA8585}
+ EndGlobalSection
EndGlobal
diff --git a/TransformHelper/ArgumentsParser.cs b/TransformHelper/Arguments/ArgumentsParser.cs
similarity index 97%
rename from TransformHelper/ArgumentsParser.cs
rename to TransformHelper/Arguments/ArgumentsParser.cs
index 87a42a9..740e75f 100644
--- a/TransformHelper/ArgumentsParser.cs
+++ b/TransformHelper/Arguments/ArgumentsParser.cs
@@ -2,7 +2,7 @@
using System;
using System.Runtime.InteropServices;
-namespace TransformHelper
+namespace TransformHelper.Arguments
{
public class ArgumentsParser
{
diff --git a/TransformHelper/Arguments/CommandLineArguments.cs b/TransformHelper/Arguments/CommandLineArguments.cs
new file mode 100644
index 0000000..4a2c360
--- /dev/null
+++ b/TransformHelper/Arguments/CommandLineArguments.cs
@@ -0,0 +1,71 @@
+using Ookii.CommandLine;
+using System;
+using System.Text;
+
+namespace TransformHelper.Arguments
+{
+ public class CommandLineArguments
+ {
+ [CommandLineArgument("mode", DefaultValue = Mode.Add, Position = 0), Alias("m")]
+ public Mode Mode { get; set; }
+
+ [CommandLineArgument("solution"), Alias("sln")]
+ public string SolutionPath { get; set; }
+
+ [CommandLineArgument("new"), Alias("n")]
+ public string NewTransformation { get; set; }
+
+ [CommandLineArgument("existing"), Alias("e")]
+ public string ExsistingTransformation { get; set; }
+
+ [CommandLineArgument("source"), Alias("src")]
+ public string SourceFile { get; set; }
+
+ [CommandLineArgument("transformFile"), Alias("tf")]
+ public string TransformationFile { get; set; }
+
+ [CommandLineArgument("target"), Alias("t")]
+ public string TargetFile { get; set; }
+
+ public bool Validate()
+ {
+ StringBuilder errors = new StringBuilder();
+ if (this.Mode == Arguments.Mode.Add)
+ {
+ if (string.IsNullOrWhiteSpace(this.SolutionPath))
+ {
+ errors.AppendLine("The required argument 'solution' for 'Add' mode was not supplied.");
+ }
+ if (string.IsNullOrWhiteSpace(this.NewTransformation))
+ {
+ errors.AppendLine("The required argument 'new' for 'Add' mode was not supplied.");
+ }
+ if (string.IsNullOrWhiteSpace(this.SolutionPath))
+ {
+ errors.AppendLine("The required argument 'existing' for 'Add' mode was not supplied.");
+ }
+ }
+ else
+ {
+ if (string.IsNullOrWhiteSpace(this.SourceFile))
+ {
+ errors.AppendLine("The required argument 'source' for 'Apply' mode was not supplied.");
+ }
+ if (string.IsNullOrWhiteSpace(this.TransformationFile))
+ {
+ errors.AppendLine("The required argument 'transformFile' for 'Apply' mode was not supplied.");
+ }
+ }
+ var errorsList = errors.ToString();
+ if (!string.IsNullOrWhiteSpace(errorsList))
+ {
+ Console.WriteLine(errorsList);
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ }
+}
diff --git a/TransformHelper/Arguments/Mode.cs b/TransformHelper/Arguments/Mode.cs
new file mode 100644
index 0000000..91a3208
--- /dev/null
+++ b/TransformHelper/Arguments/Mode.cs
@@ -0,0 +1,9 @@
+
+namespace TransformHelper.Arguments
+{
+ public enum Mode
+ {
+ Add = 0,
+ Apply = 1
+ }
+}
diff --git a/TransformHelper/CommandLineArguments.cs b/TransformHelper/CommandLineArguments.cs
deleted file mode 100644
index b4f9033..0000000
--- a/TransformHelper/CommandLineArguments.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Ookii.CommandLine;
-
-namespace TransformHelper
-{
- public class CommandLineArguments
- {
- [CommandLineArgument("solution", IsRequired = true, Position = 0)]
- public string SolutionPath { get; set; }
-
- [CommandLineArgument("new", IsRequired = true, Position = 1)]
- public string NewTransformation { get; set; }
-
- [CommandLineArgument("existing", IsRequired = true, Position = 2)]
- public string ExsistingTransformation { get; set; }
- }
-}
diff --git a/TransformHelper/Program.cs b/TransformHelper/Program.cs
index 7650800..250d34a 100644
--- a/TransformHelper/Program.cs
+++ b/TransformHelper/Program.cs
@@ -3,6 +3,8 @@
using System.IO;
using System.Linq;
using System.Text;
+using TransformHelper.Arguments;
+using TransformHelper.Transform;
namespace TransformHelper
{
@@ -13,25 +15,49 @@ static void Main(string[] args)
var parser = new ArgumentsParser();
var parameters = parser.Parse(args);
-
- if (parameters == null)
+ if (parameters == null || !parameters.Validate())
{
Environment.Exit(1);
}
- if (!File.Exists(parameters.SolutionPath))
+ switch (parameters.Mode)
{
- throw new Exception(string.Format("Solution file {0} does not exist!", parameters.SolutionPath));
- }
+ case Mode.Add:
+ if (!File.Exists(parameters.SolutionPath))
+ {
+ throw new Exception(string.Format("Solution file {0} does not exist!", parameters.SolutionPath));
+ }
- var projectsProvider = new ProjectsProvider();
+ var projectsProvider = new ProjectsProvider();
- var projects = projectsProvider.GetProjects(parameters.SolutionPath);
+ var projects = projectsProvider.GetProjects(parameters.SolutionPath);
- foreach (var project in projects)
- {
- var projectUpdater = new ProjectUpdater(project, parameters.ExsistingTransformation, parameters.NewTransformation);
- projectUpdater.Update();
+ foreach (var project in projects)
+ {
+ var projectUpdater = new ProjectUpdater(project, parameters.ExsistingTransformation, parameters.NewTransformation);
+ projectUpdater.Update();
+ }
+ break;
+ case Mode.Apply:
+ if (!File.Exists(parameters.SourceFile))
+ {
+ throw new Exception(string.Format("Source file {0} does not exist!", parameters.SolutionPath));
+ }
+ if (!File.Exists(parameters.TransformationFile))
+ {
+ throw new Exception(string.Format("Transformation file {0} does not exist!", parameters.SolutionPath));
+ }
+
+ var configTransformer = new ConfigTransformer();
+ var transformationResult = configTransformer.ApplyTransformation(parameters.SourceFile, parameters.TransformationFile, parameters.TargetFile);
+ if (!transformationResult.Success)
+ {
+ Console.WriteLine(transformationResult.Errors);
+ Environment.Exit(2);
+ }
+ break;
+ default:
+ break;
}
Environment.Exit(0);
diff --git a/TransformHelper/ProjectUpdater.cs b/TransformHelper/ProjectUpdater.cs
index 4d3a0fa..ff60ddf 100644
--- a/TransformHelper/ProjectUpdater.cs
+++ b/TransformHelper/ProjectUpdater.cs
@@ -27,8 +27,12 @@ public void Update()
Console.WriteLine(string.Format("Processing project {0} located in {1}", projectInfo.ProjectName, projectInfo.ProjectFilePath));
- var transformationItems = document.Descendants("{http://schemas.microsoft.com/developer/msbuild/2003}Content")
- .Where(x => x.Attributes("Include") != null && x.Attributes("Include").FirstOrDefault().Value.EndsWith(string.Format(".{0}.config", existingTransformation)));
+ var itemsWithInclude = document.Descendants()
+ .Where(x =>
+ x.Attributes("Include") != null
+ && x.Attributes("Include").Count() > 0);
+
+ var transformationItems = itemsWithInclude.Where(x => x.Attributes("Include").FirstOrDefault().Value.EndsWith(string.Format(".{0}.config", existingTransformation), StringComparison.InvariantCultureIgnoreCase));
if (transformationItems.Count() == 0)
{
@@ -41,10 +45,9 @@ public void Update()
foreach (XElement transformationItem in transformationItems)
{
string transformationFilePath = transformationItem.Attributes("Include").FirstOrDefault().Value;
- string newTransformationFilePath = transformationFilePath.Replace(string.Format(".{0}.config", existingTransformation), string.Format(".{0}.config", newTransformation));
+ string newTransformationFilePath = transformationFilePath.Replace(string.Format(".{0}.", existingTransformation), string.Format(".{0}.", newTransformation));
- var existingNewTransformation = document.Descendants("{http://schemas.microsoft.com/developer/msbuild/2003}Content")
- .FirstOrDefault(x => x.Attributes("Include") != null && x.Attributes("Include").FirstOrDefault().Value == newTransformationFilePath);
+ var existingNewTransformation = itemsWithInclude.FirstOrDefault(x => x.Attributes("Include").FirstOrDefault().Value == newTransformationFilePath);
if (existingNewTransformation != null)
{
Console.WriteLine(string.Format("Content item for transformation file {0} already exists", newTransformationFilePath));
diff --git a/TransformHelper/StringExtender.cs b/TransformHelper/StringExtender.cs
new file mode 100644
index 0000000..cd5d9ac
--- /dev/null
+++ b/TransformHelper/StringExtender.cs
@@ -0,0 +1,167 @@
+using System;
+using System.Collections.Generic;
+using System.Text.RegularExpressions;
+
+namespace TransformHelper
+{
+ public static class StringExtender
+ {
+ static Regex regexSplitByCapitalLetters = new Regex(@"
+ (?<=[A-Z])(?=[A-Z][a-z]) |
+ (?<=[^A-Z])(?=[A-Z]) |
+ (?<=[A-Za-z])(?=[^A-Za-z])", RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled);
+
+ public static string SplitByCapitalLetters(this string instance)
+ {
+ return regexSplitByCapitalLetters.Replace(instance, " ");
+ }
+
+ ///
+ /// Removes the first symbols if they are the same as the stringToRemove parameter
+ ///
+ /// string Instance
+ /// string pattern to check
+ /// string
+ public static string RemoveStartingString(this string instance, string stringToRemove, bool ignoreCase = true)
+ {
+ if (!string.IsNullOrEmpty(instance))
+ {
+ if (instance.StartsWith(stringToRemove, ignoreCase ? StringComparison.InvariantCultureIgnoreCase : StringComparison.CurrentCulture))
+ {
+ return instance.Remove(0, stringToRemove.Length);
+ }
+ }
+
+ return instance;
+ }
+
+ ///
+ /// Removes the last symbols if they are the same as the stringToRemove parameter
+ ///
+ /// string Instance
+ /// string pattern to check
+ /// string
+ public static string RemoveEndingString(this string instance, string stringToRemove, bool ignoreCase = true)
+ {
+ if (!string.IsNullOrEmpty(instance))
+ {
+ if (instance.EndsWith(stringToRemove, ignoreCase ? StringComparison.InvariantCultureIgnoreCase : StringComparison.CurrentCulture))
+ {
+ return instance.Remove(instance.Length - stringToRemove.Length, stringToRemove.Length);
+ }
+ }
+ return instance;
+ }
+
+ public static string GetAfterLastDot(this string instance)
+ {
+ return instance.GetAfterLastChar('.');
+ }
+
+ public static string GetAfterLastChar(this string instance, char character)
+ {
+ int lastIndex = instance.LastIndexOf(character);
+ if (lastIndex > -1)
+ {
+ return instance.Remove(0, lastIndex + 1);
+ }
+ else
+ {
+ return instance;
+ }
+ }
+
+ public static string GetBeforeLastChar(this string instance, char character)
+ {
+ int lastIndex = instance.LastIndexOf(character);
+ if (lastIndex > -1)
+ {
+ return instance.Remove(lastIndex, instance.Length - lastIndex);
+ }
+ else
+ {
+ return instance;
+ }
+ }
+
+ public static bool EndsWithEnumerable(this string value, StringComparison stringComparison, IEnumerable ends)
+ {
+ foreach (string end in ends)
+ {
+ if (value.EndsWith(end, stringComparison))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static string ReplaceSafe(this string instance, string oldValue, string newValue)
+ {
+ if (string.IsNullOrWhiteSpace(instance))
+ {
+ return instance;
+ }
+ else
+ {
+ return instance.Replace(oldValue, newValue);
+ }
+ }
+
+ public static string FormatWith(this string instance, params object[] args)
+ {
+ if (string.IsNullOrWhiteSpace(instance))
+ {
+ throw new ArgumentNullException();
+ }
+
+ return string.Format(instance, args);
+ }
+
+ ///
+ /// Determines whether [is equal to] [the specified instance] using StringComparison.InvariantCultureIgnoreCase
+ ///
+ /// The instance.
+ /// The other string.
+ ///
+ /// true if [is equal to] [the specified instance]; otherwise, false.
+ ///
+ public static bool IsEqualTo(this string instance, string value)
+ {
+ if (string.IsNullOrWhiteSpace(instance))
+ {
+ return string.IsNullOrWhiteSpace(value);
+ }
+ else
+ {
+ return instance.Equals(value, StringComparison.InvariantCultureIgnoreCase);
+ }
+ }
+
+ ///
+ /// Determines whether [is starting with] [the specified instance] using StringComparison.InvariantCultureIgnoreCase.
+ ///
+ /// The instance.
+ /// The other string.
+ ///
+ /// true if [is starting with] [the specified instance]; otherwise, false.
+ ///
+ public static bool IsStartingWith(this string instance, string value)
+ {
+ return instance.StartsWith(value, StringComparison.InvariantCultureIgnoreCase);
+ }
+
+ ///
+ /// Determines whether [is ending with] [the specified instance] using StringComparison.InvariantCultureIgnoreCase.
+ ///
+ /// The instance.
+ /// The other string.
+ ///
+ /// true if [is ending with] [the specified instance]; otherwise, false.
+ ///
+ public static bool IsEndingWith(this string instance, string value)
+ {
+ return instance.EndsWith(value, StringComparison.InvariantCultureIgnoreCase);
+ }
+ }
+}
diff --git a/TransformHelper/Transform/ConfigTransformer.cs b/TransformHelper/Transform/ConfigTransformer.cs
new file mode 100644
index 0000000..8d1523c
--- /dev/null
+++ b/TransformHelper/Transform/ConfigTransformer.cs
@@ -0,0 +1,74 @@
+using System;
+using System.IO;
+
+namespace TransformHelper.Transform
+{
+ ///
+ /// Used for applying XML-Document-Transform on configuration files
+ /// http://vishaljoshi.blogspot.com/2009/03/web-deployment-webconfig-transformation_23.html
+ /// http://sedodream.com/2010/04/26/ConfigTransformationsOutsideOfWebAppBuilds.aspx
+ /// to be able to run this, you will need "Microsoft SQL Server 2008 Management Objects" or Microsoft.SqlServer.BatchParser.dll on the server
+ ///
+ public class ConfigTransformer
+ {
+
+ public TransformationResult ApplyTransformation(string sourceFilePath, string transformFilePath, string destinationFilePath = null)
+ {
+ if (string.IsNullOrWhiteSpace(destinationFilePath) || sourceFilePath.IsEqualTo(destinationFilePath))
+ {
+ destinationFilePath = sourceFilePath;
+ sourceFilePath = System.IO.Path.GetTempFileName();
+ File.Copy(destinationFilePath, sourceFilePath);
+ }
+
+ var buildLog = new LogBuildEngine();
+
+ Microsoft.Web.Publishing.Tasks.TransformXml transform = new Microsoft.Web.Publishing.Tasks.TransformXml();
+ transform.Source = sourceFilePath;
+ transform.Transform = transformFilePath;
+ transform.Destination = destinationFilePath;
+ transform.StackTrace = false;
+ transform.BuildEngine = buildLog;
+
+ if (transform.Execute())
+ {
+ return new TransformationResult
+ {
+ Success = true
+ };
+ }
+ else
+ {
+ return new TransformationResult
+ {
+ Success = false,
+ Errors = string.Format("The transformation of file \"{0}\" using transformation file \"{1}\" to destination file \"{2}\" failed with the following log: {4}{3}",
+ sourceFilePath, transformFilePath, destinationFilePath, buildLog.Text, Environment.NewLine)
+ };
+ }
+ }
+
+ public string GetTransformedFileContent(string sourceFilePath, string transformFilePath)
+ {
+ string destinationFilePath = System.IO.Path.GetTempFileName();
+ try
+ {
+ if (this.ApplyTransformation(sourceFilePath, transformFilePath, destinationFilePath).Success)
+ {
+ return File.ReadAllText(destinationFilePath);
+ }
+ else
+ {
+ return null;
+ }
+ }
+ finally
+ {
+ if (File.Exists(destinationFilePath))
+ {
+ File.Delete(destinationFilePath);
+ }
+ }
+ }
+ }
+}
diff --git a/TransformHelper/Transform/LogBuildEngine.cs b/TransformHelper/Transform/LogBuildEngine.cs
new file mode 100644
index 0000000..48bb484
--- /dev/null
+++ b/TransformHelper/Transform/LogBuildEngine.cs
@@ -0,0 +1,64 @@
+using Microsoft.Build.Framework;
+using System;
+using System.Collections;
+using System.Text;
+
+namespace TransformHelper.Transform
+{
+ public class LogBuildEngine : IBuildEngine
+ {
+ private StringBuilder Log = new StringBuilder();
+ public string Text
+ {
+ get
+ {
+ return Log.ToString();
+ }
+ }
+
+ public bool BuildProjectFile(string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs)
+ {
+ throw new NotImplementedException();
+ }
+
+ public int ColumnNumberOfTaskNode
+ {
+ get { return 0; }
+ }
+
+ public bool ContinueOnError
+ {
+ get { return false; }
+ }
+
+ public int LineNumberOfTaskNode
+ {
+ get { return 0; }
+ }
+
+ public void LogCustomEvent(CustomBuildEventArgs e)
+ {
+ Log.AppendLine(e.Message);
+ }
+
+ public void LogErrorEvent(BuildErrorEventArgs e)
+ {
+ Log.AppendLine(e.Message);
+ }
+
+ public void LogMessageEvent(BuildMessageEventArgs e)
+ {
+ Log.AppendLine(e.Message);
+ }
+
+ public void LogWarningEvent(BuildWarningEventArgs e)
+ {
+ Log.AppendLine(e.Message);
+ }
+
+ public string ProjectFileOfTaskNode
+ {
+ get { return "Transform File Fake Project"; }
+ }
+ }
+}
diff --git a/TransformHelper/Transform/TransformationResult.cs b/TransformHelper/Transform/TransformationResult.cs
new file mode 100644
index 0000000..aa7ea6e
--- /dev/null
+++ b/TransformHelper/Transform/TransformationResult.cs
@@ -0,0 +1,9 @@
+
+namespace TransformHelper.Transform
+{
+ public class TransformationResult
+ {
+ public bool Success { get; set; }
+ public string Errors { get; set; }
+ }
+}
diff --git a/TransformHelper/TransformHelper.csproj b/TransformHelper/TransformHelper.csproj
index 3f01488..855fdac 100644
--- a/TransformHelper/TransformHelper.csproj
+++ b/TransformHelper/TransformHelper.csproj
@@ -32,6 +32,11 @@
4
+
+
+
+ ..\Reference Assemblies\Microsoft.Web.Publishing.Tasks\Microsoft.Web.Publishing.Tasks.Dll
+
..\packages\Ookii.CommandLine.2.2\lib\Ookii.CommandLine.dll
True
@@ -45,13 +50,18 @@
-
-
+
+
+
+
+
+
+