Skip to content

Commit

Permalink
.NET9, Windows 11 24H2, Server 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
Rans4ckeR committed Nov 13, 2024
1 parent 3e8fbf4 commit 0eadd1b
Show file tree
Hide file tree
Showing 120 changed files with 506 additions and 526 deletions.
47 changes: 37 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ insert_final_newline = false
# Organize usings
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
file_header_template = unset
file_header_template =

# this. and Me. preferences
dotnet_style_qualification_for_event = false:warning
Expand Down Expand Up @@ -82,14 +82,14 @@ csharp_style_var_for_built_in_types = false:warning
csharp_style_var_when_type_is_apparent = true:warning

# Expression-bodied members
csharp_style_expression_bodied_accessors = true:warning
csharp_style_expression_bodied_constructors = true:warning
csharp_style_expression_bodied_indexers = true:warning
csharp_style_expression_bodied_lambdas = true:warning
csharp_style_expression_bodied_local_functions = true:warning
csharp_style_expression_bodied_methods = true:warning
csharp_style_expression_bodied_operators = true:warning
csharp_style_expression_bodied_properties = true:warning
csharp_style_expression_bodied_accessors = when_on_single_line:warning
csharp_style_expression_bodied_constructors = when_on_single_line:warning
csharp_style_expression_bodied_indexers = when_on_single_line:warning
csharp_style_expression_bodied_lambdas = when_on_single_line:warning
csharp_style_expression_bodied_local_functions = when_on_single_line:warning
csharp_style_expression_bodied_methods = when_on_single_line:warning
csharp_style_expression_bodied_operators = when_on_single_line:warning
csharp_style_expression_bodied_properties = when_on_single_line:warning

# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:warning
Expand Down Expand Up @@ -132,7 +132,7 @@ csharp_style_unused_value_assignment_preference = discard_variable:warning
csharp_style_unused_value_expression_statement_preference = discard_variable:warning

# 'using' directive preferences
csharp_using_directive_placement = inside_namespace:warning
csharp_using_directive_placement = outside_namespace:warning

# New line preferences
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false:warning
Expand Down Expand Up @@ -405,6 +405,13 @@ dotnet_diagnostic.CA1008.severity = none
dotnet_diagnostic.API1002.severity = none
dotnet_diagnostic.API1003.severity = warning
dotnet_diagnostic.CA2263.severity = warning
csharp_prefer_static_anonymous_function = true:warning
csharp_prefer_system_threading_lock = true:warning
dotnet_diagnostic.IDE0330.severity = warning
dotnet_diagnostic.IDE0320.severity = warning

# ReSharper properties
resharper_braces_redundant = false

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
Expand Down Expand Up @@ -606,6 +613,26 @@ dotnet_diagnostic.CA1506.severity = warning

# CA1509: Invalid entry in code metrics rule specification file
dotnet_diagnostic.CA1509.severity = warning
dotnet_diagnostic.MSTEST0015.severity = warning
dotnet_diagnostic.MSTEST0016.severity = warning
dotnet_diagnostic.CA1871.severity = warning
dotnet_diagnostic.MSTEST0007.severity = warning
dotnet_diagnostic.CA1872.severity = warning
dotnet_diagnostic.MSTEST0019.severity = warning
dotnet_diagnostic.MSTEST0020.severity = warning
dotnet_diagnostic.MSTEST0021.severity = warning
dotnet_diagnostic.MSTEST0022.severity = warning
dotnet_diagnostic.MSTEST0025.severity = warning
dotnet_diagnostic.MSTEST0017.severity = warning
dotnet_diagnostic.MSTEST0023.severity = warning
dotnet_diagnostic.MSTEST0024.severity = warning
dotnet_diagnostic.MSTEST0032.severity = warning
dotnet_diagnostic.MSTEST0029.severity = warning
dotnet_diagnostic.MSTEST0026.severity = warning
dotnet_diagnostic.MSTEST0030.severity = warning
dotnet_diagnostic.MSTEST0031.severity = warning
dotnet_diagnostic.MSTEST0034.severity = warning
dotnet_diagnostic.MSTEST0035.severity = warning

