25 changed files with 10446 additions and 3 deletions
@ -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> |
|||
|
|||
@ -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> |
|||
@ -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> |
|||
@ -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> |
|||
@ -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> |
|||
@ -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> |
|||
@ -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> |
|||
@ -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> |
|||
File diff suppressed because it is too large
@ -0,0 +1,459 @@ |
|||
<!-- |
|||
*********************************************************************************************** |
|||
Microsoft.DNX.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"> |
|||
<!-- 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')"/> |
|||
|
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
Including the tasks |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup> |
|||
<WebPublishTasksDir Condition=" '$(WebPublishTasksDir)'=='' ">$(MSBuildThisFileDirectory)</WebPublishTasksDir> |
|||
<DNXTasksDir Condition=" '$(DNXTasksDir)'=='' ">$(MSBuildThisFileDirectory)..\DNX\</DNXTasksDir> |
|||
</PropertyGroup> |
|||
<UsingTask TaskName="MSDeploy" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|||
<UsingTask TaskName="VSMSDeploy" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|||
<UsingTask TaskName="NormalizeServiceUrl" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|||
<UsingTask TaskName="InvokePowerShell" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|||
<UsingTask TaskName="ValidateParameter" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|||
<UsingTask TaskName="GetAllPublishProperties" AssemblyFile="$(WebPublishTasksDir)Microsoft.Web.Publishing.Tasks.dll"/> |
|||
<UsingTask TaskName="Dnu" AssemblyFile="$(DNXTasksDir)Microsoft.DNX.Tasks.dll"/> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
Import the publish profile |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup Condition="'$(PublishProfile)' != ''"> |
|||
<PublishProfileRootFolder Condition="'$(PublishProfileRootFolder)' == '' ">$(MSBuildProjectDirectory)\Properties\PublishProfiles\</PublishProfileRootFolder> |
|||
<PublishProfileName Condition="'$(PublishProfileName)' == ''">$([System.IO.Path]::GetFileNameWithoutExtension($(PublishProfile)))</PublishProfileName> |
|||
<WebPublishProfileFile Condition="'$(WebPublishProfileFile)' == ''">$(PublishProfileRootFolder)$(PublishProfileName).pubxml</WebPublishProfileFile> |
|||
</PropertyGroup> |
|||
<Import Project="$(WebPublishProfileFile)" Condition="Exists($(WebPublishProfileFile))"/> |
|||
|
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
Global Properties |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup> |
|||
<PublishOutputPathNoTrailingSlash Condition="'$(PublishOutputPathNoTrailingSlash)' == ''">$([System.IO.Path]::GetTempPath())PublishTemp</PublishOutputPathNoTrailingSlash> |
|||
<PublishOutputPath Condition="'$(PublishOutputPath)' == ''">$(PublishOutputPathNoTrailingSlash)\</PublishOutputPath> |
|||
</PropertyGroup> |
|||
|
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET : WebPublish |
|||
*********************************************************************************************** |
|||
--> |
|||
<Target Name="WebPublish" AfterTargets="Build" Condition=" '$(DeployOnBuild)'=='true' "> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="DefaultPublish" |
|||
Condition=" '$(WebPublishMethod)'=='' " /> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="FileSystemPublish" |
|||
Condition=" '$(WebPublishMethod)'=='FileSystem' " /> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="MSDeployPublish" |
|||
Condition=" '$(WebPublishMethod)'=='MSDeploy' " /> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="DockerPublish" |
|||
Condition=" '$(WebPublishMethod)'=='Docker' " /> |
|||
|
|||
</Target> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET: GatherAllFilesToPublish |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup> |
|||
<GatherAllFilesToPublishDependsOn> |
|||
$(GatherAllFilesToPublishDependsOn); |
|||
GetRuntimeToolingPathTarget |
|||
</GatherAllFilesToPublishDependsOn> |
|||
</PropertyGroup> |
|||
<Target Name="GatherAllFilesToPublish" |
|||
DependsOnTargets="$(GatherAllFilesToPublishDependsOn)"> |
|||
|
|||
<!-- Dnu bundle arguments --> |
|||
<PropertyGroup> |
|||
<!-- Dnu bundle arguments begin --> |
|||
<KPackWorkingDirectory Condition=" '$(KPackWorkingDirectory)'=='' ">$(MSBuildProjectDirectory)</KPackWorkingDirectory> |
|||
|
|||
<!-- Setting the default webroot in the case of CI build scenarios --> |
|||
<WebRoot Condition="'$(WebRoot)' == '' And '$(DeployOnBuild)'=='true'">wwwroot</WebRoot> |
|||
<!-- wwwroot-out switch is only provided for web projects. --> |
|||
<WebRootOut Condition= "'$(WebRootOut)'=='' and '$(WebRoot)' != ''">$(WebRoot)</WebRootOut> |
|||
|
|||
<!-- If compile source is set, then no-source flag is passed to Dnu bundle --> |
|||
<NoSourceFlag Condition=" '$(NoSourceFlag)'=='' And '$(CompileSource)'=='true' ">true</NoSourceFlag> |
|||
<QuietFlag Condition=" '$(QuietFlag)'=='' And '$(DeployOnBuild)'!='true' ">true</QuietFlag> |
|||
<PublishConfiguration Condition=" '$(PublishConfiguration)'=='' And '$(LastUsedBuildConfiguration)'!='' ">$(LastUsedBuildConfiguration)</PublishConfiguration> |
|||
|
|||
<!-- Setting the default publish configuration to $(Configuration) --> |
|||
<PublishConfiguration Condition=" '$(PublishConfiguration)'=='' ">$(Configuration)</PublishConfiguration> |
|||
<PublishConfiguration Condition=" '$(PublishConfiguration)'=='' ">Release</PublishConfiguration> |
|||
|
|||
<!-- Dnu bundle arguments end --> |
|||
</PropertyGroup> |
|||
|
|||
<!-- If an external tools path has not been set, set it to the default --> |
|||
<DefaultExternalToolsPath ProjectFolder="$(MSBuildProjectDirectory)" Condition="'$(ExternalToolsPath)' == ''"> |
|||
<Output PropertyName="ExternalToolsPath" TaskParameter="ExternalToolsPath"></Output> |
|||
</DefaultExternalToolsPath> |
|||
|
|||
<GetRuntimeVersion |
|||
RuntimeVersionOverride="$(PublishDNXVersion)" |
|||
TargetDNXVersion="$(TargetDNXVersion)" |
|||
RuntimeToolingVersion="$(RuntimeToolingVersion)" |
|||
Want64Bit="$(Bundle64BitRuntime)" |
|||
WantCoreClr="$(BundleCoreClrRuntime)"> |
|||
<Output PropertyName="FinalPublishVersion" TaskParameter="RuntimeVersion"></Output> |
|||
</GetRuntimeVersion> |
|||
|
|||
<Exec |
|||
Condition="Exists('$(PublishOutputPath)')" |
|||
Command="rmdir /S /Q "$(PublishOutputPath)"" |
|||
WorkingDirectory="$(MSBuildProjectDirectory)" /> |
|||
|
|||
<Dnu |
|||
RuntimeToolingDirectory ="$(RuntimeToolingDirectory)" |
|||
ProjectFolder="$(MSBuildProjectDirectory)" |
|||
Project="$(KPackWorkingDirectory)" |
|||
Command="publish" |
|||
Runtime="$(FinalPublishVersion)" |
|||
WwwRootOut="$(WebRootOut)" |
|||
NoSource="$(NoSourceFlag)" |
|||
Quiet="$(QuietFlag)" |
|||
Configuration="$(PublishConfiguration)" |
|||
Out="$(PublishOutputPathNoTrailingSlash)" |
|||
ExternalToolsPath="$(ExternalToolsPath)" |
|||
IsFilePreview="$(FilePreview)" |
|||
/> |
|||
</Target> |
|||
|
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET: FileSystem Publish |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup> |
|||
<FileSystemPublishDependsOn> |
|||
$(FileSystemPublishDependsOn); |
|||
GatherAllFilesToPublish; |
|||
</FileSystemPublishDependsOn> |
|||
</PropertyGroup> |
|||
|
|||
<Target Name="FileSystemPublish" |
|||
DependsOnTargets="$(FileSystemPublishDependsOn)"> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="PowerShellPublish" /> |
|||
|
|||
</Target> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET: Docker Publish |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup> |
|||
<DockerPublishDependsOn> |
|||
$(DockerPublishDependsOn); |
|||
GatherAllFilesToPublish; |
|||
</DockerPublishDependsOn> |
|||
</PropertyGroup> |
|||
|
|||
<Target Name="DockerPublish" |
|||
DependsOnTargets="$(DockerPublishDependsOn)"> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="PowerShellPublish" /> |
|||
</Target> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET : MSDeploy Publish |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup> |
|||
<MSDeployPublishDependsOn> |
|||
$(MSDeployPublishDependsOn); |
|||
GatherAllFilesToPublish; |
|||
GenerateSkipRuleForAppData |
|||
</MSDeployPublishDependsOn> |
|||
</PropertyGroup> |
|||
|
|||
<Target Name="MSDeployPublish" DependsOnTargets="$(MSDeployPublishDependsOn)"> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="VSMSDeployPublish" /> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="PowerShellPublish" /> |
|||
</Target> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET : VSMSDeploy Publish |
|||
*********************************************************************************************** |
|||
--> |
|||
<Target Name="VSMSDeployPublish" Condition=" '$(FilePreview)' == 'true' Or '$(UsePowerShell)' != 'true'" > |
|||
|
|||
<ValidateParameter |
|||
ParameterName="MsDeployServiceUrl" |
|||
ParameterValue="$(MsDeployServiceUrl)"/> |
|||
|
|||
<!-- Normalize service url such as convert a server name to format like https://<server>:8172/msdeploy.axd--> |
|||
<NormalizeServiceUrl ServiceUrl="$(MsDeployServiceUrl)" UseWMSVC="true" UseRemoteAgent="false"> |
|||
<Output TaskParameter="ResultUrl" PropertyName="MsDeployServiceUrl" /> |
|||
</NormalizeServiceUrl> |
|||
<!-- Data Passed to MSDeploy --> |
|||
<ItemGroup> |
|||
<MsDeploySourceProviderSetting Include="IisApp"> |
|||
<Path>$(PublishOutputPath)$(WebRoot)</Path> |
|||
</MsDeploySourceProviderSetting> |
|||
<MsDeployDestinationProviderSetting Include="IisApp"> |
|||
<Path>$(DeployIisAppPath)</Path> |
|||
<ComputerName>$(MsDeployServiceUrl)</ComputerName> |
|||
<UserName>$(UserName)</UserName> |
|||
<Password>$(Password)</Password> |
|||
<IncludeAcls>False</IncludeAcls> |
|||
<AuthType>Basic</AuthType> |
|||
</MsDeployDestinationProviderSetting> |
|||
</ItemGroup> |
|||
|
|||
<PropertyGroup> |
|||
<PublishEnableLinks Condition=" '$(PublishEnableLinks)' == '' ">contentLibExtension</PublishEnableLinks> |
|||
<RetryAttemptsForDeployment Condition=" '$(RetryAttemptsForDeployment)' == '' ">2</RetryAttemptsForDeployment> |
|||
<MsDeployDoNotDeleteRule Condition="$(SkipExtraFilesOnServer) == 'true'">DoNotDeleteRule</MsDeployDoNotDeleteRule> |
|||
<_EnableRuleList>$(MsDeployDoNotDeleteRule)</_EnableRuleList> |
|||
|
|||
<MSDeployUseChecksum Condition=" '$(MSDeployUseChecksum)' == '' ">false</MSDeployUseChecksum> |
|||
<AllowUntrustedCertificate Condition=" '$(AllowUntrustedCertificate)' == '' ">false</AllowUntrustedCertificate> |
|||
|
|||
<!-- UserAgent string sent to msdeploy --> |
|||
<_MSDeployUserAgentSource Condition=" '$(BuildingInsideVisualStudio)' != 'true'">$(VisualStudioVersion):CmdLine</_MSDeployUserAgentSource> |
|||
<_MSDeployUserAgentSource Condition=" '$(BuildingInsideVisualStudio)' == 'true'">$(VisualStudioVersion):PublishDialog</_MSDeployUserAgentSource> |
|||
<_MSDeployUserAgent>VS$(_MSDeployUserAgentSource)</_MSDeployUserAgent> |
|||
</PropertyGroup> |
|||
|
|||
<VSMSDeploy |
|||
Condition=" '$(FilePreview)' == 'true' Or '$(UsePowerShell)' != 'true'" |
|||
Source="@(MsDeploySourceProviderSetting)" |
|||
Destination="@(MsDeployDestinationProviderSetting)" |
|||
EnableLink="$(PublishEnableLinks)" |
|||
AllowUntrustedCertificate="$(AllowUntrustedCertificate)" |
|||
BuildingInsideVisualStudio="$(BuildingInsideVisualStudio)" |
|||
SkipExtraFilesOnServer="$(SkipExtraFilesOnServer)" |
|||
SkipRuleItems="@(MsDeploySkipRules)" |
|||
WhatIf="$(FilePreview)" |
|||
RetryAttempts="$(RetryAttemptsForDeployment)" |
|||
EnableMSDeployBackup="$(EnableMSDeployBackup)" |
|||
UseChecksum="$(MSDeployUseChecksum)" |
|||
UserAgent="$(_MSDeployUserAgent)" |
|||
InvokedByPublish="true"> |
|||
<Output TaskParameter="Result" PropertyName="_PublishResult" /> |
|||
</VSMSDeploy> |
|||
|
|||
</Target> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET : Package Publish |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup> |
|||
<PackagePublishDependsOn> |
|||
$(PackagePublishDependsOn); |
|||
FileSystemPublish |
|||
</PackagePublishDependsOn> |
|||
</PropertyGroup> |
|||
|
|||
<Target Name="PackagePublish" DependsOnTargets="$(PackagePublishDependsOn)"> |
|||
|
|||
<PropertyGroup> |
|||
<PackagePowerShellScriptFile Condition= "'$(PackagePowerShellScriptFile)'=='' ">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\Web\Powershell\1.0.1\default-publish.ps1))</PackagePowerShellScriptFile> |
|||
<PackagePubxmlFile Condition=" '$(PackagePubxmlFile)'=='' ">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\Web\Powershell\1.0.1\package.pubxml))</PackagePubxmlFile> |
|||
</PropertyGroup> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="PowerShellPublish" |
|||
Properties="UsePowerShell=true; |
|||
FilePreview=false; |
|||
PowerShellScriptFile=$(PackagePowerShellScriptFile); |
|||
WebPublishProfileFile=$(PackagePubxmlFile);" /> |
|||
|
|||
</Target> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET : Default Publish |
|||
*********************************************************************************************** |
|||
--> |
|||
<PropertyGroup> |
|||
<DefaultPublishDependsOn> |
|||
$(DefaultPublishDependsOn); |
|||
FileSystemPublish |
|||
</DefaultPublishDependsOn> |
|||
</PropertyGroup> |
|||
|
|||
<Target Name="DefaultPublish" DependsOnTargets="$(DefaultPublishDependsOn)"> |
|||
|
|||
<PropertyGroup> |
|||
<DefaultPowerShellScriptFile Condition= "'$(DefaultPowerShellScriptFile)'=='' ">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\Web\Powershell\1.0.1\default-publish.ps1))</DefaultPowerShellScriptFile> |
|||
<DefaultPubxmlFile Condition=" '$(DefaultPubxmlFile)'=='' ">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\Web\Powershell\1.0.1\FileSystem.pubxml))</DefaultPubxmlFile> |
|||
</PropertyGroup> |
|||
|
|||
<MSBuild Projects ="$(MSBuildProjectFullPath)" |
|||
Targets="PowerShellPublish" |
|||
Properties="UsePowerShell=true; |
|||
FilePreview=false; |
|||
PowerShellScriptFile=$(DefaultPowerShellScriptFile); |
|||
WebPublishProfileFile=$(DefaultPubxmlFile);" /> |
|||
|
|||
<ItemGroup> |
|||
<SourceFiles Include="$(DefaultPowerShellScriptFile)"/> |
|||
<SourceFiles Include="$(DefaultPubxmlFile)"/> |
|||
<SourceFiles Include="$(MSBuildProjectDirectory)\Properties\PublishProfiles\*.*"/> |
|||
</ItemGroup> |
|||
|
|||
<Copy |
|||
SourceFiles="@(SourceFiles)" |
|||
DestinationFolder="$(OutDir)\$(Configuration)\PublishProfiles\" /> |
|||
</Target> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
TARGET : PowerShell Publish |
|||
*********************************************************************************************** |
|||
--> |
|||
|
|||
<Target Name="PowerShellPublish" Condition=" '$(FilePreview)' != 'true' And '$(UsePowerShell)' == 'true' " > |
|||
<PropertyGroup> |
|||
<PowerShellScriptFile Condition= "'$(PowerShellScriptFile)'=='' ">$([System.String]::Copy('$(WebPublishProfileFile)').Replace('.pubxml','-publish.ps1'))</PowerShellScriptFile> |
|||
<!-- If a .ps1 file is present in the PublishProfiles folder with format <publishprofile>-publish.ps1, then the generated powershell script will be overridden with this file --> |
|||
<PowerShellScript Condition="Exists('$(PowerShellScriptFile)')" >$([System.IO.File]::ReadAllText($(PowerShellScriptFile)))</PowerShellScript> |
|||
</PropertyGroup> |
|||
|
|||
<GetAllPublishProperties |
|||
PublishProfilePath="$(WebPublishProfileFile)" > |
|||
<Output TaskParameter="AllPublishProperties" ItemName="_PublishProperties" /> |
|||
</GetAllPublishProperties> |
|||
|
|||
<ItemGroup> |
|||
<PublishPropertiesOverride Include="%(_PublishProperties.Identity)"> |
|||
<Value>$(%(_PublishProperties.Identity))</Value> |
|||
</PublishPropertiesOverride> |
|||
</ItemGroup> |
|||
|
|||
<InvokePowerShell |
|||
Script="$(PowerShellScript)" |
|||
PublishProfilePath="$(WebPublishProfileFile)" |
|||
PackOutput="$(PublishOutputPath)" |
|||
ProjectPath="$(MSBuildProjectDirectory)" |
|||
Password ="$(Password)" |
|||
MSDeployPath ="$(MSDeployPath)" |
|||
PublishPropertiesOverride ="@(PublishPropertiesOverride)"/> |
|||
</Target> |
|||
|
|||
<!--================================================--> |
|||
<!--Create skip rules used in sample script generation as well as publish--> |
|||
<!--================================================--> |
|||
<Target Name="GenerateSkipRuleForAppData" Condition="$(ExcludeApp_Data) == 'true'"> |
|||
<EscapeTextForRegularExpressions Text="$(PublishOutputPath)"> |
|||
<Output TaskParameter="Result" PropertyName="_Escaped_PublishOutputPath" /> |
|||
</EscapeTextForRegularExpressions> |
|||
<ItemGroup> |
|||
<MsDeploySkipRules Include="SkipAppDataOnDeploy"> |
|||
<SkipAction></SkipAction> |
|||
<ObjectName>dirPath</ObjectName> |
|||
<AbsolutePath>$(_Escaped_PublishOutputPath)\\App_Data$</AbsolutePath> |
|||
<Apply>Source</Apply> |
|||
<XPath></XPath> |
|||
</MsDeploySkipRules> |
|||
</ItemGroup> |
|||
</Target> |
|||
|
|||
<!-- |
|||
*********************************************************************************************** |
|||
Item Definitions |
|||
*********************************************************************************************** |
|||
--> |
|||
|
|||
<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> |
|||
<!-- |
|||
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> |
|||
|
|||
<!-- 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> |
|||
Binary file not shown.
File diff suppressed because it is too large
@ -0,0 +1,300 @@ |
|||
<!-- |
|||
*********************************************************************************************** |
|||
Microsoft.Web.AzureAD.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. |
|||
|
|||
Copyright (C) Microsoft Corporation. All rights reserved. |
|||
*********************************************************************************************** |
|||
--> |
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<!--********************************************************************--> |
|||
<!-- This will create the parameters required when publishing an web app leveraging |
|||
Windows Azure Active Directory for auth --> |
|||
<PropertyGroup> |
|||
<PipelineTransformPhaseDependsOn>$(PipelineTransformPhaseDependsOn);_TransformWebConfigForAzureAuthentication</PipelineTransformPhaseDependsOn> |
|||
</PropertyGroup> |
|||
<Target Name="_TransformWebConfigForAzureAuthenticationCore"> |
|||
<PropertyGroup> |
|||
<_WebConfigTransformFolderForAzureAuthentication>$(_WPPDefaultIntermediateOutputPath)WebConfigTransformFolderForAzureAuthentication</_WebConfigTransformFolderForAzureAuthentication> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<_WebConfigsToTransformForAzureAuthentication Include="@(FilesForPackagingFromProject)" |
|||
Condition="'%(FilesForPackagingFromProject.Filename)%(FilesForPackagingFromProject.Extension)'=='$(ProjectConfigFileName)' |
|||
And !%(FilesForPackagingFromProject.Exclude) |
|||
And '%(DestinationRelativePath)' == '$(ProjectConfigFileName)'"> |
|||
<TransformOriginalFolder>$(_WebConfigTransformFolderForAzureAuthentication)\original</TransformOriginalFolder> |
|||
<TransformFileFolder>$(_WebConfigTransformFolderForAzureAuthentication)\assist</TransformFileFolder> |
|||
<TransformOutputFile>$(_WebConfigTransformFolderForAzureAuthentication)\transformed\%(DestinationRelativePath)</TransformOutputFile> |
|||
<TransformScope>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)\%(DestinationRelativePath)))</TransformScope> |
|||
</_WebConfigsToTransformForAzureAuthentication> |
|||
<_WebConfigsToTransformForAzureAuthenticationOuputFiles Include="@(_WebConfigsToTransformForAzureAuthentication->'%(TransformOutputFile)')"> |
|||
</_WebConfigsToTransformForAzureAuthenticationOuputFiles> |
|||
</ItemGroup> |
|||
|
|||
<PropertyGroup> |
|||
<_WebConfigsToTransformForAzureAuthenticationOuputDirectories>@(_WebConfigsToTransformForAzureAuthenticationOuputFiles->'%(RootDir)%(Directory)')</_WebConfigsToTransformForAzureAuthenticationOuputDirectories> |
|||
<_WebConfigsToTransformForAzureAuthenticationOuput>@(_WebConfigsToTransformForAzureAuthentication->'%(TransformOutputFile)');</_WebConfigsToTransformForAzureAuthenticationOuput> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<_WebConfigsToTransformForAzureAuthenticationOuputDirectories Include="$(_WebConfigsToTransformForAzureAuthenticationOuputDirectories)" /> |
|||
</ItemGroup> |
|||
|
|||
<!-- Make sure required directories exist --> |
|||
<MakeDir Directories="@(_WebConfigsToTransformForAzureAuthenticationOuputDirectories)" Condition="!Exists(%(Identity))"/> |
|||
|
|||
<!-- Copy the original web.config --> |
|||
<CopyPipelineFiles PipelineItems="@(_WebConfigsToTransformForAzureAuthentication)" |
|||
SourceDirectory="$(WebPublishPipelineProjectDirectory)" |
|||
TargetDirectory="%(TransformOriginalFolder)" |
|||
SkipMetadataExcludeTrueItems="True" |
|||
UpdateItemSpec="False" |
|||
DeleteItemsMarkAsExcludeTrue ="True" |
|||
Condition="'@(_WebConfigsToTransformForAzureAuthentication)' != ''"> |
|||
<Output TaskParameter="UpdatedPipelineItems" ItemName="_UpdatedWebConfigsToTransformForAzureAuthentication"/> |
|||
</CopyPipelineFiles> |
|||
|
|||
<!-- Delete those web.config have been updated if existed--> |
|||
<Delete Files="@(_WebConfigsToTransformForAzureAuthenticationOuputDirectories->'%(TransformOutputFile)')" /> |
|||
|
|||
<ItemGroup> |
|||
<MSDeployParameterValue Include="AD_APPIDUri"> |
|||
<ParameterValue>$(ADAppIDUri)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
</ItemGroup> |
|||
|
|||
<PropertyGroup> |
|||
<RemoveCertValidationElement Condition="'$(RemoveCertValidationElement)'=='' ">false</RemoveCertValidationElement> |
|||
<_RemoveCertificateValidationTransform Condition="'$(RemoveCertValidationElement)' == 'true'"><certificateValidation certificateValidationMode="None" xdt:Transform="Remove" /></_RemoveCertificateValidationTransform> |
|||
<_RemoveExistingAudienceUrisTransform Condition="'$(PreserveExistingAudienceUris)' != 'true'"><add xdt:Transform="RemoveAll" /></_RemoveExistingAudienceUrisTransform> |
|||
</PropertyGroup> |
|||
|
|||
<PropertyGroup> |
|||
<_ReplaceRealmAndAudienceUriAppSetting Condition="'$(ADWebAPIBased)'!='true' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|||
<appSettings> |
|||
<add key="ida:AudienceUri" |
|||
value="{% parameter='AD_AudienceUriAppSetting' xpathlocator='key' description='AD Audience Uri App Setting' defaultValue='%24(value)' tags='AD_AudienceUriAppSetting' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
<add key="ida:Realm" |
|||
value="{% parameter='AD_RealmAppSetting' xpathlocator='key' description='AD Realm App Setting' defaultValue='%24(value)' tags='AD_RealmAppSetting' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
<add key="ida:FederationMetadataLocation" |
|||
value="{% parameter='AD_MetadataUrl' xpathlocator='key' description='AD MetadataUrl App Setting' defaultValue='%24(value)' tags='AD_MetadataUrlAppSetting' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceRealmAndAudienceUriAppSetting> |
|||
<_ReplaceADClientID Condition="'$(ADClientAPPID)'!='' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|||
<appSettings> |
|||
<add key="ida:ClientID" |
|||
value="{% parameter='AD_ClientID' xpathlocator='key' description='AD Client Application ID' defaultValue='%24(value)' tags='AD_ClientAPPID' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceADClientID> |
|||
<_ReplaceADClientPassword Condition="'$(ADClientPassword)'!='' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|||
<appSettings> |
|||
<add key="ida:Password" |
|||
value="{% parameter='AD_ClientPassword' xpathlocator='key' description='AD Client Password' defaultValue='%24(value)' tags='AD_Password' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceADClientPassword> |
|||
<_ReplaceADWebAPIAudienceAppSetting Condition="'$(ADWebAPIBased)'=='true' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|||
<appSettings> |
|||
<add key="ida:Audience" |
|||
value="{% parameter='AD_WebAPI_Audience' xpathlocator='key' description='AD Web API Audience' defaultValue='%24(value)' tags='AD_WebAPI_Audience' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceADWebAPIAudienceAppSetting> |
|||
<_ReplaceADWIFArtifacts Condition="'$(ADWebAPIBased)'!='true' And '$(ADUsesOwinOrOpenIdConnect)'!='true'"> |
|||
<system.identityModel> |
|||
<identityConfiguration> |
|||
$(_RemoveCertificateValidationTransform) |
|||
<audienceUris> |
|||
$(_RemoveExistingAudienceUrisTransform) |
|||
<add |
|||
value="APPIDUri" |
|||
xdt:Transform="Insert" xdt:SupressWarnings="True" /> |
|||
</audienceUris> |
|||
|
|||
<audienceUris> |
|||
<add |
|||
value="{% token='%24(value)' parameter='AD_%24(value)' xpathlocator='value' description='AD AppIDUri' defaultValue='%24(value)' tags='ADrealmUri' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" /> |
|||
</audienceUris> |
|||
|
|||
</identityConfiguration> |
|||
</system.identityModel> |
|||
<system.identityModel.services> |
|||
<federationConfiguration> |
|||
<wsFederation |
|||
realm="{% xpathlocator='requireHttps' parameter='AD_APPIDUri' description='AD AppIDUri' defaultValue='%24(realm)' tags='ADAPPIDUri' %}" |
|||
xdt:Transform="SetTokenizedAttributes(realm)" xdt:SupressWarnings="True" /> |
|||
<wsFederation |
|||
issuer="{% xpathlocator='requireHttps' parameter='AD_Issuer' description='AD Issuer' defaultValue='%24(issuer)' tags='ADISSUER' %}" |
|||
xdt:Transform="SetTokenizedAttributes(issuer)" xdt:SupressWarnings="True" /> |
|||
</federationConfiguration> |
|||
</system.identityModel.services> |
|||
</_ReplaceADWIFArtifacts> |
|||
<_ReplaceADClientIDDev14 Condition="'$(ADClientAPPID)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|||
<appSettings> |
|||
<add key="ida:ClientId" |
|||
value="{% parameter='AD_ClientID' xpathlocator='key' description='AD Client Application ID' defaultValue='%24(value)' tags='AD_ClientAPPID' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceADClientIDDev14> |
|||
<_ReplaceADClientPasswordDev14 Condition="'$(ADClientPassword)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|||
<appSettings> |
|||
<add key="ida:ClientSecret" |
|||
value="{% parameter='AD_ClientPassword' xpathlocator='key' description='AD Client Password' defaultValue='%24(value)' tags='AD_Password' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceADClientPasswordDev14> |
|||
<_ReplaceADTenantIdDev14 Condition="'$(ADTenantId)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|||
<appSettings> |
|||
<add key="ida:TenantId" |
|||
value="{% parameter='AD_TenantId' xpathlocator='key' description='AD Tenant Id' defaultValue='%24(value)' tags='AD_TenantId' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceADTenantIdDev14> |
|||
<_ReplaceADDomainDev14 Condition="'$(ADDomain)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|||
<appSettings> |
|||
<add key="ida:Domain" |
|||
value="{% parameter='AD_Domain' xpathlocator='key' description='AD Domain' defaultValue='%24(value)' tags='AD_Domain' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceADDomainDev14> |
|||
<_ReplaceADPostLogoutRedirectUriDev14 Condition="'$(ADPostLogoutRedirectUri)'!='' And '$(ADUsesOwinOrOpenIdConnect)'=='true'"> |
|||
<appSettings> |
|||
<add key="ida:PostLogoutRedirectUri" |
|||
value="{% parameter='AD_PostLogoutRedirectUri' xpathlocator='key' description='AD PostLogoutRedirectUri' defaultValue='%24(value)' tags='AD_PostLogoutRedirectUri' %}" |
|||
xdt:Transform="SetTokenizedAttributes(value)" xdt:SupressWarnings="True" xdt:Locator="Match(key)"/> |
|||
</appSettings> |
|||
</_ReplaceADPostLogoutRedirectUriDev14> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<MSDeployParameterValue Include="AD_ClientID" Condition="'$(ADClientAPPID)'!=''"> |
|||
<ParameterValue>$(ADClientAPPID)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_Issuer" Condition="'$(ADIssuer)'!=''"> |
|||
<ParameterValue>$(ADIssuer)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_MetadataUrl" Condition="'$(ADDomain)'!=''"> |
|||
<ParameterValue>https://login.windows.net/$(ADDomain)/FederationMetadata/2007-06/FederationMetadata.xml</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_ClientPassword" Condition="'$(ADClientPassword)'!=''"> |
|||
<ParameterValue>$(ADClientPassword)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_WebAPI_Audience" Condition="'$(ADWebAPIBased)'=='true'"> |
|||
<ParameterValue>$(ADAppIDUri)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_RealmAppSetting" Condition="'$(ADWebAPIBased)'!='true'"> |
|||
<ParameterValue>$(ADAppIDUri)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_AudienceUriAppSetting" Condition="'$(ADWebAPIBased)'!='true'"> |
|||
<ParameterValue>$(ADAppIDUri)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_TenantId" Condition="'$(ADTenantId)'!=''"> |
|||
<ParameterValue>$(ADTenantId)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_Domain" Condition="'$(ADDomain)'!=''"> |
|||
<ParameterValue>$(ADDomain)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
<MSDeployParameterValue Include="AD_PostLogoutRedirectUri" Condition="'$(ADPostLogoutRedirectUri)'!=''"> |
|||
<ParameterValue>$(ADPostLogoutRedirectUri)</ParameterValue> |
|||
</MSDeployParameterValue> |
|||
</ItemGroup> |
|||
|
|||
<CreateProperty Value="<?xml version="1.0"?> |
|||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
|||
$(_ReplaceRealmAndAudienceUriAppSetting) |
|||
$(_ReplaceADClientID) |
|||
$(_ReplaceADClientPassword) |
|||
$(_ReplaceADWebAPIAudienceAppSetting) |
|||
$(_ReplaceADWIFArtifacts) |
|||
$(_ReplaceADClientIDDev14) |
|||
$(_ReplaceADClientPasswordDev14) |
|||
$(_ReplaceADTenantIdDev14) |
|||
$(_ReplaceADDomainDev14) |
|||
$(_ReplaceADPostLogoutRedirectUriDev14) |
|||
</configuration>"> |
|||
<Output TaskParameter="Value" PropertyName="_WebConfigsTransformForAzureAuthentication"/> |
|||
</CreateProperty> |
|||
|
|||
<PropertyGroup> |
|||
<_WebConfigsToTransformForAzureAuthentication_Identity>%(_WebConfigsToTransformForAzureAuthentication.Identity)</_WebConfigsToTransformForAzureAuthentication_Identity> |
|||
<_WebConfigsToTransformForAzureAuthentication_TransformOutputFile>%(_WebConfigsToTransformForAzureAuthentication.TransformOutputFile)</_WebConfigsToTransformForAzureAuthentication_TransformOutputFile> |
|||
<_WebConfigsToTransformForAzureAuthentication_TransformScope>%(_WebConfigsToTransformForAzureAuthentication.TransformScope)</_WebConfigsToTransformForAzureAuthentication_TransformScope> |
|||
</PropertyGroup> |
|||
|
|||
<ParameterizeTransformXml |
|||
Source="$(_WebConfigsToTransformForAzureAuthentication_Identity)" |
|||
IsSourceAFile="True" |
|||
Transform="$(_WebConfigsTransformForAzureAuthentication)" |
|||
IsTransformAFile="False" |
|||
Destination="$(_WebConfigsToTransformForAzureAuthentication_TransformOutputFile)" |
|||
IsDestinationAFile="True" |
|||
Scope="$(_WebConfigsToTransformForAzureAuthentication_TransformScope)" |
|||
StackTrace="$(TransformWebConfigStackTraceEnabled)" |
|||
EnableTokenizeParameters="True" |
|||
SourceRootPath="$(WebPublishPipelineSourceRootDirectory)"> |
|||
<Output TaskParameter="DeclareParameters" ItemName="_ParamsFromWebConfigsToTransformForAzureAuthentication"/> |
|||
</ParameterizeTransformXml> |
|||
|
|||
<PropertyGroup> |
|||
<_WebConfigsToTransformForAzureAuthenticationOutputFolder>$(_WPPDefaultIntermediateOutputPath)AzureAuthentication</_WebConfigsToTransformForAzureAuthenticationOutputFolder> |
|||
<_WebConfigsToTransformForAzureAuthenticationOutputParametersFile>$(_WebConfigsToTransformForAzureAuthenticationOutputFolder)\TransformForAzureAuthentication.parameters.xml</_WebConfigsToTransformForAzureAuthenticationOutputParametersFile> |
|||
</PropertyGroup> |
|||
|
|||
<MakeDir Directories="$(_WebConfigsToTransformForAzureAuthenticationOutputFolder)" Condition="!Exists($(_WebConfigsToTransformForAzureAuthenticationOutputFolder))"/> |
|||
|
|||
<ExportParametersFile |
|||
Parameters="@(_ParamsFromWebConfigsToTransformForAzureAuthentication)" |
|||
DeclareParameterFile="$(_WebConfigsToTransformForAzureAuthenticationOutputParametersFile)" |
|||
GenerateFileEvenIfEmpty="True" |
|||
/> |
|||
|
|||
<ImportParametersFile Files="$(_WebConfigsToTransformForAzureAuthenticationOutputParametersFile)" |
|||
DisableEscapeMSBuildVariable="$(ImportParametersFile_DisableEscapeMSBuildVariable)" |
|||
Condition="!$(DisableAllVSGeneratedMSDeployParameter) And Exists($(_WebConfigsToTransformForAzureAuthenticationOutputParametersFile))" > |
|||
<Output TaskParameter="Result" ItemName="_ImportAutoParameterizeAzureAuthenticationWebConfig"/> |
|||
</ImportParametersFile> |
|||
|
|||
<ItemGroup> |
|||
<MsDeployDeclareParameters Include="@(_ImportAutoParameterizeAzureAuthenticationWebConfig)" Condition="'%(_ImportAutoParameterizeAzureAuthenticationWebConfig.Identity)' !=''"> |
|||
<Value>%(_ImportAutoParameterizeAzureAuthenticationWebConfig.DefaultValue)</Value> |
|||
<Priority>$(VsWebConfigAutoCsParametersPriority)</Priority> |
|||
</MsDeployDeclareParameters> |
|||
</ItemGroup> |
|||
</Target> |
|||
|
|||
<!--********************************************************************--> |
|||
<!-- Commit parameterized web.config into pipeline so later phase will pick up--> |
|||
<!--********************************************************************--> |
|||
<Target Name="_PostTransformWebConfigForAzureAuthentication"> |
|||
<ItemGroup> |
|||
<!--Remove untransformed Web.configs from the pipeline--> |
|||
<FilesForPackagingFromProject Remove="@(_WebConfigsToTransformForAzureAuthentication)" Condition="'@(_WebConfigsToTransformForAzureAuthentication)'!='' And !%(_WebConfigsToTransformForAzureAuthentication.Exclude) And Exists(%(_WebConfigsToTransformForAzureAuthentication.TransformOutputFile))"/> |
|||
<!--Add the transformed Web.configs at the new loction to the pipeline--> |
|||
<FilesForPackagingFromProject Include="@(_WebConfigsToTransformForAzureAuthentication->'%(TransformOutputFile)')" Condition="'@(_WebConfigsToTransformForAzureAuthentication)'!='' And !%(_WebConfigsToTransformForAzureAuthentication.Exclude) And Exists(%(_WebConfigsToTransformForAzureAuthentication.TransformOutputFile))"/> |
|||
</ItemGroup> |
|||
</Target> |
|||
|
|||
<PropertyGroup> |
|||
<_TransformWebConfigForAzureAuthenticationDependsOn> |
|||
_TransformWebConfigForAzureAuthenticationCore; |
|||
_PostTransformWebConfigForAzureAuthentication; |
|||
</_TransformWebConfigForAzureAuthenticationDependsOn> |
|||
</PropertyGroup> |
|||
|
|||
<!--********************************************************************--> |
|||
<!-- Entry point of parameterizing web.config containing Win Azure Active Directory (WAAD) related artifacts --> |
|||
<!--********************************************************************--> |
|||
<Target Name="_TransformWebConfigForAzureAuthentication" |
|||
DependsOnTargets="$(_TransformWebConfigForAzureAuthenticationDependsOn)" |
|||
Condition="('$(WebPublishMethod)' =='MsDeploy' or '$(WebPublishMethod)' =='Package') and '$(EnableADPublish)' =='true'"> |
|||
</Target> |
|||
|
|||
</Project> |
|||
Binary file not shown.
@ -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> |
|||
@ -0,0 +1,101 @@ |
|||
[cmdletbinding(SupportsShouldProcess=$true)] |
|||
param($publishProperties, $packOutput, $nugetUrl) |
|||
|
|||
# to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327 |
|||
$publishModuleVersion = '1.0.1' |
|||
function Get-VisualStudio2015InstallPath{ |
|||
[cmdletbinding()] |
|||
param() |
|||
process{ |
|||
$keysToCheck = @('hklm:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0', |
|||
'hklm:\SOFTWARE\Microsoft\VisualStudio\14.0', |
|||
'hklm:\SOFTWARE\Wow6432Node\Microsoft\VWDExpress\14.0', |
|||
'hklm:\SOFTWARE\Microsoft\VWDExpress\14.0' |
|||
) |
|||
[string]$vsInstallPath=$null |
|||
|
|||
foreach($keyToCheck in $keysToCheck){ |
|||
if(Test-Path $keyToCheck){ |
|||
$vsInstallPath = (Get-itemproperty $keyToCheck -Name InstallDir -ErrorAction SilentlyContinue | select -ExpandProperty InstallDir -ErrorAction SilentlyContinue) |
|||
} |
|||
|
|||
if($vsInstallPath){ |
|||
break; |
|||
} |
|||
} |
|||
|
|||
$vsInstallPath |
|||
} |
|||
} |
|||
|
|||
$vsInstallPath = Get-VisualStudio2015InstallPath |
|||
$publishModulePath = "{0}Extensions\Microsoft\Web Tools\Publish\Scripts\{1}\" -f $vsInstallPath,'1.0.1' |
|||
|
|||
if(!(Test-Path $publishModulePath)){ |
|||
$publishModulePath = "{0}VWDExpressExtensions\Microsoft\Web Tools\Publish\Scripts\{1}\" -f $vsInstallPath,'1.0.1' |
|||
} |
|||
|
|||
$defaultPublishSettings = New-Object psobject -Property @{ |
|||
LocalInstallDir = $publishModulePath |
|||
} |
|||
|
|||
function Enable-PackageDownloader{ |
|||
[cmdletbinding()] |
|||
param( |
|||
$toolsDir = "$env:LOCALAPPDATA\Microsoft\Web Tools\Publish\package-downloader-$publishModuleVersion\", |
|||
$pkgDownloaderDownloadUrl = 'http://go.microsoft.com/fwlink/?LinkId=524325') # package-downloader.psm1 |
|||
process{ |
|||
if(get-module package-downloader){ |
|||
remove-module package-downloader | Out-Null |
|||
} |
|||
|
|||
if(!(get-module package-downloader)){ |
|||
if(!(Test-Path $toolsDir)){ New-Item -Path $toolsDir -ItemType Directory -WhatIf:$false } |
|||
|
|||
$expectedPath = (Join-Path ($toolsDir) 'package-downloader.psm1') |
|||
if(!(Test-Path $expectedPath)){ |
|||
'Downloading [{0}] to [{1}]' -f $pkgDownloaderDownloadUrl,$expectedPath | Write-Verbose |
|||
(New-Object System.Net.WebClient).DownloadFile($pkgDownloaderDownloadUrl, $expectedPath) |
|||
} |
|||
|
|||
if(!$expectedPath){throw ('Unable to download package-downloader.psm1')} |
|||
|
|||
'importing module [{0}]' -f $expectedPath | Write-Output |
|||
Import-Module $expectedPath -DisableNameChecking -Force |
|||
} |
|||
} |
|||
} |
|||
|
|||
function Enable-PublishModule{ |
|||
[cmdletbinding()] |
|||
param() |
|||
process{ |
|||
if(get-module publish-module){ |
|||
remove-module publish-module | Out-Null |
|||
} |
|||
|
|||
if(!(get-module publish-module)){ |
|||
$localpublishmodulepath = Join-Path $defaultPublishSettings.LocalInstallDir 'publish-module.psm1' |
|||
if(Test-Path $localpublishmodulepath){ |
|||
'importing module [publish-module="{0}"] from local install dir' -f $localpublishmodulepath | Write-Verbose |
|||
Import-Module $localpublishmodulepath -DisableNameChecking -Force |
|||
$true |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
try{ |
|||
|
|||
if (!(Enable-PublishModule)){ |
|||
Enable-PackageDownloader |
|||
Enable-NuGetModule -name 'publish-module' -version $publishModuleVersion -nugetUrl $nugetUrl |
|||
} |
|||
|
|||
'Calling Publish-AspNet' | Write-Verbose |
|||
# call Publish-AspNet to perform the publish operation |
|||
Publish-AspNet -publishProperties $publishProperties -packOutput $packOutput |
|||
} |
|||
catch{ |
|||
"An error occurred during publish.`n{0}" -f $_.Exception.Message | Write-Error |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<?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>FileSystem</WebPublishMethod> |
|||
<WebRoot>wwwroot</WebRoot> |
|||
<publishUrl>$(OutDir)\$(Configuration)\PublishOutput</publishUrl> |
|||
<DeleteExistingFiles>False</DeleteExistingFiles> |
|||
</PropertyGroup> |
|||
</Project> |
|||
@ -0,0 +1,13 @@ |
|||
<?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>Package</WebPublishMethod> |
|||
<WebRoot>wwwroot</WebRoot> |
|||
<DesktopBuildPackageLocation>$(OutDir)\$(Configuration)\MSDeployPackage\$(MSBuildProjectName).zip</DesktopBuildPackageLocation> |
|||
<DeployIisAppPath>Default Web Site</DeployIisAppPath> |
|||
</PropertyGroup> |
|||
</Project> |
|||
@ -0,0 +1,658 @@ |
|||
[cmdletbinding(SupportsShouldProcess=$true)] |
|||
param() |
|||
|
|||
$script:AspNetPublishHandlers = @{} |
|||
|
|||
$global:AspNetPublishSettings = New-Object -TypeName PSCustomObject @{ |
|||
MsdeployDefaultProperties = @{ |
|||
'MSDeployUseChecksum'=$false |
|||
'WebRoot'='wwwroot' |
|||
'SkipExtraFilesOnServer'=$true |
|||
'retryAttempts' = 2 |
|||
'EnableMSDeployBackup' = $false |
|||
'DeleteExistingFiles' = $false |
|||
'MSDeployPackageContentFoldername'='website\' |
|||
} |
|||
} |
|||
|
|||
function Register-AspnetPublishHandler{ |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory=$true,Position=0)] |
|||
$name, |
|||
[Parameter(Mandatory=$true,Position=1)] |
|||
[ScriptBlock]$handler, |
|||
[switch]$force |
|||
) |
|||
process{ |
|||
if(!($script:AspNetPublishHandlers[$name]) -or $force ){ |
|||
'Adding handler for [{0}]' -f $name | Write-Verbose |
|||
$script:AspNetPublishHandlers[$name] = $handler |
|||
} |
|||
elseif(!($force)){ |
|||
'Ignoring call to Register-AspnetPublishHandler for [name={0}], because a handler with that name exists and -force was not passed.' -f $name | Write-Verbose |
|||
} |
|||
} |
|||
} |
|||
|
|||
function Get-AspnetPublishHandler{ |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory=$true,Position=0)] |
|||
$name |
|||
) |
|||
process{ |
|||
$foundHandler = $script:AspNetPublishHandlers[$name] |
|||
|
|||
if(!$foundHandler){ |
|||
throw ('AspnetPublishHandler with name "{0}" was not found' -f $name) |
|||
} |
|||
|
|||
$foundHandler |
|||
} |
|||
} |
|||
|
|||
function GetInternal-ExcludeFilesArg{ |
|||
[cmdletbinding()] |
|||
param( |
|||
$publishProperties |
|||
) |
|||
process{ |
|||
$excludeFiles = $publishProperties['ExcludeFiles'] |
|||
foreach($exclude in $excludeFiles){ |
|||
if($exclude){ |
|||
[string]$objName = $exclude['objectname'] |
|||
|
|||
if([string]::IsNullOrEmpty($objName)){ |
|||
$objName = 'filePath' |
|||
} |
|||
|
|||
$excludePath = $exclude['absolutepath'] |
|||
|
|||
# output the result to the return list |
|||
('-skip:objectName={0},absolutePath={1}' -f $objName, $excludePath) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
function GetInternal-ReplacementsMSDeployArgs{ |
|||
[cmdletbinding()] |
|||
param( |
|||
$publishProperties |
|||
) |
|||
process{ |
|||
foreach($replace in ($publishProperties['Replacements'])){ |
|||
if($replace){ |
|||
$typeValue = $replace['type'] |
|||
if(!$typeValue){ $typeValue = 'TextFile' } |
|||
|
|||
$file = $replace['file'] |
|||
$match = $replace['match'] |
|||
$newValue = $replace['newValue'] |
|||
|
|||
if($file -and $match -and $newValue){ |
|||
$setParam = ('-setParam:type={0},scope={1},match={2},value={3}' -f $typeValue,$file, $match,$newValue) |
|||
'Adding setparam [{0}]' -f $setParam | Write-Verbose |
|||
|
|||
# return it |
|||
$setParam |
|||
} |
|||
else{ |
|||
'Skipping replacement because its missing a required value.[file="{0}",match="{1}",newValue="{2}"]' -f $file,$match,$newValue | Write-Verbose |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
<# |
|||
.SYNOPSIS |
|||
Returns an array of msdeploy arguments that are used across different providers. |
|||
For example this wil handle useChecksum, appOffline, etc. |
|||
This will also add default properties if they are missing. |
|||
#> |
|||
function GetInternal-SharedMSDeployParametersFrom{ |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory=$true,Position=0)] |
|||
$publishProperties |
|||
) |
|||
process{ |
|||
$sharedArgs = New-Object psobject -Property @{ |
|||
ExtraArgs = @() |
|||
DestFragment = '' |
|||
} |
|||
|
|||
# add default properties if they are missing |
|||
foreach($propName in $global:AspNetPublishSettings.MsdeployDefaultProperties.Keys){ |
|||
if($publishProperties["$propName"] -eq $null){ |
|||
$defValue = $global:AspNetPublishSettings.MsdeployDefaultProperties["$propName"] |
|||
'Adding default property to publishProperties ["{0}"="{1}"]' -f $propName,$defValue | Write-Verbose |
|||
$publishProperties["$propName"] = $defValue |
|||
} |
|||
} |
|||
|
|||
if($publishProperties['MSDeployUseChecksum'] -eq $true){ |
|||
$sharedArgs.ExtraArgs += '-usechecksum' |
|||
} |
|||
|
|||
if($publishProperties['WebPublishMethod'] -eq 'MSDeploy'){ |
|||
$offlineArgs = GetInternal-PublishAppOfflineProperties -publishProperties $publishProperties |
|||
$sharedArgs.ExtraArgs += $offlineArgs.AdditionalArguments |
|||
$sharedArgs.DestFragment += $offlineArgs.DestFragment |
|||
|
|||
if($publishProperties['SkipExtraFilesOnServer'] -eq $true){ |
|||
$sharedArgs.ExtraArgs += '-enableRule:DoNotDeleteRule' |
|||
} |
|||
} |
|||
|
|||
if($publishProperties['WebPublishMethod'] -eq 'FileSystem'){ |
|||
if($publishProperties['DeleteExistingFiles'] -eq $false){ |
|||
$sharedArgs.ExtraArgs += '-enableRule:DoNotDeleteRule' |
|||
} |
|||
} |
|||
|
|||
if($publishProperties['retryAttempts']){ |
|||
$sharedArgs.ExtraArgs += ('-retryAttempts:{0}' -f ([int]$publishProperties['retryAttempts'])) |
|||
} |
|||
|
|||
if($publishProperties['EncryptWebConfig'] -eq $true){ |
|||
$sharedArgs.ExtraArgs += '-EnableRule:EncryptWebConfig' |
|||
} |
|||
|
|||
if($publishProperties['EnableMSDeployBackup'] -eq $false){ |
|||
$sharedArgs.ExtraArgs += '-disablerule:BackupRule' |
|||
} |
|||
|
|||
# add excludes |
|||
$sharedArgs.ExtraArgs += (GetInternal-ExcludeFilesArg -publishProperties $publishProperties) |
|||
# add replacements |
|||
$sharedArgs.ExtraArgs += (GetInternal-ReplacementsMSDeployArgs -publishProperties $publishProperties) |
|||
|
|||
# return the args |
|||
$sharedArgs |
|||
} |
|||
} |
|||
|
|||
<# |
|||
.SYNOPSIS |
|||
This will publish the folder based on the properties in $publishProperties |
|||
|
|||
.EXAMPLE |
|||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|||
'WebPublishMethod'='MSDeploy' |
|||
'MSDeployServiceURL'='contoso.scm.azurewebsites.net:443';` |
|||
'DeployIisAppPath'='contoso';'Username'='$contoso';'Password'="$env:PublishPwd"} |
|||
|
|||
.EXAMPLE |
|||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|||
'WebPublishMethod'='FileSystem' |
|||
'publishUrl'="$publishDest" |
|||
} |
|||
|
|||
.EXAMPLE |
|||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|||
'WebPublishMethod'='MSDeploy' |
|||
'MSDeployServiceURL'='contoso.scm.azurewebsites.net:443';` |
|||
'DeployIisAppPath'='contoso';'Username'='$contoso';'Password'="$env:PublishPwd" |
|||
'ExcludeFiles'=@( |
|||
@{'absolutepath'='wwwroot\\test.txt'}, |
|||
@{'absolutepath'='wwwroot\\_references.js'} |
|||
)} |
|||
|
|||
.EXAMPLE |
|||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|||
'WebPublishMethod'='FileSystem' |
|||
'publishUrl'="$publishDest" |
|||
'ExcludeFiles'=@( |
|||
@{'absolutepath'='wwwroot\\test.txt'}, |
|||
@{'absolutepath'='wwwroot\\_references.js'}) |
|||
'Replacements' = @( |
|||
@{'file'='test.txt$';'match'='REPLACEME';'newValue'='updatedValue'}) |
|||
} |
|||
|
|||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|||
'WebPublishMethod'='FileSystem' |
|||
'publishUrl'="$publishDest" |
|||
'ExcludeFiles'=@( |
|||
@{'absolutepath'='wwwroot\\test.txt'}, |
|||
@{'absolutepath'='c:\\full\\path\\ok\\as\\well\\_references.js'}) |
|||
'Replacements' = @( |
|||
@{'file'='test.txt$';'match'='REPLACEME';'newValue'='updatedValue'}) |
|||
} |
|||
|
|||
.EXAMPLE |
|||
Publish-AspNet -packOutput $packOutput -publishProperties @{ |
|||
'WebPublishMethod'='FileSystem' |
|||
'publishUrl'="$publishDest" |
|||
'EnableMSDeployAppOffline'='true' |
|||
'AppOfflineTemplate'='offline-template.html' |
|||
'MSDeployUseChecksum'='true' |
|||
} |
|||
#> |
|||
function Publish-AspNet{ |
|||
[cmdletbinding(SupportsShouldProcess=$true)] |
|||
param( |
|||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|||
$publishProperties, |
|||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|||
$packOutput |
|||
) |
|||
process{ |
|||
if($publishProperties['WebPublishMethodOverride']){ |
|||
'Overriding publish method from $publishProperties[''WebPublishMethodOverride''] to [{0}]' -f ($publishProperties['WebPublishMethodOverride']) | Write-Verbose |
|||
$publishProperties['WebPublishMethod'] = $publishProperties['WebPublishMethodOverride'] |
|||
} |
|||
|
|||
if(!([System.IO.Path]::IsPathRooted($packOutput))){ |
|||
$packOutput = [System.IO.Path]::GetFullPath((Join-Path $pwd $packOutput)) |
|||
} |
|||
|
|||
$pubMethod = $publishProperties['WebPublishMethod'] |
|||
'Publishing with publish method [{0}]' -f $pubMethod | Write-Output |
|||
|
|||
# get the handler based on WebPublishMethod, and call it. |
|||
&(Get-AspnetPublishHandler -name $pubMethod) $publishProperties $packOutput |
|||
} |
|||
} |
|||
|
|||
function Publish-AspNetMSDeploy{ |
|||
[cmdletbinding(SupportsShouldProcess=$true)] |
|||
param( |
|||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|||
$publishProperties, |
|||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|||
$packOutput |
|||
) |
|||
process{ |
|||
if($publishProperties){ |
|||
$publishPwd = $publishProperties['Password'] |
|||
|
|||
<# |
|||
"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" |
|||
-source:IisApp='C:\Users\contoso\AppData\Local\Temp\AspNetPublish\WebApplication1\wwwroot' |
|||
-dest:IisApp='vramak4',ComputerName='https://contoso.scm.azurewebsites.net/msdeploy.axd',UserName='$contoso',Password='<PWD>',IncludeAcls='False',AuthType='Basic' |
|||
-verb:sync |
|||
-enableRule:DoNotDeleteRule |
|||
-enableLink:contentLibExtension |
|||
-retryAttempts=2 |
|||
-userAgent="VS14.0:PublishDialog:WTE14.0.51027.0" |
|||
#> |
|||
|
|||
$sharedArgs = GetInternal-SharedMSDeployParametersFrom -publishProperties $publishProperties |
|||
|
|||
# WebRoot is a required property which has a default |
|||
$webroot = $publishProperties['WebRoot'] |
|||
|
|||
$webrootOutputFolder = (get-item (Join-Path $packOutput $webroot)).FullName |
|||
$publishArgs = @() |
|||
$publishArgs += ('-source:IisApp=''{0}''' -f "$webrootOutputFolder") |
|||
$publishArgs += ('-dest:IisApp=''{0}'',ComputerName=''{1}'',UserName=''{2}'',Password=''{3}'',IncludeAcls=''False'',AuthType=''Basic''{4}' -f |
|||
$publishProperties['DeployIisAppPath'], |
|||
(Get-MSDeployFullUrlFor -msdeployServiceUrl $publishProperties['MSDeployServiceURL']), |
|||
$publishProperties['UserName'], |
|||
$publishPwd, |
|||
$sharedArgs.DestFragment) |
|||
$publishArgs += '-verb:sync' |
|||
$publishArgs += '-enableLink:contentLibExtension' |
|||
$publishArgs += $sharedArgs.ExtraArgs |
|||
|
|||
$command = '"{0}" {1}' -f (Get-MSDeploy),($publishArgs -join ' ') |
|||
|
|||
if (! [String]::IsNullOrEmpty($publishPwd)) { |
|||
$command.Replace($publishPwd,'{PASSWORD-REMOVED-FROM-LOG}') | Print-CommandString |
|||
} |
|||
Execute-Command -exePath (Get-MSDeploy) -arguments ($publishArgs -join ' ') |
|||
} |
|||
else{ |
|||
throw 'publishProperties is empty, cannot publish' |
|||
} |
|||
} |
|||
} |
|||
|
|||
function Escape-TextForRegularExpressions{ |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Position=0,Mandatory=$true)] |
|||
[string]$text |
|||
) |
|||
process{ |
|||
# TODO: Get code from EscapeTextForRegularExpressions task |
|||
$text.Replace('\','\\') |
|||
} |
|||
} |
|||
|
|||
function Publish-AspNetMSDeployPackage{ |
|||
[cmdletbinding(SupportsShouldProcess=$true)] |
|||
param( |
|||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|||
$publishProperties, |
|||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|||
$packOutput |
|||
) |
|||
process{ |
|||
if($publishProperties){ |
|||
$packageDestFilepah = $publishProperties['DesktopBuildPackageLocation'] |
|||
|
|||
if(!$packageDestFilepah){ |
|||
throw ('The package destination property (DesktopBuildPackageLocation) was not found in the publish properties') |
|||
} |
|||
|
|||
if(!([System.IO.Path]::IsPathRooted($packageDestFilepah))){ |
|||
$packageDestFilepah = [System.IO.Path]::GetFullPath((Join-Path $pwd $packageDestFilepah)) |
|||
} |
|||
|
|||
# if the dir doesn't exist create it |
|||
$pkgDir = ((new-object -typename System.IO.FileInfo($packageDestFilepah)).Directory) |
|||
if(!($pkgDir.Exists)) { |
|||
$pkgDir.Create() | Out-Null |
|||
} |
|||
|
|||
<# |
|||
"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" |
|||
-source:IisApp='C:\Users\contoso\AppData\Local\Temp\AspNetPublish\WebApplication1\wwwroot' |
|||
-dest:package=c:\temp\path\contosoweb.zip |
|||
-verb:sync |
|||
-enableRule:DoNotDeleteRule |
|||
-enableLink:contentLibExtension |
|||
-retryAttempts=2 |
|||
#> |
|||
|
|||
$sharedArgs = GetInternal-SharedMSDeployParametersFrom -publishProperties $publishProperties |
|||
|
|||
# WebRoot is a required property which has a default |
|||
$webroot = $publishProperties['WebRoot'] |
|||
|
|||
$webrootOutputFolder = (get-item (Join-Path $packOutput $webroot)).FullName |
|||
$publishArgs = @() |
|||
$publishArgs += ('-source:IisApp=''{0}''' -f "$webrootOutputFolder") |
|||
$publishArgs += ('-dest:package=''{0}''' -f $packageDestFilepah) |
|||
$publishArgs += '-verb:sync' |
|||
$publishArgs += '-enableLink:contentLibExtension' |
|||
$packageContentFolder = $publishProperties['MSDeployPackageContentFoldername'] |
|||
if(!$packageContentFolder){ $packageContentFolder = 'website' } |
|||
$publishArgs += ('-replace:match=''{0}'',replace=''{1}''' -f (Escape-TextForRegularExpressions $packOutput), $packageContentFolder ) |
|||
$publishArgs += $sharedArgs.ExtraArgs |
|||
|
|||
$command = '"{0}" {1}' -f (Get-MSDeploy),($publishArgs -join ' ') |
|||
$command | Print-CommandString |
|||
Execute-Command -exePath (Get-MSDeploy) -arguments ($publishArgs -join ' ') |
|||
} |
|||
else{ |
|||
throw 'publishProperties is empty, cannot publish' |
|||
} |
|||
} |
|||
} |
|||
|
|||
<# |
|||
.SYNOPSIS |
|||
If the passed in $publishProperties has values for appOffline the |
|||
needed arguments will be in the return object. If there is no such configuraion |
|||
then nothing is returned. |
|||
#> |
|||
function GetInternal-PublishAppOfflineProperties{ |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory=$true,Position=0)] |
|||
$publishProperties |
|||
) |
|||
process{ |
|||
$extraArg = ''; |
|||
$destFragment = '' |
|||
if($publishProperties['EnableMSDeployAppOffline'] -eq $true){ |
|||
$extraArg = '-enablerule:AppOffline' |
|||
|
|||
$appOfflineTemplate = $publishProperties['AppOfflineTemplate'] |
|||
if($appOfflineTemplate){ |
|||
$destFragment = (',appOfflineTemplate="{0}"' -f $appOfflineTemplate) |
|||
} |
|||
} |
|||
# return an object with both the properties that need to be in the command. |
|||
New-Object psobject -Property @{ |
|||
AdditionalArguments = $extraArg |
|||
DestFragment = $destFragment |
|||
} |
|||
} |
|||
} |
|||
|
|||
function Publish-AspNetFileSystem{ |
|||
[cmdletbinding(SupportsShouldProcess=$true)] |
|||
param( |
|||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|||
$publishProperties, |
|||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|||
$packOutput |
|||
) |
|||
process{ |
|||
$pubOut = $publishProperties['publishUrl'] |
|||
|
|||
if([string]::IsNullOrWhiteSpace($pubOut)){ |
|||
throw ('publishUrl is a required property for FileSystem publish but it was empty.') |
|||
} |
|||
|
|||
# if it's a relative path then update it to a full path |
|||
if(!([System.IO.Path]::IsPathRooted($pubOut))){ |
|||
$pubOut = [System.IO.Path]::GetFullPath((Join-Path $pwd $pubOut)) |
|||
$publishProperties['publishUrl'] = "$pubOut" |
|||
} |
|||
|
|||
'Publishing files to {0}' -f $pubOut | Write-Output |
|||
|
|||
# we use msdeploy.exe because it supports incremental publish/skips/replacements/etc |
|||
# msdeploy.exe -verb:sync -source:contentPath='C:\srcpath' -dest:contentPath='c:\destpath' |
|||
|
|||
$sharedArgs = GetInternal-SharedMSDeployParametersFrom -publishProperties $publishProperties |
|||
|
|||
$publishArgs = @() |
|||
$publishArgs += ('-source:contentPath=''{0}''' -f "$packOutput") |
|||
$publishArgs += ('-dest:contentPath=''{0}''{1}' -f "$pubOut",$sharedArgs.DestFragment) |
|||
$publishArgs += '-verb:sync' |
|||
$publishArgs += $sharedArgs.ExtraArgs |
|||
|
|||
$command = '"{0}" {1}' -f (Get-MSDeploy),($publishArgs -join ' ') |
|||
$command | Print-CommandString |
|||
Execute-Command -exePath (Get-MSDeploy) -arguments ($publishArgs -join ' ') |
|||
} |
|||
} |
|||
|
|||
|
|||
function Print-CommandString{ |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] |
|||
$command |
|||
) |
|||
process{ |
|||
'Executing command [{0}]' -f $command | Write-Output |
|||
} |
|||
} |
|||
|
|||
function Execute-CommandString{ |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] |
|||
[string[]]$command, |
|||
|
|||
[switch] |
|||
$useInvokeExpression, |
|||
|
|||
[switch] |
|||
$ignoreErrors |
|||
) |
|||
process{ |
|||
foreach($cmdToExec in $command){ |
|||
'Executing command [{0}]' -f $cmdToExec | Write-Verbose |
|||
if($useInvokeExpression){ |
|||
try { |
|||
Invoke-Expression -Command $cmdToExec |
|||
} |
|||
catch { |
|||
if(-not $ignoreErrors){ |
|||
$msg = ('The command [{0}] exited with exception [{1}]' -f $cmdToExec, $_.ToString()) |
|||
throw $msg |
|||
} |
|||
} |
|||
} |
|||
else { |
|||
cmd.exe /D /C $cmdToExec |
|||
|
|||
if(-not $ignoreErrors -and ($LASTEXITCODE -ne 0)){ |
|||
$msg = ('The command [{0}] exited with code [{1}]' -f $cmdToExec, $LASTEXITCODE) |
|||
throw $msg |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
function Execute-Command { |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|||
[String]$exePath, |
|||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|||
[String]$arguments |
|||
) |
|||
process{ |
|||
$psi = New-Object -TypeName System.Diagnostics.ProcessStartInfo |
|||
$psi.CreateNoWindow = $true |
|||
$psi.UseShellExecute = $false |
|||
$psi.RedirectStandardOutput = $true |
|||
$psi.RedirectStandardError=$true |
|||
$psi.FileName = $exePath |
|||
$psi.Arguments = $arguments |
|||
|
|||
$process = New-Object -TypeName System.Diagnostics.Process |
|||
$process.StartInfo = $psi |
|||
$process.EnableRaisingEvents=$true |
|||
|
|||
# Register the event handler for error |
|||
$stdErrEvent = Register-ObjectEvent -InputObject $process -EventName 'ErrorDataReceived' -Action { |
|||
if (! [String]::IsNullOrEmpty($EventArgs.Data)) { |
|||
$EventArgs.Data | Write-Error |
|||
} |
|||
} |
|||
|
|||
# Starting process. |
|||
[Void]$process.Start() |
|||
$process.BeginErrorReadLine() |
|||
$output = $process.StandardOutput.ReadToEnd() |
|||
[Void]$process.WaitForExit() |
|||
$output | Write-Output |
|||
|
|||
# UnRegister the event handler for error |
|||
Unregister-Event -SourceIdentifier $stdErrEvent.Name |
|||
} |
|||
} |
|||
|
|||
|
|||
function Get-MSDeploy{ |
|||
[cmdletbinding()] |
|||
param() |
|||
process{ |
|||
$installPath = $env:msdeployinstallpath |
|||
|
|||
if(!$installPath){ |
|||
$keysToCheck = @('hklm:\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3','hklm:\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2','hklm:\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1') |
|||
|
|||
foreach($keyToCheck in $keysToCheck){ |
|||
if(Test-Path $keyToCheck){ |
|||
$installPath = (Get-itemproperty $keyToCheck -Name InstallPath -ErrorAction SilentlyContinue | select -ExpandProperty InstallPath -ErrorAction SilentlyContinue) |
|||
} |
|||
|
|||
if($installPath){ |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
if(!$installPath){ |
|||
throw "Unable to find msdeploy.exe, please install it and try again" |
|||
} |
|||
|
|||
[string]$msdInstallLoc = (join-path $installPath 'msdeploy.exe') |
|||
|
|||
"Found msdeploy.exe at [{0}]" -f $msdInstallLoc | Write-Verbose |
|||
|
|||
$msdInstallLoc |
|||
} |
|||
} |
|||
|
|||
function Get-MSDeployFullUrlFor{ |
|||
[cmdletbinding()] |
|||
param($msdeployServiceUrl) |
|||
process{ |
|||
# Convert contoso.scm.azurewebsites.net:443 to https://contoso.scm.azurewebsites.net/msdeploy.axd |
|||
# TODO: This needs to be improved, it only works with Azure Websites currently. |
|||
'https://{0}/msdeploy.axd' -f $msdeployServiceUrl.TrimEnd(':443') |
|||
} |
|||
} |
|||
|
|||
function InternalRegister-AspNetKnownPublishHandlers{ |
|||
[cmdletbinding()] |
|||
param() |
|||
process{ |
|||
'Registering MSDeploy handler' | Write-Verbose |
|||
Register-AspnetPublishHandler -name 'MSDeploy' -force -handler { |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|||
$publishProperties, |
|||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|||
$packOutput |
|||
) |
|||
|
|||
Publish-AspNetMSDeploy -publishProperties $publishProperties -packOutput $packOutput |
|||
} |
|||
|
|||
'Registering MSDeploy package handler' | Write-Verbose |
|||
Register-AspnetPublishHandler -name 'Package' -force -handler { |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|||
$publishProperties, |
|||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|||
$packOutput |
|||
) |
|||
|
|||
Publish-AspNetMSDeployPackage -publishProperties $publishProperties -packOutput $packOutput |
|||
} |
|||
|
|||
'Registering FileSystem handler' | Write-Verbose |
|||
Register-AspnetPublishHandler -name 'FileSystem' -force -handler { |
|||
[cmdletbinding()] |
|||
param( |
|||
[Parameter(Mandatory = $true,Position=0,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] |
|||
$publishProperties, |
|||
[Parameter(Mandatory = $true,Position=1,ValueFromPipelineByPropertyName=$true)] |
|||
$packOutput |
|||
) |
|||
|
|||
Publish-AspNetFileSystem -publishProperties $publishProperties -packOutput $packOutput |
|||
} |
|||
} |
|||
} |
|||
|
|||
<# |
|||
.SYNOPSIS |
|||
Used for testing purposes only. |
|||
#> |
|||
function InternalReset-AspNetPublishHandlers{ |
|||
[cmdletbinding()] |
|||
param() |
|||
process{ |
|||
$script:AspNetPublishHandlers = @{} |
|||
InternalRegister-AspNetKnownPublishHandlers |
|||
} |
|||
} |
|||
|
|||
Export-ModuleMember -function Get-*,Publish-*,Register-*,Enable-* |
|||
if($env:IsDeveloperMachine){ |
|||
# you can set the env var to expose all functions to importer. easy for development. |
|||
# this is required for executing pester test cases, it's set by build.ps1 |
|||
Export-ModuleMember -function * |
|||
} |
|||
|
|||
# register the handlers so that Publish-AspNet can be called |
|||
InternalRegister-AspNetKnownPublishHandlers |
|||
@ -0,0 +1,774 @@ |
|||
<!-- |
|||
*********************************************************************************************** |
|||
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> |
|||
<_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 |
|||
AssemblyAttributes="@(AssemblyAttributes)" |
|||
OutputDir="$([System.IO.Path]::GetDirectoryName($(_AssemblyInfoSource)))"> |
|||
<Output TaskParameter="Regenerated" PropertyName="_AssemblyInfoSourceIsUpdated"/> |
|||
</GenerateAssemblyInfo> |
|||
|
|||
<PropertyGroup > |
|||
<_GenerateAssemblyInfoDll>false</_GenerateAssemblyInfoDll> |
|||
<_GenerateAssemblyInfoDll Condition="'$(_AssemblyInfoSourceIsUpdated)' == 'true' or !Exists($(AssemblyInfoDll))">True</_GenerateAssemblyInfoDll> |
|||
</PropertyGroup> |
|||
|
|||
<MakeDir Condition="!Exists($(_AssemblyInfoDllDirectory))" Directories="$(_AssemblyInfoDllDirectory)" ContinueOnError="true" /> |
|||
|
|||
<Csc Condition="'$(_GenerateAssemblyInfoDll)'=='true'" |
|||
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> |
|||
<!-- 2.0 CLR --> |
|||
<AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' and '$(_WDPFrameworkLowerThan4)' == 'True' and '$(Platform)'=='x64'">$(windir)\Microsoft.NET\Framework64\v2.0.50727</AspnetCompilerPath> |
|||
<AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' and '$(_WDPFrameworkLowerThan4)' == 'True' ">$(Framework20Dir)</AspnetCompilerPath> |
|||
|
|||
<!-- 4.0 CLR --> |
|||
<AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' and '$(Platform)'=='x64' ">$(windir)\Microsoft.NET\Framework64\v4.0.30319</AspnetCompilerPath> |
|||
|
|||
<!-- Default value --> |
|||
<AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' " >$(Framework40Dir)</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> |
|||
Binary file not shown.
@ -0,0 +1,396 @@ |
|||
<!-- |
|||
*********************************************************************************************** |
|||
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--> |
|||
<PropertyGroup> |
|||
<AspNetTargetsPath Condition=" '$(AspNetTargetsPath)'=='' ">$(MSBuildThisFileDirectory)..\Web\</AspNetTargetsPath> |
|||
</PropertyGroup> |
|||
|
|||
<Import Project="$(AspNetTargetsPath)Microsoft.Web.Publishing.targets" Condition="Exists('$(AspNetTargetsPath)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> |
|||
|
|||
<!-- Instruct ResolveAssemblyReferences in MS.Common.targets to generate suggested binding redirects. --> |
|||
<PropertyGroup> |
|||
<AutoUnifyAssemblyReferences>false</AutoUnifyAssemblyReferences> |
|||
<AppConfig Condition="'$(AppConfig)' == '' And Exists('$(ProjectConfigFileName)')">$(ProjectConfigFileName)</AppConfig> |
|||
</PropertyGroup> |
|||
</Project> |
|||
Loading…
Reference in new issue