Skip to content

Commit

Permalink
.NET 8 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
chubrik committed Nov 22, 2023
1 parent 115bf2a commit 98261a3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion XConsole.Demo/XConsole.Demo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net8.0-windows;net6.0-windows</TargetFrameworks>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
35 changes: 16 additions & 19 deletions XConsole/XConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1933,18 +1933,15 @@ public static int WindowTop
}

/// <inheritdoc cref="Console.WindowWidth"/>
public static int WindowWidth
{
#if NET
[UnsupportedOSPlatform("android")]
[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[UnsupportedOSPlatform("android")]
[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
#endif
public static int WindowWidth
{
get => Console.WindowWidth;
#if NET
[SupportedOSPlatform("windows")]
#endif
set
{
lock (_syncLock)
Expand All @@ -1953,18 +1950,15 @@ public static int WindowWidth
}

/// <inheritdoc cref="Console.WindowHeight"/>
public static int WindowHeight
{
#if NET
[UnsupportedOSPlatform("android")]
[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[UnsupportedOSPlatform("android")]
[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
#endif
public static int WindowHeight
{
get => Console.WindowHeight;
#if NET
[SupportedOSPlatform("windows")]
#endif
set
{
lock (_syncLock)
Expand All @@ -1983,7 +1977,10 @@ public static void SetWindowPosition(int left, int top)

/// <inheritdoc cref="Console.SetWindowSize(int, int)"/>
#if NET
[SupportedOSPlatform("windows")]
[UnsupportedOSPlatform("android")]
[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
#endif
public static void SetWindowSize(int width, int height)
{
Expand Down
3 changes: 2 additions & 1 deletion XConsole/XConsole.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net5.0;netstandard2.0;netstandard1.3;netframework462</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netstandard2.0;netstandard1.3;netframework462</TargetFrameworks>
<AllowUnsafeBlocks Condition="'$(TargetFramework)'=='net7.0'">true</AllowUnsafeBlocks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 98261a3

Please sign in to comment.