Skip to content

Commit 232e434

Browse files
authored
Prepare playground apps to allow testing (#5080)
This PR has changes to prepare the `playground/` apps to be run as part of future tests in `Aspire.Playground.Tests`. The changes follow these broad patterns: - remove all the per-project `Directory.Build.{props,targets}`, and instead of these .. - .. add root `Directory.Build.{props,targets}` and use `Aspire.RepoTesting.*` - And update all the playground projects to use `AspireProjectOrPackageReference` instead of `ProjectReference` - `Aspire.Hosting.Testing` expects to identify AppHost assemblies by a name ending in `.AppHost`. - rename some projects that don't follow that convention. - Update the apps to use `Aspire.RepoTesting*` which allows building outside of repo. - Address review feedbacks from @ eerhardt
1 parent d8369e0 commit 232e434

File tree

167 files changed

+350
-874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+350
-874
lines changed

Aspire.sln

Lines changed: 43 additions & 40 deletions
Large diffs are not rendered by default.

playground/AWS/AWS.AppHost/AWS.AppHost.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<Compile Include="$(SharedDir)KnownResourceNames.cs" Link="KnownResourceNames.cs" />
12+
<Compile Include="..\..\KnownResourceNames.cs" Link="KnownResourceNames.cs" />
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<ProjectReference Include="..\..\..\src\Aspire.Dashboard\Aspire.Dashboard.csproj" />
17-
<ProjectReference Include="..\..\..\src\Aspire.Hosting.AWS\Aspire.Hosting.AWS.csproj" IsAspireProjectResource="false" />
18-
<ProjectReference Include="..\..\..\src\Aspire.Hosting.AppHost\Aspire.Hosting.AppHost.csproj" IsAspireProjectResource="false" />
19-
16+
<AspireProjectOrPackageReference Include="Aspire.Hosting.AWS" />
17+
<AspireProjectOrPackageReference Include="Aspire.Hosting.AppHost" />
18+
2019
<ProjectReference Include="..\Frontend\Frontend.csproj" />
2120
</ItemGroup>
2221

playground/AWS/AWS.AppHost/Directory.Build.props

Lines changed: 0 additions & 8 deletions
This file was deleted.

playground/AWS/AWS.AppHost/Directory.Build.targets

Lines changed: 0 additions & 9 deletions
This file was deleted.

playground/AWS/AWS.ServiceDefaults/AWS.ServiceDefaults.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23-
<ProjectReference Include="..\..\..\src\Microsoft.Extensions.ServiceDiscovery.Dns\Microsoft.Extensions.ServiceDiscovery.Dns.csproj" />
24-
<ProjectReference Include="..\..\..\src\Microsoft.Extensions.ServiceDiscovery\Microsoft.Extensions.ServiceDiscovery.csproj" />
23+
<AspireProjectOrPackageReference Include="Microsoft.Extensions.ServiceDiscovery.Dns" />
24+
<AspireProjectOrPackageReference Include="Microsoft.Extensions.ServiceDiscovery" />
2525
</ItemGroup>
2626

2727
</Project>

playground/AspireEventHub/EventHubs.AppHost/Directory.Build.props

Lines changed: 0 additions & 8 deletions
This file was deleted.

playground/AspireEventHub/EventHubs.AppHost/Directory.Build.targets

Lines changed: 0 additions & 9 deletions
This file was deleted.

playground/AspireEventHub/EventHubs.AppHost/EventHubs.AppHost.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<Compile Include="$(SharedDir)KnownResourceNames.cs" Link="KnownResourceNames.cs" />
13+
<Compile Include="..\..\KnownResourceNames.cs" Link="KnownResourceNames.cs" />
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<ProjectReference Include="..\..\..\src\Aspire.Dashboard\Aspire.Dashboard.csproj" />
18-
19-
<ProjectReference Include="..\..\..\src\Aspire.Hosting.Azure.EventHubs\Aspire.Hosting.Azure.EventHubs.csproj" IsAspireProjectResource="false" />
20-
<ProjectReference Include="..\..\..\src\Aspire.Hosting.Azure.Storage\Aspire.Hosting.Azure.Storage.csproj" IsAspireProjectResource="false" />
17+
<AspireProjectOrPackageReference Include="Aspire.Hosting.AppHost" />
18+
<AspireProjectOrPackageReference Include="Aspire.Hosting.Azure.EventHubs" />
19+
<AspireProjectOrPackageReference Include="Aspire.Hosting.Azure.Storage" />
2120

2221
<ProjectReference Include="..\EventHubsApi\EventHubsApi.csproj" />
2322
<ProjectReference Include="..\EventHubsConsumer\EventHubsConsumer.csproj" />

playground/AspireEventHub/EventHubsApi/EventHubsApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<ProjectReference Include="..\..\..\src\Components\Aspire.Azure.Messaging.EventHubs\Aspire.Azure.Messaging.EventHubs.csproj" />
11+
<AspireProjectOrPackageReference Include="Aspire.Azure.Messaging.EventHubs" />
1212
<ProjectReference Include="..\..\Playground.ServiceDefaults\Playground.ServiceDefaults.csproj" />
1313
</ItemGroup>
1414

playground/AspireEventHub/EventHubsConsumer/EventHubsConsumer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<ProjectReference Include="..\..\..\src\Components\Aspire.Azure.Messaging.EventHubs\Aspire.Azure.Messaging.EventHubs.csproj" />
12-
<ProjectReference Include="..\..\..\src\Components\Aspire.Azure.Storage.Blobs\Aspire.Azure.Storage.Blobs.csproj" />
11+
<AspireProjectOrPackageReference Include="Aspire.Azure.Messaging.EventHubs" />
12+
<AspireProjectOrPackageReference Include="Aspire.Azure.Storage.Blobs" />
1313
<ProjectReference Include="..\..\Playground.ServiceDefaults\Playground.ServiceDefaults.csproj" />
1414
</ItemGroup>
1515

0 commit comments

Comments
 (0)