Skip to content

Commit

Permalink
[playground] Add top level Directory.Build.{props,targets}
Browse files Browse the repository at this point in the history
And use Aspire.RepoTesting.* to allow testing and this replaces the
per-project sdk imports.
  • Loading branch information
radical committed Jul 25, 2024
1 parent 6d84aee commit 13a1550
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions playground/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<!-- When $(BuildForTest)==true, importing Aspire.RepoTesting.targets is needed. But import
only when in-repo. For out-of-repo a parent DBprops does the import -->
<Import Project="$(TestsSharedRepoTestingDir)Aspire.RepoTesting.props" Condition="'$(RepoRoot)' != ''" />

<PropertyGroup>
<!--
Playground projects don't need XML docs
Expand All @@ -9,6 +13,8 @@
CS1712: Type parameter 'type_parameter' has no matching typeparam tag in the XML comment on 'type_or_member' (but other type parameters do)
-->
<NoWarn>$(NoWarn),1573,1591,1712</NoWarn>

<SharedDir Condition="'$(SharedDir)' == ''">$(MSBuildThisFileDirectory)..\src\Shared\</SharedDir>
</PropertyGroup>

<PropertyGroup>
Expand Down
7 changes: 7 additions & 0 deletions playground/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />

<!-- When $(BuildForTest)==true, importing Aspire.RepoTesting.targets is needed. But import
only when in-repo. For the out-of-repo case a parent Directory.Build.targets does the import -->
<Import Project="$(TestsSharedRepoTestingDir)Aspire.RepoTesting.targets" Condition="'$(RepoRoot)' != ''" />
</Project>

0 comments on commit 13a1550

Please sign in to comment.