Skip to content

Commit

Permalink
Add net8.0 target framework
Browse files Browse the repository at this point in the history
  • Loading branch information
cristipufu committed Aug 30, 2023
1 parent 6f5e5f9 commit 2ec4ada
Show file tree
Hide file tree
Showing 35 changed files with 836 additions and 35 deletions.
9 changes: 9 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ steps:
performMultiLevelLookup: true
useGlobalJson: true

task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
packageType: 'sdk'
version: '8.0.100-preview.7.23376.3'
includePreviewVersions: true
performMultiLevelLookup: true
useGlobalJson: true

- task: CmdLine@2
displayName: 'Install DNT'
inputs:
Expand Down
3 changes: 2 additions & 1 deletion build/Build.CI.GitHubActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ protected override GitHubActionsJob GetJobs(GitHubActionsImage image, IReadOnlyC
newSteps.Insert(0, new GitHubActionsSetupDotNetStep(new[]
{
"2.1.*",
"5.0.*"
"5.0.*",
"8.0.100-preview.7.23376.3"
}));

newSteps.Insert(0, new GitHubActionsUseGnuTarStep());
Expand Down
7 changes: 5 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ protected override void OnBuildInitialized()
("NSwag.Sample.NET60", "Net60"),
("NSwag.Sample.NET60Minimal", "Net60"),
("NSwag.Sample.NET70", "Net70"),
("NSwag.Sample.NET70Minimal", "Net70")
("NSwag.Sample.NET70Minimal", "Net70"),
("NSwag.Sample.NET80", "Net80"),
("NSwag.Sample.NET80Minimal", "Net80")
};
foreach (var (projectName, runtime) in dotnetTargets)
Expand Down Expand Up @@ -355,7 +357,7 @@ void PublishConsoleProject(Nuke.Common.ProjectModel.Project project, string[] ta

PublishConsoleProject(consoleX86Project, new[] { "net461" });
PublishConsoleProject(consoleProject, new[] { "net461" });
PublishConsoleProject(consoleCoreProject, new[] { "netcoreapp2.1", "netcoreapp3.1", "net5.0", "net6.0", "net7.0" });
PublishConsoleProject(consoleCoreProject, new[] { "netcoreapp2.1", "netcoreapp3.1", "net5.0", "net6.0", "net7.0", "net8.0" });

void CopyConsoleBinaries(AbsolutePath target)
{
Expand All @@ -372,6 +374,7 @@ void CopyConsoleBinaries(AbsolutePath target)
CopyDirectoryRecursively(consoleCoreDirectory / "net5.0" / "publish", target / "Net50");
CopyDirectoryRecursively(consoleCoreDirectory / "net6.0" / "publish", target / "Net60");
CopyDirectoryRecursively(consoleCoreDirectory / "net7.0" / "publish", target / "Net70");
CopyDirectoryRecursively(consoleCoreDirectory / "net8.0" / "publish", target / "Net80");
}

Serilog.Log.Information("Copy published Console for NSwagStudio");
Expand Down
2 changes: 1 addition & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
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": "7.0.100",
"version": "8.0.100-preview.7.23376.3",
"rollForward": "latestMinor"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
Condition="'$(TargetFramework)' == 'net6.0'">dotnet --roll-forward-on-no-candidate-fx 2 "$(NSwagDir_Net60)/dotnet-nswag.dll"</_NSwagCommand>
<_NSwagCommand
Condition="'$(TargetFramework)' == 'net7.0'">dotnet --roll-forward-on-no-candidate-fx 2 "$(NSwagDir_Net70)/dotnet-nswag.dll"</_NSwagCommand>
<_NSwagCommand
Condition="'$(TargetFramework)' == 'net8.0'">dotnet --roll-forward-on-no-candidate-fx 2 "$(NSwagDir_Net80)/dotnet-nswag.dll"</_NSwagCommand>
</PropertyGroup>

<!-- OpenApiReference support for C# -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public async Task Invoke(HttpContext context)

var suffix = !string.IsNullOrWhiteSpace(_swaggerRoute) ? "?url=" + _transformToExternal(_swaggerRoute, context.Request) : "";
var path = _transformToExternal(_swaggerUiRoute, context.Request);
context.Response.Headers.Add("Location", (path != "/" ? path : "") + "/index.html" + suffix);
context.Response.Headers.Append("Location", (path != "/" ? path : "") + "/index.html" + suffix);
}
else
{
Expand Down
44 changes: 25 additions & 19 deletions src/NSwag.AspNetCore/NSwag.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net461;netstandard1.6;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net461;netstandard1.6;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<PackageTags>Swagger Documentation AspNetCore NetCore TypeScript CodeGen</PackageTags>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
<SymbolPackageFormat>symbols.nupkg</SymbolPackageFormat>
Expand All @@ -17,6 +17,7 @@
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet5>[5, 6.0)</MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet5>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet6>[6.0.0, 7.0)</MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet6>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet7>[7.0.0, 8.0)</MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet7>
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet8>8.0.0-preview.7.23375.6</MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet8>
<NETStandardLibraryPackageVersion>1.6.1</NETStandardLibraryPackageVersion>
<SystemIOFileSystemPackageVersion>4.3.0</SystemIOFileSystemPackageVersion>
<SystemXmlXPathXDocumentPackageVersion>4.0.1</SystemXmlXPathXDocumentPackageVersion>
Expand Down Expand Up @@ -59,6 +60,10 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet7)" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet8)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NSwag.Annotations\NSwag.Annotations.csproj" />
<ProjectReference Include="..\NSwag.Core\NSwag.Core.csproj" />
Expand All @@ -70,25 +75,26 @@
<Target Name="PopulateNuspec">
<PropertyGroup>
<NuspecProperties>
id=$(PackageId);
authors=$(Authors);
configuration=$(Configuration);
description=$(PackageDescription);
version=$(PackageVersion);
id=$(PackageId);
authors=$(Authors);
configuration=$(Configuration);
description=$(PackageDescription);
version=$(PackageVersion);

