Skip to content

Commit 2e55fc0

Browse files
committed
2 parents 65efad5 + ba25790 commit 2e55fc0

File tree

10 files changed

+121
-6
lines changed

10 files changed

+121
-6
lines changed

C3D.Extensions.Aspire.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions",
116116
EndProject
117117
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OutputWatcherTestProject", "tests\OutputWatcherTestProject\OutputWatcherTestProject.csproj", "{13C2606F-B44D-4127-AD96-908F152E124B}"
118118
EndProject
119+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C3D.Extensions.Aspire.SystemWebAdapters", "src\C3D\Extensions\Aspire\SystemWebAdapters\C3D.Extensions.Aspire.SystemWebAdapters.csproj", "{213BA945-410C-4726-B764-BF043E08ACA3}"
120+
EndProject
119121
Global
120122
GlobalSection(SolutionConfigurationPlatforms) = preSolution
121123
Debug|Any CPU = Debug|Any CPU
@@ -210,6 +212,10 @@ Global
210212
{13C2606F-B44D-4127-AD96-908F152E124B}.Debug|Any CPU.Build.0 = Debug|Any CPU
211213
{13C2606F-B44D-4127-AD96-908F152E124B}.Release|Any CPU.ActiveCfg = Release|Any CPU
212214
{13C2606F-B44D-4127-AD96-908F152E124B}.Release|Any CPU.Build.0 = Release|Any CPU
215+
{213BA945-410C-4726-B764-BF043E08ACA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
216+
{213BA945-410C-4726-B764-BF043E08ACA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
217+
{213BA945-410C-4726-B764-BF043E08ACA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
218+
{213BA945-410C-4726-B764-BF043E08ACA3}.Release|Any CPU.Build.0 = Release|Any CPU
213219
EndGlobalSection
214220
GlobalSection(SolutionProperties) = preSolution
215221
HideSolutionNode = FALSE
@@ -248,6 +254,7 @@ Global
248254
{D099C3D1-6952-4B8D-B7D9-4D623C1D6B26} = {B02941E8-EB9F-4AFF-8383-6B231DD01754}
249255
{41C173BA-2164-4764-B195-C815E37F36F7} = {D099C3D1-6952-4B8D-B7D9-4D623C1D6B26}
250256
{13C2606F-B44D-4127-AD96-908F152E124B} = {8AFDAAF4-2682-43BB-B576-24B96DFDEF49}
257+
{213BA945-410C-4726-B764-BF043E08ACA3} = {D5AA99D3-6A86-4816-8C06-41207B980DBD}
251258
EndGlobalSection
252259
GlobalSection(ExtensibilityGlobals) = postSolution
253260
SolutionGuid = {7A2C1EF4-C8A0-49A5-8198-0BFBDFE2EE42}

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
[![Build Status](https://dev.azure.com/flexviews/OSS.Build/_apis/build/status%2FCZEMacLeod.C3D.Extensions.Aspire?branchName=main)](https://dev.azure.com/flexviews/OSS.Build/_build/latest?definitionId=88&branchName=main)
44
[![Build and Run IIS Express Tests](https://github.com/CZEMacLeod/C3D.Extensions.Aspire/actions/workflows/dotnet-msbuild-vstest.yml/badge.svg)](https://github.com/CZEMacLeod/C3D.Extensions.Aspire/actions/workflows/dotnet-msbuild-vstest.yml)
55

6-
A set of packages to make it easier to work with IIS Express / System.Web projects, and extend debugging in Aspire.
6+
A set of packages to make it easier to work with Aspire.
7+
Specific packages enable working with IIS Express / System.Web projects.
8+
Others extend debugging in Aspire.
9+
Please see the individual package readmes for more information.
710

811
# AppHost Packages
912

@@ -27,6 +30,10 @@ A set of packages to make it easier to work with IIS Express / System.Web projec
2730
[![NuGet package](https://img.shields.io/nuget/v/C3D.Extensions.Aspire.Fluent.svg)](https://nuget.org/packages/C3D.Extensions.Aspire.Fluent)
2831
[![NuGet downloads](https://img.shields.io/nuget/dt/C3D.Extensions.Aspire.Fluent.svg)](https://nuget.org/packages/C3D.Extensions.Aspire.Fluent)
2932

33+
## [C3D.Extensions.Aspire.SystemWebAdapters](src/C3D/Extensions/Aspire/SystemWebAdapters/README.md)
34+
[![NuGet package](https://img.shields.io/nuget/v/C3D.Extensions.Aspire.SystemWebAdapters.svg)](https://nuget.org/packages/C3D.Extensions.SystemWebAdapters.Fluent)
35+
[![NuGet downloads](https://img.shields.io/nuget/dt/C3D.Extensions.Aspire.SystemWebAdapters.svg)](https://nuget.org/packages/C3D.Extensions.SystemWebAdapters.Fluent)
36+
3037

3138
# Support Packages
3239

samples/SWA/SWAAspireHost/AspireAppHostSWA.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<ItemGroup>
1919
<ProjectReference Include="..\..\..\src\C3D\Extensions\Aspire\Fluent\C3D.Extensions.Aspire.Fluent.csproj" IsAspireProjectResource="false" />
2020
<ProjectReference Include="..\..\..\src\C3D\Extensions\Aspire\IISExpress\C3D.Extensions.Aspire.IISExpress.csproj" IsAspireProjectResource="false" />
21+
<ProjectReference Include="..\..\..\src\C3D\Extensions\Aspire\SystemWebAdapters\C3D.Extensions.Aspire.SystemWebAdapters.csproj" IsAspireProjectResource="false" />
2122
</ItemGroup>
2223
<Import Project="..\..\..\src\C3D\Extensions\Aspire\IISExpress\build\C3D.Extensions.Aspire.IISExpress.props" />
2324

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net8.0-windows;net9.0-windows</TargetFrameworks>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<AssemblyTitle>$(AssemblyTitle) System.Web Adapters</AssemblyTitle>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="Aspire.Hosting" Version="9.2.0" />
12+
<ProjectReference Include="..\IISExpress\C3D.Extensions.Aspire.IISExpress.csproj" />
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<PackageTag Include="IISExpress" />
17+
<PackageTag Include="SystemWeb" />
18+
<PackageTag Include="Adapters" />
19+
</ItemGroup>
20+
</Project>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# C3D.Extensions.Aspire.SystemWebAdapters
2+
3+
Extension methods to allow for easy configuration in Aspire of a [SystemWeb-Adapters](https://github.com/dotnet/systemweb-adapters) setup with an IISExpress based ASP.NET 4.x project and an ASP.NET Core based project.
4+
5+
Previously this was available directly in the [C3D.Extensions.Aspire.IISExpress](https://nuget.org/packages/C3D.Extensions.Aspire.IISExpress) package but has been moved to this package to separate the concerns.
6+
7+
## Example Usage
8+
```xml
9+
<Project Sdk="Microsoft.NET.Sdk">
10+
11+
<Sdk Name="Aspire.AppHost.Sdk" Version="9.2.0" />
12+
13+
<PropertyGroup>
14+
<OutputType>Exe</OutputType>
15+
<TargetFramework>net9.0-windows</TargetFramework>
16+
<ImplicitUsings>enable</ImplicitUsings>
17+
<Nullable>enable</Nullable>
18+
<IsAspireHost>true</IsAspireHost>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.2.0" />
23+
</ItemGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="C3D.Extensions.Aspire.SystemWebAdapters" Version="0.2.*" />
27+
</ItemGroup>
28+
29+
<ItemGroup>
30+
<ProjectReference Include="..\SWACore\SWACore.csproj" />
31+
<ProjectReference Include="..\SWAFramework\SWAFramework.csproj" />
32+
</ItemGroup>
33+
</Project>
34+
```
35+
36+
```csharp
37+
using Aspire.Hosting;
38+
using Microsoft.Extensions.Hosting;
39+
40+
var builder = DistributedApplication.CreateBuilder(new DistributedApplicationOptions()
41+
{
42+
Args = args,
43+
AllowUnsecuredTransport = true
44+
});
45+
46+
var framework = builder
47+
.AddIISExpressProject<Projects.SWAFramework>("framework")
48+
.WithTemporaryConfig()
49+
.WithDefaultIISExpressEndpoints());
50+
51+
var core = builder.AddProject<Projects.SWACore>("core");
52+
53+
var swa = builder
54+
.AddSystemWebAdapters("swa")
55+
.WithFramework(framework)
56+
.WithCore(core);
57+
58+
builder.Build().Run();
59+
```

src/C3D/Extensions/Aspire/IISExpress/Resources/SystemWebAdaptersResource.cs renamed to src/C3D/Extensions/Aspire/SystemWebAdapters/Resources/SystemWebAdaptersResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Aspire.Hosting.ApplicationModel;
22

3-
namespace C3D.Extensions.Aspire.IISExpress.Resources;
3+
namespace C3D.Extensions.Aspire.SystemWebAdapters.Resources;
44

55
/// <summary>
66
/// Represents a systemweb-adapters resource. This is a special resource that is used to contain the shared key used by systemweb-adapters.

src/C3D/Extensions/Aspire/IISExpress/SystemWebAdaptersExtensions.cs renamed to src/C3D/Extensions/Aspire/SystemWebAdapters/SystemWebAdaptersExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Aspire.Hosting.Publishing;
33
using C3D.Extensions.Aspire.IISExpress.Annotations;
44
using C3D.Extensions.Aspire.IISExpress.Resources;
5+
using C3D.Extensions.Aspire.SystemWebAdapters.Resources;
56
using Microsoft.Extensions.DependencyInjection;
67
using Microsoft.Extensions.Logging;
78
using System.Diagnostics.CodeAnalysis;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/v3.3.37/src/NerdBank.GitVersioning/version.schema.json",
3+
"version": "0.2",
4+
"pathFilters": [
5+
".",
6+
"../Directory.Build.props",
7+
"../Directory.Build.targets",
8+
"../IISExpress",
9+
"../../Directory.Build.props",
10+
"../../Directory.Build.targets"
11+
],
12+
"publicReleaseRefSpec": [
13+
"^refs/heads/main$", // we release out of main
14+
"^refs/heads/rel/v\\d+\\.\\d+" // we also release tags starting with rel/N.N
15+
],
16+
"nugetPackageVersion": {
17+
"semVer": 2
18+
},
19+
"buildNumberOffset": 1
20+
}

tests/OutputWatcherTestProject/OutputWatcherTestProject.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
18-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
18+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
1919
<PackageReference Include="xunit" Version="2.9.3" />
20-
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.0">
20+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
</PackageReference>

tests/SWATestProject/SWATestProject.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
18-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
18+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
1919
<PackageReference Include="xunit" Version="2.9.3" />
20-
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.0">
20+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
</PackageReference>

0 commit comments

Comments
 (0)