Skip to content

Commit eb6f286

Browse files
committed
Only set <PathMap/> for Release builds
fixes 5dc385e; also skip `SolutionDir` override if building projects individually
1 parent 6b4f335 commit eb6f286

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<LangVersion>10.0</LangVersion>
1111
<NoWarn>SA0001</NoWarn>
1212
<Nullable>enable</Nullable>
13-
<PathMap>$(MSBuildProjectDirectory)=${$(MSBuildProjectName)}/</PathMap>
1413
<PlatformTarget>AnyCPU</PlatformTarget>
1514
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
1615
<RunCodeAnalysis>false</RunCodeAnalysis>
@@ -26,6 +25,7 @@
2625
<DebugType>portable</DebugType>
2726
<DefineConstants>TRACE</DefineConstants>
2827
<Optimize>true</Optimize>
28+
<PathMap>$(MSBuildProjectDirectory)=${$(MSBuildProjectName)}/</PathMap>
2929
</PropertyGroup>
3030
<PropertyGroup Condition=" '$(MachineExtraCompilationFlag)' != '' ">
3131
<DefineConstants>$(DefineConstants);$(MachineExtraCompilationFlag)</DefineConstants>

src/MainSlnCommon.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
<MSBuildWarningsAsMessages>NU1702</MSBuildWarningsAsMessages>
99
<NoWarn>$(NoWarn);CS1573;CS1591</NoWarn>
1010
<OutputPath>$(MSBuildProjectDirectory)/../../output/dll</OutputPath>
11-
<PathMap>$(SolutionDir)=/</PathMap>
1211
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
1312
</PropertyGroup>
13+
<PropertyGroup Condition=" '$(Configuration)' == 'Release' And '$(SolutionDir)' != '' ">
14+
<PathMap>$(SolutionDir)=/</PathMap>
15+
</PropertyGroup>
1416
<PropertyGroup Condition=" '$(MachineRunAnalyzersDuringBuild)' == '' ">
1517
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
1618
</PropertyGroup>

0 commit comments

Comments
 (0)