[*.vb]
dotnet_diagnostic.CA1047.severity = warning
14 changes: 7 additions & 7 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@main
with:
dotnet-version: '8.x.x'
dotnet-version: '9.x.x'
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@main
with:
Expand All @@ -27,14 +27,14 @@ jobs:
uses: gittools/actions/gitversion/execute@main
- name: Publish
run: |
dotnet publish CipherPunk.UI/CipherPunk.UI.csproj --no-self-contained --framework net8.0-windows --runtime win-x86 -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishSingleFile=true -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
dotnet publish CipherPunk.UI/CipherPunk.UI.csproj --no-self-contained --framework net8.0-windows --runtime win-x64 -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishSingleFile=true -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
dotnet publish CipherPunk.UI/CipherPunk.UI.csproj --no-self-contained --framework net8.0-windows --runtime win-arm64 -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishSingleFile=true -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
dotnet publish CipherPunk.UI/CipherPunk.UI.csproj --no-self-contained --framework net9.0-windows --runtime win-x86 -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishSingleFile=true -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
dotnet publish CipherPunk.UI/CipherPunk.UI.csproj --no-self-contained --framework net9.0-windows --runtime win-x64 -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishSingleFile=true -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
dotnet publish CipherPunk.UI/CipherPunk.UI.csproj --no-self-contained --framework net9.0-windows --runtime win-arm64 -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishSingleFile=true -p:DebugType=embedded -p:AssemblyVersion=$env:GitVersion_AssemblySemVer -p:FileVersion=$env:GitVersion_AssemblySemFileVer -p:InformationalVersion=$env:GitVersion_InformationalVersion
- name: Zip
run: |
7z a -r "${{ format('CipherPunk-v{0}-net8.0-windows-x86.zip', env.GitVersion_SemVer) }}" "./CipherPunk.UI/bin/Release/net8.0-windows/win-x86/publish/*.*" "-x!*.xml"
7z a -r "${{ format('CipherPunk-v{0}-net8.0-windows-x64.zip', env.GitVersion_SemVer) }}" "./CipherPunk.UI/bin/Release/net8.0-windows/win-x64/publish/*.*" "-x!*.xml"
7z a -r "${{ format('CipherPunk-v{0}-net8.0-windows-ARM64.zip', env.GitVersion_SemVer) }}" "./CipherPunk.UI/bin/Release/net8.0-windows/win-arm64/publish/*.*" "-x!*.xml"
7z a -r "${{ format('CipherPunk-v{0}-net9.0-windows-x86.zip', env.GitVersion_SemVer) }}" "./CipherPunk.UI/bin/Release/net9.0-windows/win-x86/publish/*.*" "-x!*.xml"
7z a -r "${{ format('CipherPunk-v{0}-net9.0-windows-x64.zip', env.GitVersion_SemVer) }}" "./CipherPunk.UI/bin/Release/net9.0-windows/win-x64/publish/*.*" "-x!*.xml"
7z a -r "${{ format('CipherPunk-v{0}-net9.0-windows-ARM64.zip', env.GitVersion_SemVer) }}" "./CipherPunk.UI/bin/Release/net9.0-windows/win-arm64/publish/*.*" "-x!*.xml"
- name: Release
run: gh release create v${{ env.GitVersion_SemVer }} (get-item *.zip) --generate-notes --target ${{ github.sha }} ${{ env.PreReleaseTag != '' && '--prerelease' || '' }}
env:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ StyleCopReport.xml
*.pgc
*.pgd
*.rsp
# but not Directory.Build.rsp, as it configures directory-level build defaults
!Directory.Build.rsp
*.sbr
*.tlb
*.tli
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>CipherPunk.CipherSuiteInfoApi</AssemblyName>
<RootNamespace>CipherPunk.CipherSuiteInfoApi</RootNamespace>
<Title>CipherPunk.CipherSuiteInfoApi</Title>
Expand Down Expand Up @@ -29,6 +29,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions CipherPunk.CipherSuiteInfoApi/CipherSuiteInfoApiService.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace CipherPunk.CipherSuiteInfoApi;

using System.Collections.Frozen;
using System.Collections.Frozen;
using System.Net;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;

namespace CipherPunk.CipherSuiteInfoApi;

