Skip to content

Commit 5fc4fa7

Browse files
Copilotatifaziz
andcommitted
fix: move BaseIntermediateOutputPath to Directory.Build.props to fix MSB3539 warning
The MSB3539 warning occurs because BaseIntermediateOutputPath and BaseOutputPath were being set in DocoptNet.csproj, which is too late in the MSBuild evaluation order. These properties must be set before Microsoft.Common.props is imported. Directory.Build.props is the correct location since it's imported early enough. Co-authored-by: atifaziz <20511+atifaziz@users.noreply.github.com>
1 parent 137336b commit 5fc4fa7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Directory.Build.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<Project>
22

3+
<!-- Roslyn 4.4 variant output paths must be set here (before Microsoft.Common.props)
4+
to avoid MSB3539 warning. See: https://go.microsoft.com/fwlink/?linkid=869650 -->
5+
<PropertyGroup Condition="'$(RoslynVersion)' == '4.4'">
6+
<BaseOutputPath>$(MSBuildProjectDirectory)/bin/roslyn4.4/</BaseOutputPath>
7+
<BaseIntermediateOutputPath>$(MSBuildProjectDirectory)/obj/roslyn4.4/</BaseIntermediateOutputPath>
8+
</PropertyGroup>
9+
310
<PropertyGroup>
411
<LangVersion>14</LangVersion>
512
<Nullable>enable</Nullable>

src/DocoptNet/DocoptNet.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
</PropertyGroup>
66

77
<PropertyGroup Condition="'$(RoslynVersion)' == '4.4'">
8-
<BaseOutputPath>$(_Roslyn44AnalyzerDir)</BaseOutputPath>
9-
<BaseIntermediateOutputPath>$(MSBuildProjectDirectory)/obj/roslyn4.4/</BaseIntermediateOutputPath>
108
<DefaultItemExcludes>$(DefaultItemExcludes);$(MSBuildProjectDirectory)/obj/**</DefaultItemExcludes>
119
<DefineConstants>$(DefineConstants);ROSLYN4_4</DefineConstants>
1210
</PropertyGroup>

0 commit comments

Comments
 (0)