Skip to content

Commit

Permalink
Support .NET 9 (#3007)
Browse files Browse the repository at this point in the history
* Support .NET 9

- Add `net9.0` TFMs.
- Drop TFMs for all out-of-support versions of .NET.
- Bump version to `7.0.0`.
- Only audit direct NuGet dependencies.
- Suppress vulnerabilities in IdentityServer4 used in sample.
- Remove some now-redundant pre-processor directives.

* Update package references

Target .NET 9 versions for Microsoft.AspNetCore.OpenApi in test sites.

* Bump Microsoft.OpenApi

Bump Microsoft.OpenApi to the latest version.

* Update .NET SDK to 9.0.100-preview.7.24407.12 (#3025)

* Update .NET SDK

Update .NET SDK to version 9.0.100-preview.7.24407.12.

---
updated-dependencies:
- dependency-name: Microsoft.NET.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update NuGet packages
Bump NuGet packages for .NET 9 preview 7.

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Costello <martin@martincostello.com>

* Bump Microsoft.OpenApi

Bump Microsoft.OpenApi to 1.6.18.

* Bump Microsoft.OpenApi

Bump Microsoft.OpenApi to 1.6.20.

* Bump Microsoft.OpenApi

Update Microsoft.OpenApi to 1.6.21.

* Update .NET SDK to 9.0.100-rc.1.24452.12 (#3066)

* Update .NET SDK

Update .NET SDK to version 9.0.100-rc.1.24452.12.

---
updated-dependencies:
- dependency-name: Microsoft.NET.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update NuGet packages
Update NuGet packages for RC1.

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Costello <martin@martincostello.com>

* Make middlewares internal

Make all the middleware classes internal as they have no useful public-facing functionality (e.g. virtual members).

Resolves #2805.

* Update .NET SDK to 9.0.100-rc.2.24474.11 (#3098)

* Update .NET SDK

Update .NET SDK to version 9.0.100-rc.2.24474.11.

---
updated-dependencies:
- dependency-name: Microsoft.NET.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update NuGet packages
Update NuGet packages for .NET 9 RC2.

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Costello <martin@martincostello.com>

* Bump Microsoft.OpenApi

Bump Microsoft.OpenApi to 1.6.22.

* Bump packages

Update packages for ASP.NET Core 8.0.10.

* Swap order of TFMs

Put the newest first so Visual Studio loads the latest version as the selected TFM by default.

* Apply suggestions from code review

- Remove redundant comment.
- Add link to tracking issue in comment.

* Add [ActivatorUtilitiesConstructor]

React to aspnet/Announcements#514 for .NET 9.

* Update to .NET 9 GA
Update to the stable version of .NET 9.

* Bump .NET 8 packages

Bump test packages for .NET 8.

---------

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 12, 2024
1 parent 4440820 commit a8eaca6
Show file tree
Hide file tree
Showing 67 changed files with 346 additions and 113 deletions.
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
- name: Setup .NET SDK
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
Expand Down
12 changes: 2 additions & 10 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,10 @@
<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>
<NuGetAuditMode>direct</NuGetAuditMode>
<!--
TODO Go through the code and add nullable annotations
<Nullable>enable</Nullable>
Expand All @@ -49,7 +41,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",
"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" />
</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" />
</ItemGroup>

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

This file was deleted.

Empty file.

This file was deleted.

Empty file.
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
3 changes: 2 additions & 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 All @@ -33,6 +33,7 @@ public SwaggerMiddleware(
}

#if !NETSTANDARD
[ActivatorUtilitiesConstructor]
public SwaggerMiddleware(
RequestDelegate next,
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.

Empty file.

This file was deleted.

Empty file.
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
Loading

0 comments on commit a8eaca6

Please sign in to comment.