2 ***********************************************************************************************
\r
3 Microsoft.NET.Sdk.Publish.TransformFiles.targets
\r
5 WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
\r
6 created a backup copy. Incorrect changes to this file will make it
\r
7 impossible to load or build your web deploy projects from the command-line or the IDE.
\r
9 This file defines the steps in the standard package/publish process for collecting only files to run the web appliation.
\r
11 Copyright (C) Microsoft Corporation. All rights reserved.
\r
12 ***********************************************************************************************
\r
14 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
\r
16 <UsingTask TaskName="TransformWebConfig" AssemblyFile="$(_PublishTaskAssemblyFullPath)"/>
\r
17 <UsingTask TaskName="TransformAppSettings" AssemblyFile="$(_PublishTaskAssemblyFullPath)"/>
\r
18 <UsingTask TaskName="GenerateEFSQLScripts" AssemblyFile="$(_PublishTaskAssemblyFullPath)"/>
\r
19 <UsingTask TaskName="GenerateRunCommandFile" AssemblyFile="$(_PublishTaskAssemblyFullPath)"/>
\r
22 <_DotNetPublishTransformFiles>
\r
23 _TransformWebConfig;
\r
24 _TransformAppSettings;
\r
25 _GenerateEFSQLScripts;
\r
26 _GenerateRunCommandFile;
\r
27 </_DotNetPublishTransformFiles>
\r
31 ***********************************************************************************************
\r
32 TARGET : _TransformWebConfig
\r
33 ***********************************************************************************************
\r
35 <Target Name="_TransformWebConfig">
\r
38 <_IsAspNetCoreProject Condition="%(ProjectCapability.Identity) == 'AspNetCore'">true</_IsAspNetCoreProject>
\r
39 <_IsPortable Condition=" '$(_IsPortable)' == '' And '$(RuntimeIdentifier)' != '' ">false</_IsPortable>
\r
40 <_IsPortable Condition=" '$(_IsPortable)' == ''">true</_IsPortable>
\r
41 <_ExecutableExtension Condition="'$(_ExecutableExtension)' == '' and $(RuntimeIdentifier.StartsWith('win'))">.exe</_ExecutableExtension>
\r
42 <_TransformWebConfigForAzure Condition=" '$(WEBSITE_SITE_NAME)' != '' Or '$(DOTNET_CONFIGURE_AZURE)' == 'true' Or '$(DOTNET_CONFIGURE_AZURE)' == '1'">true</_TransformWebConfigForAzure>
\r
47 Condition="'$(_IsAspNetCoreProject)' == 'true' And '$(IsTransformWebConfigDisabled)' != 'true'"
\r
48 TargetPath="$(TargetPath)"
\r
49 PublishDir="$(PublishIntermediateOutputPath)"
\r
50 IsPortable="$(_IsPortable)"
\r
51 ExecutableExtension="$(_ExecutableExtension)"
\r
52 IsAzure="$(_TransformWebConfigForAzure)"
\r
53 ProjectGuid="$(ProjectGuid)"
\r
54 IgnoreProjectGuid="$(IgnoreProjectGuid)"
\r
55 ProjectFullPath="$(MSBuildProjectFullPath)"
\r
56 SolutionPath ="$(SolutionPath)"/>
\r
60 ***********************************************************************************************
\r
61 TARGET : _TransformAppSettings
\r
62 ***********************************************************************************************
\r
65 <Target Name="_TransformAppSettings">
\r
67 <_IsAspNetCoreProject Condition="%(ProjectCapability.Identity) == 'AspNetCore'">true</_IsAspNetCoreProject>
\r
70 <TransformAppSettings
\r
71 Condition="'$(_IsAspNetCoreProject)' == 'true' And '$(IsTransformAppSettingsDisabled)' != 'true' And @(DestinationConnectionStrings) != ''"
\r
72 PublishDirectory="$(PublishIntermediateOutputPath)"
\r
73 ProjectDirectory="$(MSBuildProjectDirectory)"
\r
74 DestinationConnectionStrings="@(DestinationConnectionStrings)"
\r
75 SourceAppSettingsName="$(SourceAppSettingsName)"
\r
76 DestinationAppSettingsName ="$(DestinationAppSettingsName)"
\r
77 EnvironmentName="$(EnvironmentName)"/>
\r
81 ***********************************************************************************************
\r
82 TARGET : _GenerateEFSQLScripts
\r
83 ***********************************************************************************************
\r
86 <Target Name="_GenerateEFSQLScripts">
\r
88 <_IsAspNetCoreProject Condition="%(ProjectCapability.Identity) == 'AspNetCore'">true</_IsAspNetCoreProject>
\r
89 <_EFPublishDirectory Condition="'$(CopyEFSQLScriptsToOutputFolder)' == 'true'">$(PublishIntermediateOutputPath)</_EFPublishDirectory>
\r
90 <_EFPublishDirectory Condition="'$(_EFPublishDirectory)' == ''">$(PublishIntermediateTempPath)</_EFPublishDirectory>
\r
93 <GenerateEFSQLScripts
\r
94 Condition="'$(_IsAspNetCoreProject)' == 'true' And '$(IsGenerateEFSQLScriptsDisabled)' != 'true' And @(EfMigrations) != ''"
\r
95 ProjectDirectory="$(MSBuildProjectDirectory)"
\r
96 EFPublishDirectory="$(_EFPublishDirectory)"
\r
97 EFSQLScriptsFolderName="$(EFSQLScriptsFolderName)"
\r
98 EFMigrations="@(EFMigrations)"
\r
99 EFMigrationsAdditionalArgs="$(EFMigrationsAdditionalArgs)">
\r
100 <Output TaskParameter="EFSQLScripts" ItemName="_EFSQLScripts" />
\r
101 </GenerateEFSQLScripts>
\r
106 ***********************************************************************************************
\r
107 TARGET : _GenerateRunCommandFile
\r
108 ***********************************************************************************************
\r
110 <Target Name="_GenerateRunCommandFile">
\r
113 <_IsWebJobProject Condition="'$(_IsWebJobProject)' == '' and '$(WebJobName)' != '' and '$(WebJobType)' != ''">true</_IsWebJobProject>
\r
114 <_IsPortable Condition=" '$(_IsPortable)' == '' And '$(RuntimeIdentifier)' != '' ">false</_IsPortable>
\r
115 <_IsPortable Condition=" '$(_IsPortable)' == ''">true</_IsPortable>
\r
116 <_ExecutableExtension Condition="'$(_ExecutableExtension)' == '' and $(RuntimeIdentifier.StartsWith('win'))">.exe</_ExecutableExtension>
\r
119 <GenerateRunCommandFile
\r
120 Condition="'$(_IsWebJobProject)' == 'true' And '$(IsGenerateRunCommandFileDisabled)' != 'true'"
\r
121 ProjectDirectory="$(MSBuildProjectDirectory)"
\r
122 TargetPath="$(TargetPath)"
\r
123 WebJobsDirectory="$(PublishIntermediateOutputPath)\app_data\Jobs\$(WebJobType)\$(WebJobName)\"
\r
124 IsPortable="$(_IsPortable)"
\r
125 ExecutableExtension="$(_ExecutableExtension)" />
\r