microsoftAspNetCoreMvcCorePackageVersion=$(MicrosoftAspNetCoreMvcCorePackageVersion);
microsoftAspNetCoreMvcFormattersJsonPackageVersion=$(MicrosoftAspNetCoreMvcFormattersJsonPackageVersion);
microsoftAspNetCoreStaticFilesPackageVersion=$(MicrosoftAspNetCoreStaticFilesPackageVersion);
microsoftExtensionsApiDescriptionServerPackageVersion=$(MicrosoftExtensionsApiDescriptionServerPackageVersion);
microsoftExtensionsFileProvidersEmbeddedPackageVersion=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersion);
microsoftExtensionsFileProvidersEmbeddedPackageVersionCore31=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionCore31);
microsoftExtensionsFileProvidersEmbeddedPackageVersionNet5=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet5);
microsoftExtensionsFileProvidersEmbeddedPackageVersionNet6=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet6);
microsoftExtensionsFileProvidersEmbeddedPackageVersionNet7=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet7);
netStandardLibraryPackageVersion=$(NETStandardLibraryPackageVersion);
systemIOFileSystemPackageVersion=$(SystemIOFileSystemPackageVersion);
systemXmlXPathXDocumentPackageVersion=$(SystemXmlXPathXDocumentPackageVersion);
</NuspecProperties>
microsoftAspNetCoreMvcCorePackageVersion=$(MicrosoftAspNetCoreMvcCorePackageVersion);
microsoftAspNetCoreMvcFormattersJsonPackageVersion=$(MicrosoftAspNetCoreMvcFormattersJsonPackageVersion);
microsoftAspNetCoreStaticFilesPackageVersion=$(MicrosoftAspNetCoreStaticFilesPackageVersion);
microsoftExtensionsApiDescriptionServerPackageVersion=$(MicrosoftExtensionsApiDescriptionServerPackageVersion);
microsoftExtensionsFileProvidersEmbeddedPackageVersion=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersion);
microsoftExtensionsFileProvidersEmbeddedPackageVersionCore31=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionCore31);
microsoftExtensionsFileProvidersEmbeddedPackageVersionNet5=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet5);
microsoftExtensionsFileProvidersEmbeddedPackageVersionNet6=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet6);
microsoftExtensionsFileProvidersEmbeddedPackageVersionNet7=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet7);
microsoftExtensionsFileProvidersEmbeddedPackageVersionNet8=$(MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet8);
netStandardLibraryPackageVersion=$(NETStandardLibraryPackageVersion);
systemIOFileSystemPackageVersion=$(SystemIOFileSystemPackageVersion);
systemXmlXPathXDocumentPackageVersion=$(SystemXmlXPathXDocumentPackageVersion);
</NuspecProperties>
</PropertyGroup>
</Target>
</Project>
11 changes: 11 additions & 0 deletions src/NSwag.AspNetCore/NSwag.AspNetCore.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
<dependency id="Microsoft.Extensions.ApiDescription.Server" version="$microsoftExtensionsApiDescriptionServerPackageVersion$" />
<dependency id="Microsoft.Extensions.FileProviders.Embedded" version="$MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet7$" exclude="Build,Analyzers" />
</group>
<group targetFramework="net8.0">
<dependency id="NSwag.Annotations" version="$version$" exclude="Build,Analyzers" />
<dependency id="NSwag.Core" version="$version$" exclude="Build,Analyzers" />
<dependency id="NSwag.Core.Yaml" version="$version$" exclude="Build,Analyzers" />
<dependency id="NSwag.Generation.AspNetCore" version="$version$" exclude="Build,Analyzers" />
<dependency id="NSwag.Generation" version="$version$" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.ApiDescription.Server" version="$microsoftExtensionsApiDescriptionServerPackageVersion$" />
<dependency id="Microsoft.Extensions.FileProviders.Embedded" version="$MicrosoftExtensionsFileProvidersEmbeddedPackageVersionNet8$" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
<files>
Expand All @@ -108,5 +117,7 @@
<file src="bin\$configuration$\net6.0\NSwag.AspNetCore.xml" target="lib\net6.0\" />
<file src="bin\$configuration$\net7.0\NSwag.AspNetCore.dll" target="lib\net7.0\" />
<file src="bin\$configuration$\net7.0\NSwag.AspNetCore.xml" target="lib\net7.0\" />
<file src="bin\$configuration$\net8.0\NSwag.AspNetCore.dll" target="lib\net8.0\" />
<file src="bin\$configuration$\net8.0\NSwag.AspNetCore.xml" target="lib\net8.0\" />
</files>
</package>
9 changes: 8 additions & 1 deletion src/NSwag.Commands/NSwag.Commands.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;</TargetFrameworks>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<!-- obsolete usage, missing comments -->
<NoWarn>$(NoWarn),618,1591</NoWarn>
Expand Down Expand Up @@ -47,6 +47,13 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0-preview.7.23375.6" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.7" />
Expand Down
4 changes: 4 additions & 0 deletions src/NSwag.Commands/NSwagDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ private string GetArgumentsPrefix()
{
return "\"" + System.IO.Path.Combine(RootBinaryDirectory, "Net70/dotnet-nswag.dll") + "\" ";
}
else if (runtime == Runtime.Net80)
{
return "\"" + System.IO.Path.Combine(RootBinaryDirectory, "Net80/dotnet-nswag.dll") + "\" ";
}
else
#endif
return "";
Expand Down
3 changes: 3 additions & 0 deletions src/NSwag.Commands/Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public enum Runtime
/// <summary>.NET 7 app.</summary>
Net70,

