From 276386c8d98171a1cfba64951d07ac3c7ae9e387 Mon Sep 17 00:00:00 2001 From: Damian Hickey <57436+damianh@users.noreply.github.com> Date: Fri, 7 Feb 2025 22:25:22 +0100 Subject: [PATCH] Make WindowsConsoleSystemBrowser target net8.0 and get compiling. The registry methods needed be decorated with SupportedOSPlatform to compile. --- Directory.Packages.props | 2 ++ .../clients/src/WindowsConsoleSystemBrowser/Program.cs | 4 +++- .../src/WindowsConsoleSystemBrowser/RegistryConfig.cs | 4 +++- .../WindowsConsoleSystemBrowser.csproj | 7 ++++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 27c38ca8a..e1acc0078 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -71,6 +71,7 @@ + @@ -90,6 +91,7 @@ + diff --git a/identity-server/clients/src/WindowsConsoleSystemBrowser/Program.cs b/identity-server/clients/src/WindowsConsoleSystemBrowser/Program.cs index 3d842c143..848d84f11 100644 --- a/identity-server/clients/src/WindowsConsoleSystemBrowser/Program.cs +++ b/identity-server/clients/src/WindowsConsoleSystemBrowser/Program.cs @@ -1,4 +1,4 @@ -using Clients; +using Clients; using Duende.IdentityModel.Client; using Duende.IdentityModel.OidcClient; using Microsoft.IdentityModel.Logging; @@ -8,10 +8,12 @@ using System.Linq; using System.Net; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Threading.Tasks; namespace WindowsConsoleSystemBrowser { + [SupportedOSPlatform("Windows")] class Program { static async Task Main(string[] args) diff --git a/identity-server/clients/src/WindowsConsoleSystemBrowser/RegistryConfig.cs b/identity-server/clients/src/WindowsConsoleSystemBrowser/RegistryConfig.cs index 3ed7fe5be..a671ce3ac 100644 --- a/identity-server/clients/src/WindowsConsoleSystemBrowser/RegistryConfig.cs +++ b/identity-server/clients/src/WindowsConsoleSystemBrowser/RegistryConfig.cs @@ -1,9 +1,11 @@ -using System; +using System; using System.Reflection; +using System.Runtime.Versioning; using Microsoft.Win32; namespace WindowsConsoleSystemBrowser { + [SupportedOSPlatform("Windows")] class RegistryConfig { public RegistryConfig(string uriScheme) diff --git a/identity-server/clients/src/WindowsConsoleSystemBrowser/WindowsConsoleSystemBrowser.csproj b/identity-server/clients/src/WindowsConsoleSystemBrowser/WindowsConsoleSystemBrowser.csproj index 3f921821a..2430b5c72 100644 --- a/identity-server/clients/src/WindowsConsoleSystemBrowser/WindowsConsoleSystemBrowser.csproj +++ b/identity-server/clients/src/WindowsConsoleSystemBrowser/WindowsConsoleSystemBrowser.csproj @@ -1,13 +1,14 @@ - + Exe - net472 + net8.0 + win-x64 - +