Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .NET 9 #3007

Merged
merged 17 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
martincostello marked this conversation as resolved.
Show resolved Hide resolved

- name: Setup .NET SDK
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
Expand Down
14 changes: 4 additions & 10 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,12 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NeutralLanguage>en-US</NeutralLanguage>
<!--
TODO Remove deprecated TFMs
-->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
<!--
TODO Update packages to resolve vulnerability warnings
-->
<NoWarn>$(NoWarn);NU1902;NU1903</NoWarn>
<!--
TODO Fix warning from Swashbuckle.AspNetCore with dotnet pack
-->
<NoWarn>$(NoWarn);NU5128</NoWarn>
<!-- TODO Remove once .NET 9.0.0 is released -->
<NoWarn>$(NoWarn);NU5104</NoWarn>
<NuGetAuditMode>direct</NuGetAuditMode>
martincostello marked this conversation as resolved.
Show resolved Hide resolved
<!--
TODO Go through the code and add nullable annotations
<Nullable>enable</Nullable>
Expand All @@ -49,7 +43,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseArtifactsOutput>true</UseArtifactsOutput>
<VersionPrefix>6.9.1</VersionPrefix>
<VersionPrefix>7.0.0</VersionPrefix>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>
<PropertyGroup Condition=" '$(GITHUB_ACTIONS)' != '' ">
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="6.0.32" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="2.1.0" />
<PackageVersion Include="Microsoft.OpenApi" Version="1.6.14" />
<PackageVersion Include="Microsoft.OpenApi.Readers" Version="1.6.14" />
<PackageVersion Include="Microsoft.OpenApi" Version="1.6.22" />
<PackageVersion Include="Microsoft.OpenApi.Readers" Version="1.6.22" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.403",
"version": "9.0.100-rc.2.24474.11",
"allowPrerelease": false,
"rollForward": "latestMajor"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NoWarn>$(NoWarn);1591</NoWarn>
<PackageTags>swagger;documentation;discovery;help;webapi;aspnet;aspnetcore;annotations</PackageTags>
<SignAssembly>true</SignAssembly>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<IsTestProject>false</IsTestProject>
<NoWarn>$(NoWarn);1591</NoWarn>
<PackageTags>swagger;openapi;test-first;spec-first;testing;aspnetcore;xunit</PackageTags>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<IsPackable>true</IsPackable>
<NoWarn>$(NoWarn);1591</NoWarn>
<PackageTags>swagger;openapi;test-first;spec-first;testing;aspnetcore</PackageTags>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -16,29 +16,21 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" VersionOverride="2.1.2" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" VersionOverride="3.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" VersionOverride="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" VersionOverride="2.1.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" VersionOverride="6.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" VersionOverride="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" VersionOverride="8.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" VersionOverride="9.0.0-rc.2.24474.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
<AdditionalFiles Include="PublicAPI\PublicAPI.Shipped.txt" />
Expand Down
2 changes: 1 addition & 1 deletion src/Swashbuckle.AspNetCore.Cli/CommandRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Swashbuckle.AspNetCore.Cli
{
public class CommandRunner
internal class CommandRunner
{
private readonly Dictionary<string, string> _argumentDescriptors;
private readonly Dictionary<string, OptionDescriptor> _optionDescriptors;
Expand Down
6 changes: 0 additions & 6 deletions src/Swashbuckle.AspNetCore.Cli/HostingApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Http.Features;
#if NETCOREAPP3_0_OR_GREATER
using Microsoft.Extensions.DependencyInjection;
#endif
using Microsoft.Extensions.Hosting;

namespace Swashbuckle.AspNetCore.Cli
Expand All @@ -19,9 +17,6 @@ internal class HostingApplication
{
internal static IServiceProvider GetServiceProvider(Assembly assembly)
{
#if NETCOREAPP2_1
return null;
#else
// We're disabling the default server and the console host lifetime. This will disable:
// 1. Listening on ports
// 2. Logging to the console from the default host.
Expand Down Expand Up @@ -102,7 +97,6 @@ void OnEntryPointExit(Exception exception)
}

return null;
#endif
}

private class NoopHostLifetime : IHostLifetime
Expand Down
2 changes: 1 addition & 1 deletion src/Swashbuckle.AspNetCore.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace Swashbuckle.AspNetCore.Cli
{
public class Program
internal class Program
{
public static int Main(string[] args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
<OutputType>Exe</OutputType>
<PackAsTool>true</PackAsTool>
<PackageId>Swashbuckle.AspNetCore.Cli</PackageId>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0</TargetFrameworks>
<ToolCommandName>swagger</ToolCommandName>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Swashbuckle.AspNetCore.Swagger\Swashbuckle.AspNetCore.Swagger.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
<PackageReference Include="Microsoft.AspNetCore" />
<ItemGroup>
<InternalsVisibleTo Include="Swashbuckle.AspNetCore.Cli.Test" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<IsPackable>true</IsPackable>
<PackageTags>swagger;documentation;discovery;help;webapi;aspnet;aspnetcore;newtonsoft</PackageTags>
<SignAssembly>true</SignAssembly>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,26 +17,18 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Formatters.Json" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" VersionOverride="3.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" VersionOverride="5.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" VersionOverride="6.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" VersionOverride="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" VersionOverride="8.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" VersionOverride="9.0.0-rc.2.24474.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
<AdditionalFiles Include="PublicAPI\PublicAPI.Shipped.txt" />
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ Swashbuckle.AspNetCore.ReDoc.ConfigObject.SortPropsAlphabetically.get -> bool
Swashbuckle.AspNetCore.ReDoc.ConfigObject.SortPropsAlphabetically.set -> void
Swashbuckle.AspNetCore.ReDoc.ConfigObject.UntrustedSpec.get -> bool
Swashbuckle.AspNetCore.ReDoc.ConfigObject.UntrustedSpec.set -> void
Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware
Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext) -> System.Threading.Tasks.Task
Swashbuckle.AspNetCore.ReDoc.ReDocOptions
Swashbuckle.AspNetCore.ReDoc.ReDocOptions.ConfigObject.get -> Swashbuckle.AspNetCore.ReDoc.ConfigObject
Swashbuckle.AspNetCore.ReDoc.ReDocOptions.ConfigObject.set -> void
Expand Down
2 changes: 1 addition & 1 deletion src/Swashbuckle.AspNetCore.ReDoc/ReDocMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace Swashbuckle.AspNetCore.ReDoc
{
public class ReDocMiddleware
internal sealed class ReDocMiddleware
{
private const string EmbeddedFileNamespace = "Swashbuckle.AspNetCore.ReDoc.node_modules.redoc.bundles";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NoWarn>$(NoWarn);1591</NoWarn>
<PackageTags>swagger;documentation;discovery;help;webapi;aspnet;aspnetcore;redoc</PackageTags>
<SignAssembly>true</SignAssembly>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<EnableAotAnalyzer>true</EnableAotAnalyzer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
static Microsoft.AspNetCore.Builder.SwaggerBuilderExtensions.MapSwagger(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern = "/swagger/{documentName}/swagger.{extension:regex(^(json|ya?ml)$)}", System.Action<Swashbuckle.AspNetCore.Swagger.SwaggerEndpointOptions> setupAction = null) -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.SwaggerMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Swashbuckle.AspNetCore.Swagger.SwaggerOptions options, Microsoft.AspNetCore.Routing.Template.TemplateBinderFactory templateBinderFactory) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Swashbuckle.AspNetCore.Swagger.SwaggerEndpointOptions.PreSerializeFilters.get ->
Swashbuckle.AspNetCore.Swagger.SwaggerEndpointOptions.SerializeAsV2.get -> bool
Swashbuckle.AspNetCore.Swagger.SwaggerEndpointOptions.SerializeAsV2.set -> void
Swashbuckle.AspNetCore.Swagger.SwaggerEndpointOptions.SwaggerEndpointOptions() -> void
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext, Swashbuckle.AspNetCore.Swagger.ISwaggerProvider swaggerProvider) -> System.Threading.Tasks.Task
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.SwaggerMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Swashbuckle.AspNetCore.Swagger.SwaggerOptions options) -> void
Swashbuckle.AspNetCore.Swagger.SwaggerOptions
Swashbuckle.AspNetCore.Swagger.SwaggerOptions.CustomDocumentSerializer.get -> Swashbuckle.AspNetCore.Swagger.ISwaggerDocumentSerializer
Swashbuckle.AspNetCore.Swagger.SwaggerOptions.CustomDocumentSerializer.set -> void
Expand Down
2 changes: 1 addition & 1 deletion src/Swashbuckle.AspNetCore.Swagger/SwaggerMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Swashbuckle.AspNetCore.Swagger
{
public class SwaggerMiddleware
internal sealed class SwaggerMiddleware
{
private readonly RequestDelegate _next;
private readonly SwaggerOptions _options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NoWarn>$(NoWarn);1591</NoWarn>
<PackageTags>swagger;documentation;discovery;help;webapi;aspnet;aspnetcore</PackageTags>
<SignAssembly>true</SignAssembly>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<EnableAotAnalyzer>true</EnableAotAnalyzer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;

#if NETSTANDARD2_0
#if NETSTANDARD
using IWebHostEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private OpenApiSchema GeneratePolymorphicSchema(
typeof(IFormFile),
typeof(FileResult),
typeof(System.IO.Stream),
#if NETCOREAPP3_0_OR_GREATER
#if !NETSTANDARD
typeof(System.IO.Pipelines.PipeReader),
#endif
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static bool IsRequiredParameter(this ApiParameterDescription apiParameter

// For non-controllers, prefer the IsRequired flag if we're not on netstandard 2.0, otherwise fallback to the default logic.
return
#if !NETSTANDARD2_0
#if !NETSTANDARD
apiParameter.IsRequired;
#else
IsRequired();
Expand All @@ -59,7 +59,7 @@ public static bool IsRequiredParameter(this ApiParameterDescription apiParameter
public static ParameterInfo ParameterInfo(this ApiParameterDescription apiParameter)
{
var parameterDescriptor = apiParameter.ParameterDescriptor as
#if NETCOREAPP2_2_OR_GREATER
#if !NETSTANDARD
Microsoft.AspNetCore.Mvc.Infrastructure.IParameterInfoParameterDescriptor;
#else
ControllerParameterDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NoWarn>$(NoWarn);1591</NoWarn>
<PackageTags>swagger;documentation;discovery;help;webapi;aspnet;aspnetcore</PackageTags>
<SignAssembly>true</SignAssembly>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ Swashbuckle.AspNetCore.SwaggerUI.SubmitMethod.Patch = 6 -> Swashbuckle.AspNetCor
Swashbuckle.AspNetCore.SwaggerUI.SubmitMethod.Post = 2 -> Swashbuckle.AspNetCore.SwaggerUI.SubmitMethod
Swashbuckle.AspNetCore.SwaggerUI.SubmitMethod.Put = 1 -> Swashbuckle.AspNetCore.SwaggerUI.SubmitMethod
Swashbuckle.AspNetCore.SwaggerUI.SubmitMethod.Trace = 7 -> Swashbuckle.AspNetCore.SwaggerUI.SubmitMethod
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext) -> System.Threading.Tasks.Task
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIOptions
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIOptions.ConfigObject.get -> Swashbuckle.AspNetCore.SwaggerUI.ConfigObject
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIOptions.ConfigObject.set -> void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.Extensions.Options;
using Swashbuckle.AspNetCore.SwaggerUI;

#if NETSTANDARD2_0
#if NETSTANDARD
using IWebHostEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment;
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;

#if NETSTANDARD2_0
#if NETSTANDARD
using IWebHostEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment;
#endif

namespace Swashbuckle.AspNetCore.SwaggerUI
{
public class SwaggerUIMiddleware
internal sealed partial class SwaggerUIMiddleware
{
private const string EmbeddedFileNamespace = "Swashbuckle.AspNetCore.SwaggerUI.node_modules.swagger_ui_dist";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NoWarn>$(NoWarn);1591</NoWarn>
<PackageTags>swagger;documentation;discovery;help;webapi;aspnet;aspnetcore</PackageTags>
<SignAssembly>true</SignAssembly>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
<EnableAotAnalyzer>true</EnableAotAnalyzer>
Expand Down
10 changes: 9 additions & 1 deletion src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<PackageId>Swashbuckle.AspNetCore</PackageId>
<PackageTags>swagger;documentation;discovery;help;webapi;aspnet;aspnetcore</PackageTags>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<MicrosoftExtensionsApiDescriptionServerPackageVersion>8.0.0</MicrosoftExtensionsApiDescriptionServerPackageVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<MicrosoftExtensionsApiDescriptionServerPackageVersion>9.0.0-rc.2.24474.3</MicrosoftExtensionsApiDescriptionServerPackageVersion>
</PropertyGroup>

<Target Name="PopulateNuspec">
Expand Down
Loading