Only set `<PathMap/>` for Release builds

fixes 5dc385e22; also skip `SolutionDir` override if building projects
individually
This commit is contained in:
YoshiRulz 2023-03-17 05:29:50 +10:00
parent 6b4f3355fd
commit eb6f2864ff
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,6 @@
<LangVersion>10.0</LangVersion>
<NoWarn>SA0001</NoWarn>
<Nullable>enable</Nullable>
<PathMap>$(MSBuildProjectDirectory)=${$(MSBuildProjectName)}/</PathMap>
<PlatformTarget>AnyCPU</PlatformTarget>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<RunCodeAnalysis>false</RunCodeAnalysis>
@ -26,6 +25,7 @@
<DebugType>portable</DebugType>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<PathMap>$(MSBuildProjectDirectory)=${$(MSBuildProjectName)}/</PathMap>
</PropertyGroup>
<PropertyGroup Condition=" '$(MachineExtraCompilationFlag)' != '' ">
<DefineConstants>$(DefineConstants);$(MachineExtraCompilationFlag)</DefineConstants>

View File

@ -8,9 +8,11 @@
<MSBuildWarningsAsMessages>NU1702</MSBuildWarningsAsMessages>
<NoWarn>$(NoWarn);CS1573;CS1591</NoWarn>
<OutputPath>$(MSBuildProjectDirectory)/../../output/dll</OutputPath>
<PathMap>$(SolutionDir)=/</PathMap>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' And '$(SolutionDir)' != '' ">
<PathMap>$(SolutionDir)=/</PathMap>
</PropertyGroup>
<PropertyGroup Condition=" '$(MachineRunAnalyzersDuringBuild)' == '' ">
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
</PropertyGroup>