File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed 
src/Tasks/Microsoft.NET.Build.Tasks/targets Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ Copyright (c) .NET Foundation. All rights reserved.
3535    <DefaultItemExcludes >$(DefaultItemExcludes);$(BaseOutputPath)/**</DefaultItemExcludes >
3636    <!--  obj folder, by default --> 
3737    <DefaultItemExcludes >$(DefaultItemExcludes);$(BaseIntermediateOutputPath)/**</DefaultItemExcludes >
38+     <!--  Exclude PublishDir to prevent published artifacts from being included in subsequent builds/publishes.
39+          This is especially important for file-based apps where PublishDir is set to ./artifacts/<appname> next to the app file. -->  
40+     <DefaultItemExcludes  Condition =" '$(PublishDir)' != ''" DefaultItemExcludes >
3841
3942    <!--  Various files that should generally always be ignored --> 
4043    <DefaultItemExcludes >$(DefaultItemExcludes);**/*.user</DefaultItemExcludes >
@@ -51,12 +54,6 @@ Copyright (c) .NET Foundation. All rights reserved.
5154    <DefaultExcludesInProjectFolder >$(DefaultExcludesInProjectFolder);$(DefaultItemExcludesInProjectFolder);**/.*/**</DefaultExcludesInProjectFolder >
5255  </PropertyGroup >
5356
54-   <!--  Exclude PublishDir to prevent published artifacts from being included in subsequent builds/publishes.
55-        This is especially important for file-based apps where PublishDir is set to ./artifacts/<appname> next to the app file. -->  
56-   <PropertyGroup  Condition =" '$(PublishDir)' != ''" 
57-     <DefaultItemExcludes >$(DefaultItemExcludes);$(PublishDir)/**</DefaultItemExcludes >
58-   </PropertyGroup >
59- 
6057  <!--  Set the default versions of the NETStandard.Library or Microsoft.NETCore.App packages to reference.
6158       The implicit package references themselves are defined in Microsoft.NET.Sdk.props, so that they can be overridden 
6259       in the project file. -->  
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments