Skip to content

Commit ebcbb81

Browse files
committed
Update to latest version of output path design proposal
1 parent d4ec227 commit ebcbb81

File tree

5 files changed

+113
-93
lines changed

5 files changed

+113
-93
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.props

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Copyright (c) .NET Foundation. All rights reserved.
3434

3535

3636

37-
<!-- We need to put the UseStandardOutputPaths logic after the import of Directory.Build.props, but before the MSBuild Project Extensions .props import.
37+
<!-- We need to put the UseArtifactsOutput logic after the import of Directory.Build.props, but before the MSBuild Project Extensions .props import.
3838
However, both of these things happen in Microsoft.Common.props with no opportunity to insert logic in between them.
3939
4040
So what we do here is duplicate the Directory.Build.props import logic from Microsoft.Common.props, and then set ImportDirectoryBuildProps to
@@ -57,26 +57,32 @@ Copyright (c) .NET Foundation. All rights reserved.
5757
<ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
5858
</PropertyGroup>
5959

60-
<!-- Setting RootOutputPath automatically opts in to standard output paths -->
61-
<PropertyGroup Condition="'$(RootOutputPath)' != ''">
62-
<UseStandardOutputPaths Condition="'$(UseStandardOutputPaths)' == ''">true</UseStandardOutputPaths>
63-
<BaseStandardOutputPath>$(RootOutputPath)</BaseStandardOutputPath>
60+
<!-- Setting ArtifactsPath automatically opts in to the artifacts output format -->
61+
<PropertyGroup Condition="'$(ArtifactsPath)' != ''">
62+
<UseArtifactsOutput Condition="'$(UseArtifactsOutput)' == ''">true</UseArtifactsOutput>
6463
</PropertyGroup>
6564

66-
<!-- Set up base standard output folders if UseStandardOutputPaths is set -->
67-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' == 'true'">
68-
<UseStandardIntermediateOutput Condition="'$(UseStandardIntermediateOutput)' == ''">true</UseStandardIntermediateOutput>
69-
70-
<BaseStandardOutputPath Condition="'$(BaseStandardOutputPath)' == ''">bin\</BaseStandardOutputPath>
71-
<BaseStandardOutputPath>$([MSBuild]::EnsureTrailingSlash($(BaseStandardOutputPath)))</BaseStandardOutputPath>
65+
<!-- Set up base output folders if UseArtifactsOutput is set -->
66+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(ArtifactsPath)' == '' And '$(_DirectoryBuildPropsBasePath)' != ''">
67+
<!-- Default ArtifactsPath to be in the directory where Directory.Build.props is found
68+
Note that we do not append a backslash to the ArtifactsPath as we do with most paths, because it may be a global property passed in on the command-line which we can't easily change -->
69+
<ArtifactsPath>$(_DirectoryBuildPropsBasePath)\.artifacts</ArtifactsPath>
70+
<IncludeProjectNameInArtifactsPaths Condition="'$(IncludeProjectNameInArtifactsPaths)' == ''">true</IncludeProjectNameInArtifactsPaths>
71+
</PropertyGroup>
7272

73-
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">$(BaseStandardOutputPath)build\</BaseOutputPath>
74-
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(BaseStandardOutputPath)obj\</BaseIntermediateOutputPath>
73+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(ArtifactsPath)' == ''">
74+
<!-- If there was no Directory.Build.props file, then put the artifacts path in the project folder -->
75+
<ArtifactsPath>$(MSBuildProjectDirectory)\.artifacts</ArtifactsPath>
76+
</PropertyGroup>
7577

76-
<!-- If RootOutputPath is set, then projects share the BaseStandardOutputPath, and the project name should be appended to the output and
77-
intermediate output paths -->
78-
<BaseOutputPath Condition="'$(RootOutputPath)' != ''">$(BaseOutputPath)$(MSBuildProjectName)\</BaseOutputPath>
79-
<BaseIntermediateOutputPath Condition="'$(RootOutputPath)' != ''">$(BaseIntermediateOutputPath)$(MSBuildProjectName)\</BaseIntermediateOutputPath>
78+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'">
79+
<UseArtifactsIntermediateOutput Condition="'$(UseArtifactsIntermediateOutput)' == ''">true</UseArtifactsIntermediateOutput>
80+
<ArtifactsProjectName Condition="'$(ArtifactsProjectName)' == ''">$(MSBuildProjectName)</ArtifactsProjectName>
81+
</PropertyGroup>
82+
83+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(BaseIntermediateOutputPath)' == '' And '$(UseArtifactsIntermediateOutput)' == 'true'">
84+
<BaseIntermediateOutputPath Condition="'$(IncludeProjectNameInArtifactsPaths)' == 'true'">$(ArtifactsPath)\obj\$(ArtifactsProjectName)\</BaseIntermediateOutputPath>
85+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(ArtifactsPath)\obj\</BaseIntermediateOutputPath>
8086
</PropertyGroup>
8187

8288
<PropertyGroup Condition="'$(MSBuildProjectFullPath)' == '$(ProjectToOverrideProjectExtensionsPath)'">

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.DefaultOutputPaths.targets

Lines changed: 73 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,95 @@ Copyright (c) .NET Foundation. All rights reserved.
2525
<AppendTargetFrameworkToOutputPath Condition="'$(AppendTargetFrameworkToOutputPath)' == ''">true</AppendTargetFrameworkToOutputPath>
2626
</PropertyGroup>
2727

28-
<!-- NOTE: If we want to default UseStandardOutputPaths to true when targeting a given version of .NET or higher, this is where we would do it.
28+
<!-- NOTE: If we want to default UseArtifactsOutput to true when targeting a given version of .NET or higher, this is where we would do it.
2929
3030
It would look something like this:
3131
32-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' == '' and
32+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == '' and
3333
'$(TargetFrameworks)' == '' and
3434
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
3535
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 8.0))">
36-
<UseStandardOutputPaths>true</UseStandardOutputPaths>
36+
<UseArtifactsOutput>true</UseArtifactsOutput>
3737
</PropertyGroup>
3838
-->
3939

40-
<!-- Handle RootOutputPath and if it wasn't set in Sdk.props -->
41-
<PropertyGroup Condition="'$(RootOutputPath)' != ''">
42-
<UseStandardOutputPaths Condition="'$(UseStandardOutputPaths)' == ''">true</UseStandardOutputPaths>
43-
<BaseStandardOutputPath Condition="'$(BaseStandardOutputPath)' == ''">$(RootOutputPath)</BaseStandardOutputPath>
40+
<!-- Handle ArtifactsPath if it wasn't set in Sdk.props -->
41+
<PropertyGroup Condition="'$(ArtifactsPath)' != ''">
42+
<UseArtifactsOutput Condition="'$(UseArtifactsOutput)' == ''">true</UseArtifactsOutput>
4443
</PropertyGroup>
4544

46-
<!-- Set BaseOutputPath for standard output format if it wasn't set in Sdk.props -->
47-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' == 'true' And '$(BaseOutputPath)' == ''">
48-
<BaseStandardOutputPath Condition="'$(BaseStandardOutputPath)' == ''">bin\</BaseStandardOutputPath>
49-
<BaseStandardOutputPath>$([MSBuild]::EnsureTrailingSlash($(BaseStandardOutputPath)))</BaseStandardOutputPath>
45+
<!-- Repeat ArtifactsPath logic from Sdk.props here, in case UseArtifactsOutput was set in the project file -->
46+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(ArtifactsPath)' == '' And '$(_DirectoryBuildPropsBasePath)' != ''">
47+
<!-- Default ArtifactsPath to be in the directory where Directory.Build.props is found
48+
Note that we do not append a backslash to the ArtifactsPath as we do with most paths, because it may be a global property passed in on the command-line which we can't easily change -->
49+
<ArtifactsPath>$(_DirectoryBuildPropsBasePath)\.artifacts</ArtifactsPath>
50+
<IncludeProjectNameInArtifactsPaths Condition="'$(IncludeProjectNameInArtifactsPaths)' == ''">true</IncludeProjectNameInArtifactsPaths>
51+
</PropertyGroup>
52+
53+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(ArtifactsPath)' == ''">
54+
<!-- If there was no Directory.Build.props file, then put the artifacts path in the project folder -->
55+
<ArtifactsPath>$(MSBuildProjectDirectory)\.artifacts</ArtifactsPath>
56+
</PropertyGroup>
57+
58+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'">
59+
<ArtifactsProjectName Condition="'$(ArtifactsProjectName)' == ''">$(MSBuildProjectName)</ArtifactsProjectName>
60+
61+
<ArtifactsBinOutputName Condition="'$(ArtifactsBinOutputName)' == ''">bin</ArtifactsBinOutputName>
62+
<ArtifactsPublishOutputName Condition="'$(ArtifactsPublishOutputName)' == ''">publish</ArtifactsPublishOutputName>
63+
<ArtifactsPackageOutputName Condition="'$(ArtifactsPackageOutputName)' == ''">package</ArtifactsPackageOutputName>
64+
65+
<!-- ArtifactsPivots instead? -->
66+
<ArtifactsPivots>$(Configuration.ToLowerInvariant())</ArtifactsPivots>
67+
68+
<!-- Include the TargetFramework in the pivots if the project is multi-targeted (ie TargetFrameworks) is defined -->
69+
<ArtifactsPivots Condition="'$(TargetFrameworks)' != ''"
70+
>$(ArtifactsPivots)_$(TargetFramework.ToLowerInvariant())</ArtifactsPivots>
71+
72+
<!-- This targets file is evaluated before RuntimeIdentifierInference.targets, so this will only include the
73+
RuntimeIdentifier in the path if it was explicitly specified, not if it was inferred. This is the
74+
behavior we want.
5075
51-
<BaseOutputPath>$(BaseStandardOutputPath)build\</BaseOutputPath>
76+
The BlazorWebAssembly .props file sets the RuntimeIdentifier to blazor-wasm, so treat that as a special case.
77+
-->
78+
<ArtifactsPivots Condition="'$(RuntimeIdentifier)' != '' And !('$(RuntimeIdentifier)' == 'browser-wasm' And '$(AppendRuntimeIdentifierToOutputPath)' == 'false')"
79+
>$(ArtifactsPivots)_$(RuntimeIdentifier.ToLowerInvariant())</ArtifactsPivots>
80+
81+
</PropertyGroup>
5282

