5342ee4a1811c44b9ef5e447ba578d60364fb011
[platform/core/dotnet/build-tools.git] /
1 <!--\r
2 ***********************************************************************************************\r
3 Microsoft.NET.Sdk.Publish.ComputeFiles.targets\r
4 \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
8 \r
9 This file defines the steps in the standard package/publish process for collecting only files to run the web appliation.\r
10 \r
11 Copyright (C) Microsoft Corporation. All rights reserved.\r
12 ***********************************************************************************************\r
13 -->\r
14 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
15 \r
16   <!-- Only the compute target relevant to the project type will be invoked.  -->\r
17   <PropertyGroup>\r
18     <_DotNetPublishComputeFiles>\r
19       _DetermineProjectType;\r
20     </_DotNetPublishComputeFiles>\r
21   </PropertyGroup>\r
22 \r
23 \r
24   <!--***************************************************************-->\r
25   <!-- Target _DetermineProjectType                                  -->\r
26   <!--***************************************************************-->\r
27 \r
28   <Target Name="_DetermineProjectType" >\r
29     <PropertyGroup>\r
30       <_IsAspNetCoreProject Condition="%(ProjectCapability.Identity) == 'AspNetCore'">true</_IsAspNetCoreProject>\r
31       <_PublishProjectType Condition="'$(_PublishProjectType)' == '' and '$(_IsAspNetCoreProject)' == 'true' ">AspNetCore</_PublishProjectType>\r
32       <_PublishProjectType Condition="'$(_PublishProjectType)' == '' and '$(WebJobName)' != '' and '$(WebJobType)' != ''">WebJob</_PublishProjectType>\r
33       <_PublishProjectType Condition="'$(_PublishProjectType)' == '' ">UnKnown</_PublishProjectType>\r
34     </PropertyGroup>\r
35   </Target>\r
36 \r
37   <!--********************************************************************-->\r
38   <!-- This will ensure that all values have the required metadata        -->\r
39   <!--********************************************************************-->\r
40   <ItemDefinitionGroup>\r
41     <DotNetPublishFiles>\r
42       <DestinationRelativePath></DestinationRelativePath>\r
43       <Exclude>False</Exclude>\r
44     </DotNetPublishFiles>\r
45   </ItemDefinitionGroup>\r
46 \r
47 \r
48   <!--***************************************************************-->\r
49   <!-- Target _IncludePrePublishGeneratedContent                     -->\r
50   <!--***************************************************************-->\r
51   \r
52   <Target Name="_IncludePrePublishGeneratedContent" BeforeTargets="GetCopyToPublishDirectoryItems" Condition=" '$(EnableDefaultItems)' == 'true' And '$(EnableDefaultContentItems)' == 'true' ">\r
53     <ItemGroup>\r
54       <_WebProjectGeneratedContent Include="wwwroot\**" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(_ContentIncludedByDefault)" />\r
55       <ContentWithTargetPath Include="@(_WebProjectGeneratedContent)" TargetPath="%(Identity)" CopyToPublishDirectory="PreserveNewest" />\r
56     </ItemGroup>\r
57   </Target>\r
58   \r
59 </Project>\r