2 ***********************************************************************************************
3 Microsoft.NET.Sdk.Publish.ComputeFiles.targets
5 WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
6 created a backup copy. Incorrect changes to this file will make it
7 impossible to load or build your web deploy projects from the command-line or the IDE.
9 This file defines the steps in the standard package/publish process for collecting only files to run the web appliation.
11 Copyright (C) Microsoft Corporation. All rights reserved.
12 ***********************************************************************************************
14 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
16 <!-- Only the compute target relevant to the project type will be invoked. -->
18 <_DotNetPublishComputeFiles>
19 _DetermineProjectType;
20 </_DotNetPublishComputeFiles>
24 <!--***************************************************************-->
25 <!-- Target _DetermineProjectType -->
26 <!--***************************************************************-->
28 <Target Name="_DetermineProjectType" >
30 <_IsAspNetCoreProject Condition="%(ProjectCapability.Identity) == 'AspNetCore'">true</_IsAspNetCoreProject>
31 <_PublishProjectType Condition="'$(_PublishProjectType)' == '' and '$(_IsAspNetCoreProject)' == 'true' ">AspNetCore</_PublishProjectType>
32 <_PublishProjectType Condition="'$(_PublishProjectType)' == '' and '$(WebJobName)' != '' and '$(WebJobType)' != ''">WebJob</_PublishProjectType>
33 <_PublishProjectType Condition="'$(_PublishProjectType)' == '' ">UnKnown</_PublishProjectType>
37 <!--********************************************************************-->
38 <!-- This will ensure that all values have the required metadata -->
39 <!--********************************************************************-->
42 <DestinationRelativePath></DestinationRelativePath>
43 <Exclude>False</Exclude>
45 </ItemDefinitionGroup>
48 <!--***************************************************************-->
49 <!-- Target _IncludePrePublishGeneratedContent -->
50 <!--***************************************************************-->
52 <Target Name="_IncludePrePublishGeneratedContent" BeforeTargets="GetCopyToPublishDirectoryItems" Condition=" '$(EnableDefaultItems)' == 'true' And '$(EnableDefaultContentItems)' == 'true' ">
54 <_WebProjectGeneratedContent Include="wwwroot\**" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(_ContentIncludedByDefault)" />
55 <ContentWithTargetPath Include="@(_WebProjectGeneratedContent)" TargetPath="%(Identity)" CopyToPublishDirectory="PreserveNewest" />