/// <summary>.NET 8 app.</summary>
Net80,

/// <summary>Execute in the same process.</summary>
Debug
}
Expand Down
4 changes: 4 additions & 0 deletions src/NSwag.Commands/RuntimeUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public static Runtime CurrentRuntime
{
return Runtime.NetCore21;
}
else if (framework.Version.Major >= 8)
{
return Runtime.Net80;
}
else if (framework.Version.Major >= 7)
{
return Runtime.Net70;
Expand Down
8 changes: 7 additions & 1 deletion src/NSwag.ConsoleCore/NSwag.ConsoleCore.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<AssemblyName>dotnet-nswag</AssemblyName>
<PackageId>NSwag.ConsoleCore</PackageId>
Expand Down Expand Up @@ -41,6 +41,12 @@
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.0-preview.7.23375.6" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NConsole" Version="3.9.6519.30868" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0;net7.0;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0;net6.0;net7.0;net8.0;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn),618,1591</NoWarn>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<NoWarn>$(NoWarn),618,1591</NoWarn>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -36,6 +36,10 @@
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.0-preview.7.23375.6" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NSwag.Annotations\NSwag.Annotations.csproj" />
<ProjectReference Include="..\NSwag.Generation.AspNetCore.Tests.Web\NSwag.Generation.AspNetCore.Tests.Web.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.6;net461;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard1.6;net461;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<PackageTags>Swagger Documentation AspNetCore</PackageTags>
<DefineConstants>$(DefineConstants);ASPNETCORE</DefineConstants>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
Expand Down Expand Up @@ -40,6 +40,12 @@
<PackageReference Include="Microsoft.Extensions.Options" Version="[7, 8)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0-preview.7.23375.6" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0-preview.7.23375.6" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NSwag.Generation\NSwag.Generation.csproj" />
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/NSwag.MSBuild/NSwag.MSBuild.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<file src="..\NSwag.ConsoleCore\bin\Release\netcoreapp3.1\Publish\**" target="tools/NetCore31" />
<file src="..\NSwag.ConsoleCore\bin\Release\net5.0\Publish\**" target="tools/Net50" />
<file src="..\NSwag.ConsoleCore\bin\release\net6.0\Publish\**" target="tools/Net60" />
<file src="..\NSwag.ConsoleCore\bin\release\net7.0\Publish\**" target="tools/Net70" />
<file src="..\NSwag.ConsoleCore\bin\release\net7.0\Publish\**" target="tools/Net70" />
<file src="..\NSwag.ConsoleCore\bin\release\net8.0\Publish\**" target="tools/Net80" />
</files>
</package>
5 changes: 4 additions & 1 deletion src/NSwag.MSBuild/NSwag.MSBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
<NSwagExe_Net50>dotnet "$(MSBuildThisFileDirectory)../tools/Net50/dotnet-nswag.dll"</NSwagExe_Net50>
<NSwagExe_Net60>dotnet "$(MSBuildThisFileDirectory)../tools/Net60/dotnet-nswag.dll"</NSwagExe_Net60>
<NSwagExe_Net70>dotnet "$(MSBuildThisFileDirectory)../tools/Net70/dotnet-nswag.dll"</NSwagExe_Net70>

