Skip to content

Commit

Permalink
Modified central build directory logic to place WSL builds in a dedic…
Browse files Browse the repository at this point in the history
…ated folder.
  • Loading branch information
PathogenDavid committed Oct 31, 2021
1 parent 5eb0ed4 commit a9ff8f3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tooling/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@

<_ProjectTreeRoot>$(MSBuildThisFileDirectory)../</_ProjectTreeRoot>

<BaseOutputPath>$(_ProjectTreeRoot)bin/$(Configuration)-$(Platform)/</BaseOutputPath>
<!--
Odd things can happen when WSL and Windows share the same output directories. As such if we detect we're running under WSL we use different output directories.
-->
<_WslPathPart></_WslPathPart>
<_WslSuffixPart></_WslSuffixPart>
<_WslPathPart Condition="'$(WSL_DISTRO_NAME)' != ''">wsl/</_WslPathPart>
<_WslSuffixPart Condition="'$(WSL_DISTRO_NAME)' != ''">-wsl</_WslSuffixPart>

<BaseOutputPath>$(_ProjectTreeRoot)bin/$(Configuration)-$(Platform)$(_WslSuffixPart)/</BaseOutputPath>
<OutputPath>$(BaseOutputPath)$(ThisProjectOutputSubdirectory)/</OutputPath>
<OutputDir>$(OutputPath)</OutputDir>

<BaseIntermediateOutputPath>$(_ProjectTreeRoot)obj/$(ThisProjectOutputSubdirectory)/</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>$(_ProjectTreeRoot)obj/$(_WslPathPart)$(ThisProjectOutputSubdirectory)/</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)-$(Platform)/</IntermediateOutputPath>

<PackageOutputPath>$(_ProjectTreeRoot)packages/</PackageOutputPath>
<PackageOutputPath>$(_ProjectTreeRoot)packages/$(_WslPathPart)</PackageOutputPath>

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
Expand Down

0 comments on commit a9ff8f3

Please sign in to comment.