53-
<!-- If RootOutputPath is set, then projects share the BaseStandardOutputPath, and the project name should be appended to the output path -->
54-
<BaseOutputPath Condition="'$(RootOutputPath)' != ''">$(BaseOutputPath)$(MSBuildProjectName)\</BaseOutputPath>
83+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(IncludeProjectNameInArtifactsPaths)' == 'true'">
84+
<!-- Set artifacts paths when project name should be included in the path -->
85+
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">$(ArtifactsPath)\$(ArtifactsBinOutputName)\$(ArtifactsProjectName)\</BaseOutputPath>
86+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == '' And '$(UseArtifactsIntermediateOutput)' == 'true'">$(ArtifactsPath)\obj\$(ArtifactsProjectName)\</BaseIntermediateOutputPath>
87+
<PublishDir Condition="'$(PublishDir)' == ''">$(ArtifactsPath)\$(ArtifactsPublishOutputName)\$(ArtifactsProjectName)\$(ArtifactsPivots)\</PublishDir>
5588
</PropertyGroup>
5689

57-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' != 'true'">
90+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true' And '$(IncludeProjectNameInArtifactsPaths)' != 'true'">
91+
<!-- Set artifacts paths when project name should not be included in the path -->
92+
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">$(ArtifactsPath)\$(ArtifactsBinOutputName)\</BaseOutputPath>
93+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == '' And '$(UseArtifactsIntermediateOutput)' == 'true'">$(ArtifactsPath)\obj\</BaseIntermediateOutputPath>
94+
<PublishDir Condition="'$(PublishDir)' == ''">$(ArtifactsPath)\$(ArtifactsPublishOutputName)\$(ArtifactsPivots)\</PublishDir>
95+
</PropertyGroup>
96+
97+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'">
98+
<OutputPath Condition="'$(OutputPath)' == ''">$(BaseOutputPath)$(ArtifactsPivots)\</OutputPath>
99+
<IntermediateOutputPath Condition=" $(IntermediateOutputPath) == '' And '$(UseArtifactsIntermediateOutput)' == 'true'">$(BaseIntermediateOutputPath)$(ArtifactsPivots)\</IntermediateOutputPath>
100+
101+
<!-- The package output path does not include the project name, and only includes the Configuration as a pivot -->
102+
<PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(ArtifactsPath)\$(ArtifactsPackageOutputName)\$(Configuration.ToLowerInvariant())\</PackageOutputPath>
103+
104+
</PropertyGroup>
105+
106+
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true'">
58107
<BaseOutputPath Condition="'$(BaseOutputPath)' == ''">bin\</BaseOutputPath>
59108
<BaseOutputPath Condition="!HasTrailingSlash('$(BaseOutputPath)')">$(BaseOutputPath)\</BaseOutputPath>
60109
<OutputPath Condition="'$(OutputPath)' == '' and '$(PlatformName)' == 'AnyCPU'">$(BaseOutputPath)$(Configuration)\</OutputPath>
61110
<OutputPath Condition="'$(OutputPath)' == '' and '$(PlatformName)' != 'AnyCPU'">$(BaseOutputPath)$(PlatformName)\$(Configuration)\</OutputPath>
62111
<OutputPath Condition="!HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
63112
</PropertyGroup>
64113

65-
<!-- If "UseStandardOutputPaths" wasn't set when the MSBuild project extensions .props files were imported, then use "obj" for the intermediate output path
66-
instead of $(BaseStandardOutputPath)\obj. To have the intermediate output path in the standard output folder, "UseStandardOutputPaths" should be set in Directory.Build.props-->
67-
<PropertyGroup Condition="'$(UseStandardIntermediateOutput)' != 'true'">
114+
<!-- If "UseArtifactsOutput" wasn't set when the MSBuild project extensions .props files were imported, then use "obj" in the project folder for the intermediate output path
115+
instead a folder under ArtifactsPath. To have the intermediate output path in the artifacts folder, "UseArtifactsOutput" should be set in Directory.Build.props-->
116+
<PropertyGroup Condition="'$(UseArtifactsIntermediateOutput)' != 'true'">
68117
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">obj\</BaseIntermediateOutputPath>
69118
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
70119
<IntermediateOutputPath Condition=" $(IntermediateOutputPath) == '' and '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
@@ -74,67 +123,32 @@ Copyright (c) .NET Foundation. All rights reserved.
74123

75124
<!-- Set the package output path (for nuget pack target) now, before the TargetFramework is appended -->
76125
<PropertyGroup Condition="'$(PackageOutputPath)' == ''">
77-
<PackageOutputPath Condition="'$(UseStandardOutputPaths)' != 'true'">$(OutputPath)</PackageOutputPath>
78-
<PackageOutputPath Condition="'$(UseStandardOutputPaths)' == 'true'">$(BaseStandardOutputPath)\package\$(Configuration.ToLowerInvariant())\</PackageOutputPath>
126+
<PackageOutputPath Condition="'$(UseArtifactsOutput)' != 'true'">$(OutputPath)</PackageOutputPath>
79127
</PropertyGroup>
80128

