Skip to content

Commit

Permalink
Make WindowsConsoleSystemBrowser target net8.0 and get compiling.
Browse files Browse the repository at this point in the history
The registry methods needed be decorated with SupportedOSPlatform to compile.
  • Loading branch information
damianh committed Feb 7, 2025
1 parent 2a7e66a commit 276386c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.0.0" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(WilsonVersion)" />
<PackageVersion Include="Microsoft.IdentityModel.Logging" Version="$(WilsonVersion)" />
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(WilsonVersion)" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Microsoft.NETCore.Jit" Version="2.0.8" />
Expand All @@ -90,6 +91,7 @@
<PackageVersion Include="RichardSzalay.MockHttp" Version="7.0.0" />
<PackageVersion Include="Serilog" Version="4.2.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.TextWriter" Version="3.0.0" />
<PackageVersion Include="Serilog.Sinks.XUnit" Version="3.0.19" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="9.0.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Clients;
using Clients;
using Duende.IdentityModel.Client;
using Duende.IdentityModel.OidcClient;
using Microsoft.IdentityModel.Logging;
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net472</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.IdentityModel.OidcClient" />

<PackageReference Include="Microsoft.IdentityModel.Logging"/>
<PackageReference Include="Serilog.Extensions.Logging" />
<PackageReference Include="Serilog.Sinks.Console" />
</ItemGroup>
Expand Down

0 comments on commit 276386c

Please sign in to comment.