From f926f58b8b4d7666ce130ff28b97fb173a952eee Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Wed, 14 Feb 2024 20:14:51 +0000 Subject: [PATCH] Only reference Microsoft.Extensions.PlatformAbstractions in .NET 6+ builds --- src/NSwag.Commands/NSwag.Commands.csproj | 2 +- src/NSwag.Commands/RuntimeUtilities.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NSwag.Commands/NSwag.Commands.csproj b/src/NSwag.Commands/NSwag.Commands.csproj index 4c7c35dd34..89b0e5430b 100644 --- a/src/NSwag.Commands/NSwag.Commands.csproj +++ b/src/NSwag.Commands/NSwag.Commands.csproj @@ -40,7 +40,7 @@ - + diff --git a/src/NSwag.Commands/RuntimeUtilities.cs b/src/NSwag.Commands/RuntimeUtilities.cs index f0b9f33d68..6659157246 100644 --- a/src/NSwag.Commands/RuntimeUtilities.cs +++ b/src/NSwag.Commands/RuntimeUtilities.cs @@ -7,7 +7,9 @@ //----------------------------------------------------------------------- using System; +#if !NETFRAMEWORK using Microsoft.Extensions.PlatformAbstractions; +#endif namespace NSwag.Commands {