Skip to content

Commit 53e67f4

Browse files
proj: change OutputPath depending on whether its an test project
1 parent 798eb47 commit 53e67f4

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

Directory.Build.props

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,23 @@
2222
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2323
<EnableNETAnalyzers>true</EnableNETAnalyzers>
2424
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
25-
<OutputPath>$(SolutionDir)\bin\$(Platform)</OutputPath>
2625
<SignAssembly>true</SignAssembly>
2726
<AssemblyOriginatorKeyFile>..\AridityTeam.Ascorbic.snk</AssemblyOriginatorKeyFile>
2827
<Platforms>AnyCPU;x64;x86</Platforms>
2928
</PropertyGroup>
30-
<ItemGroup>
31-
</ItemGroup>
29+
30+
<PropertyGroup>
31+
<IsTestProject Condition="'$(IsTestProject)' == ''
32+
And $(MSBuildProjectName.EndsWith('.Tests'))">
33+
true
34+
</IsTestProject>
35+
</PropertyGroup>
36+
37+
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
38+
<OutputPath>$(SolutionDir)\bin\Tests\$(Platform)</OutputPath>
39+
</PropertyGroup>
40+
41+
<PropertyGroup Condition="'$(IsTestProject)' != 'true'">
42+
<OutputPath>$(SolutionDir)\bin\$(Platform)</OutputPath>
43+
</PropertyGroup>
3244
</Project>

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
4-
</PropertyGroup>
4+
</PropertyGroup>
55
<ItemGroup>
66
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
77
</ItemGroup>

src/AridityTeam.Ascorbic/AridityTeam.Ascorbic.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<AssemblyTitle>The Aridity Team "Ascorbic" Library</AssemblyTitle>
55
<RootNamespace>AridityTeam</RootNamespace>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
7-
<DocumentationFile>..\..\bin\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
7+
<DocumentationFile>..\..\bin\$(Platform)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
88
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
99
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1010
</PropertyGroup>

0 commit comments

Comments
 (0)