<NSwagExe_Net80>dotnet "$(MSBuildThisFileDirectory)../tools/Net80/dotnet-nswag.dll"</NSwagExe_Net80>

<NSwagDir>$(MSBuildThisFileDirectory)../tools/Win/</NSwagDir>
<NSwagDir_Core21>$(MSBuildThisFileDirectory)../tools/NetCore21/</NSwagDir_Core21>
<NSwagDir_Core31>$(MSBuildThisFileDirectory)../tools/NetCore31/</NSwagDir_Core31>
<NSwagDir_Net50>$(MSBuildThisFileDirectory)../tools/Net50/</NSwagDir_Net50>
<NSwagDir_Net60>$(MSBuildThisFileDirectory)../tools/Net60/</NSwagDir_Net60>
<NSwagDir_Net70>$(MSBuildThisFileDirectory)../tools/Net70/</NSwagDir_Net70>
<NSwagDir_Net80>$(MSBuildThisFileDirectory)../tools/Net80/</NSwagDir_Net80>

</PropertyGroup>
</Project>
4 changes: 3 additions & 1 deletion src/NSwag.Npm/bin/nswag.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
"use strict";

var defaultCoreVersion = "Net70";
var defaultCoreVersion = "Net80";
var supportedCoreVersions = [
{ ver: '2.1', dir: "NetCore21", },
{ ver: '2.2', dir: "NetCore22", },
Expand All @@ -10,6 +10,7 @@ var supportedCoreVersions = [
{ ver: '5.0', dir: "Net50", },
{ ver: '6.0', dir: "Net60", },
{ ver: '7.0', dir: "Net70", },
{ ver: '8.0', dir: "Net80", },
];

// Initialize
Expand All @@ -25,6 +26,7 @@ args = args.replace("--core 3.1", "/runtime:NetCore31");
args = args.replace("--core 5.0", "/runtime:Net50");
args = args.replace("--core 6.0", "/runtime:Net60");
args = args.replace("--core 7.0", "/runtime:Net70");
args = args.replace("--core 8.0", "/runtime:Net80");
args = args.replace("--core", "/runtime:" + defaultCoreVersion);

// Search for full .NET installation
Expand Down
Loading

0 comments on commit 2ec4ada

Please sign in to comment.