internal sealed class CipherSuiteInfoApiService(IHttpClientFactory httpClientFactory)
: ICipherSuiteInfoApiService
{
Expand Down
4 changes: 2 additions & 2 deletions CipherPunk.CipherSuiteInfoApi/Entities/CipherSuite.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CipherPunk.CipherSuiteInfoApi;
using System.Text.Json.Serialization;

using System.Text.Json.Serialization;
namespace CipherPunk.CipherSuiteInfoApi;

public readonly record struct CipherSuite(
[property: JsonPropertyName("iana_name")] string IanaName,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace CipherPunk.CipherSuiteInfoApi;

using System.Net;
using System.Net;
using Microsoft.Extensions.DependencyInjection;

namespace CipherPunk.CipherSuiteInfoApi;

public static class ServiceCollectionExtensions
{
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions CipherPunk.CipherSuiteInfoApi/ICipherSuiteInfoApiService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CipherPunk.CipherSuiteInfoApi;
using System.Collections.Frozen;

using System.Collections.Frozen;
namespace CipherPunk.CipherSuiteInfoApi;

public interface ICipherSuiteInfoApiService
{
Expand Down
6 changes: 3 additions & 3 deletions CipherPunk.UI/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace CipherPunk.UI;

using System.Globalization;
using System.Globalization;
using System.Windows;
using System.Windows.Input;
using System.Windows.Markup;
Expand All @@ -9,6 +7,8 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

namespace CipherPunk.UI;

internal sealed partial class App
{
private readonly IHost host;
Expand Down
13 changes: 7 additions & 6 deletions CipherPunk.UI/CipherPunk.UI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>net9.0-windows</TargetFramework>
<AssemblyName>CipherPunk.UI</AssemblyName>
<RootNamespace>CipherPunk.UI</RootNamespace>
<Title>CipherPunk.UI</Title>
Expand Down Expand Up @@ -30,20 +30,21 @@
<ApplicationIcon>..\CipherPunk.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Win32Docs" Version="0.1.42-alpha">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="59.0.13-preview">
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="63.0.31-preview">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.WDK.Win32Metadata" Version="0.10.7-experimental">
<PackageReference Include="Microsoft.Windows.WDK.Win32Metadata" Version="0.13.25-experimental">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions CipherPunk.UI/Entities/UiMemberStatus.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CipherPunk.UI;
using CommunityToolkit.Mvvm.ComponentModel;

using CommunityToolkit.Mvvm.ComponentModel;
namespace CipherPunk.UI;

internal sealed class UiMemberStatus<T>(T member, bool enabled) : ObservableObject
{
Expand Down
2 changes: 0 additions & 2 deletions CipherPunk.UI/Entities/UiRemoteServerTestResult.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace CipherPunk.UI;

using CipherPunk;

internal readonly record struct UiRemoteServerTestResult(
TlsVersion TlsVersion,
string CipherSuiteId,
Expand Down
20 changes: 8 additions & 12 deletions CipherPunk.UI/Entities/UiSchannelProtocolSettings.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
namespace CipherPunk.UI;
using CommunityToolkit.Mvvm.ComponentModel;

using CommunityToolkit.Mvvm.ComponentModel;
namespace CipherPunk.UI;

internal sealed class UiSchannelProtocolSettings : ObservableObject
{
private SchannelProtocol protocol;
private SchannelProtocolStatus clientStatus;
private SchannelProtocolStatus serverStatus;

public UiSchannelProtocolSettings(SchannelProtocolSettings schannelProtocolSettings)
{
Protocol = schannelProtocolSettings.Protocol;
Expand All @@ -17,19 +13,19 @@ public UiSchannelProtocolSettings(SchannelProtocolSettings schannelProtocolSetti

public SchannelProtocol Protocol
{
get => protocol;
set => SetProperty(ref protocol, value);
get;
set => SetProperty(ref field, value);
}

public SchannelProtocolStatus ClientStatus
{
get => clientStatus;
set => SetProperty(ref clientStatus, value);
get;
set => SetProperty(ref field, value);
}

public SchannelProtocolStatus ServerStatus
{
get => serverStatus;
set => SetProperty(ref serverStatus, value);
get;
set => SetProperty(ref field, value);
}
}
Loading

0 comments on commit 0eadd1b

Please sign in to comment.