Skip to content

Commit d33b239

Browse files
committed
Apply suggestion from @baronfel
1 parent c3b4592 commit d33b239

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +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. -->
38+
<!-- Exclude PublishDir to prevent published artifacts from being included in subsequent builds/publishes.
39+
While in most cases PublishDir is contained within BaseOutputPath or BaseIntermediateOutputPath,
40+
this is by no means required, so we should protect against this happening here. -->
4041
<DefaultItemExcludes Condition="'$(PublishDir)' != ''">$(DefaultItemExcludes);$(PublishDir)/**</DefaultItemExcludes>
4142

4243
<!-- Various files that should generally always be ignored -->

0 commit comments

Comments
 (0)