81129
<!-- Exclude files from OutputPath and IntermediateOutputPath from default item globs. Use the value
82130
of these properties before the TargetFramework is appended, so that if these values are specified
83131
in the project file, the specified value will be used for the exclude. -->
84-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' != 'true'">
132+
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true'">
85133
<DefaultItemExcludes>$(DefaultItemExcludes);$(OutputPath)/**</DefaultItemExcludes>
86134
<DefaultItemExcludes>$(DefaultItemExcludes);$(IntermediateOutputPath)/**</DefaultItemExcludes>
87135
</PropertyGroup>
88136

89-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' == 'true'">
90-
<DefaultItemExcludes>$(DefaultItemExcludes);$(BaseStandardOutputPath)/**</DefaultItemExcludes>
137+
<PropertyGroup Condition="'$(UseArtifactsOutput)' == 'true'">
138+
<DefaultItemExcludes>$(DefaultItemExcludes);$(ArtifactsPath)/**</DefaultItemExcludes>
91139
</PropertyGroup>
92140

93141
<!--
94142
Append $(TargetFramework) directory to output and intermediate paths to prevent bin clashes between
95143
targets.
96144
-->
97-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' != 'true' and
145+
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true' and
98146
'$(AppendTargetFrameworkToOutputPath)' == 'true' and '$(TargetFramework)' != '' and '$(_UnsupportedTargetFrameworkError)' != 'true'">
99147
<OutputPath>$(OutputPath)$(TargetFramework.ToLowerInvariant())\</OutputPath>
100148
</PropertyGroup>
101149

102-
<PropertyGroup Condition="'$(UseStandardIntermediateOutput)' != 'true' and
150+
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true' and
103151
'$(AppendTargetFrameworkToOutputPath)' == 'true' and '$(TargetFramework)' != '' and '$(_UnsupportedTargetFrameworkError)' != 'true'">
104152
<IntermediateOutputPath>$(IntermediateOutputPath)$(TargetFramework.ToLowerInvariant())\</IntermediateOutputPath>
105153
</PropertyGroup>
106-
107-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' == 'true'">
108-
<_ArtifactPivots>$(Configuration.ToLowerInvariant())</_ArtifactPivots>
109-
110-
<!-- Per the design, we should include the TargetFramework in the pivots if TargetFrameworks is defined, or if TargetFramework is a global property.
111-
However, basing this on whether TargetFramework is a global property currently breaks "dotnet pack": https://github.com/NuGet/Home/issues/12323
112-
Because of this, for now we will only include the TargetFramework in the pivots if TargetFrameworks is defined, and won't look at whether
113-
TargetFramework is a global property or not. -->
114-
<_ArtifactPivots Condition="'$(TargetFrameworks)' != ''"
115-
>$(_ArtifactPivots)_$(TargetFramework.ToLowerInvariant())</_ArtifactPivots>
116-
117-
<!-- This targets file is evaluated before RuntimeIdentifierInference.targets, so this will only include the
118-
RuntimeIdentifier in the path if it was explicitly specified, not if it was inferred. This is the
119-
behavior we want.
120-
121-
The BlazorWebAssembly .props file sets the RuntimeIdentifier to blazor-wasm, so treat that as a special case.
122-
-->
123-
124-
<_ArtifactPivots Condition="'$(RuntimeIdentifier)' != '' And !('$(RuntimeIdentifier)' == 'browser-wasm' And '$(AppendRuntimeIdentifierToOutputPath)' == 'false')"
125-
>$(_ArtifactPivots)_$(RuntimeIdentifier.ToLowerInvariant())</_ArtifactPivots>
126-
127-
<OutputPath Condition="'$(OutputPath)' == ''">$(BaseOutputPath)$(_ArtifactPivots)\</OutputPath>
128-
129-
<!-- Publish path -->
130-
<PublishDirName Condition="'$(PublishDirName)' == ''">publish</PublishDirName>
131-
132-
<PublishDir Condition="'$(PublishDir)' == '' And '$(RootOutputPath)' == ''">$(BaseStandardOutputPath)$(PublishDirName)\$(_ArtifactPivots)\</PublishDir>
133-
<PublishDir Condition="'$(PublishDir)' == '' And '$(RootOutputPath)' != ''">$(BaseStandardOutputPath)$(PublishDirName)\$(MSBuildProjectName)\$(_ArtifactPivots)\</PublishDir>
134-
135-
</PropertyGroup>
136-
137-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' == 'true' and '$(UseStandardIntermediateOutput)' == 'true'">
138-
<IntermediateOutputPath Condition=" $(IntermediateOutputPath) == '' ">$(BaseIntermediateOutputPath)$(_ArtifactPivots)\</IntermediateOutputPath>
139-
</PropertyGroup>
140154
</Project>

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ Copyright (c) .NET Foundation. All rights reserved.
302302
append a RID the user never mentioned in the path and do so even in the AnyCPU case.
303303
-->
304304
<PropertyGroup Condition="'$(AppendRuntimeIdentifierToOutputPath)' == 'true' and '$(RuntimeIdentifier)' != '' and '$(_UsingDefaultRuntimeIdentifier)' != 'true'">
305-
<IntermediateOutputPath Condition="'$(UseStandardIntermediateOutput)' != 'true'">$(IntermediateOutputPath)$(RuntimeIdentifier)\</IntermediateOutputPath>
306-
<OutputPath Condition="'$(UseStandardOutputPaths)' != 'true'">$(OutputPath)$(RuntimeIdentifier)\</OutputPath>
305+
<IntermediateOutputPath Condition="'$(UseArtifactsIntermediateOutput)' != 'true'">$(IntermediateOutputPath)$(RuntimeIdentifier)\</IntermediateOutputPath>
306+
<OutputPath Condition="'$(UseArtifactsOutput)' != 'true'">$(OutputPath)$(RuntimeIdentifier)\</OutputPath>
307307
</PropertyGroup>
308308

309309
<UsingTask TaskName="Microsoft.NET.Build.Tasks.GetDefaultPlatformTargetForNetFramework"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ Copyright (c) .NET Foundation. All rights reserved.
126126
</PropertyGroup>
127127

128128
<!-- Set PublishDir here, before Microsoft.Common.targets, to avoid a competing default there.
129-
If using standard output path format, PublishDir is already set in Microsoft.NET.DefaultOutputPaths.targets -->
130-
<PropertyGroup Condition="'$(UseStandardOutputPaths)' != 'true'">
129+
If using artifacts output path format, PublishDir is already set in Microsoft.NET.DefaultOutputPaths.targets -->
130+
<PropertyGroup Condition="'$(UseArtifactsOutput)' != 'true'">
131131
<PublishDirName Condition="'$(PublishDirName)' == ''">publish</PublishDirName>
132132
<!-- ensure the PublishDir is RID specific-->
133133
<PublishDir Condition="'$(PublishDir)' == '' and

0 commit comments

Comments
 (0)