Skip to content

Commit

Permalink
Feature: Upgrade to .NET 8.0 (#2560)
Browse files Browse the repository at this point in the history
* Feature: Upgrade to .NET 8.0

* Feature: Upgrade to .NET 8

* Docs: Add .NET 8.0

* Feature: Upgrade PowerShell.SDK to resolve issue with .NET 8

* Fix: Design issue with grid

* CI: Approve image & dependabot manual via label

* CI: Update mergify

* CI: Try to fix build
  • Loading branch information
BornToBeRoot authored Nov 15, 2023
1 parent 1fc9ee7 commit f9b4230
Show file tree
Hide file tree
Showing 25 changed files with 145 additions and 167 deletions.
16 changes: 7 additions & 9 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
pull_request_rules:
- name: automatic merge for pull request based on label
- name: automatic merge for pull request based on label and ci success
conditions:
- label~=LGTM$
#- check-success=Analyze (csharp)
#- check-success=CodeQL
- label~=LGTM$
- check-success=continuous-integration/appveyor/pr
actions:
merge:
method: squash
- name: automatic merge for Dependabot pull requests
- name: automatic merge for Dependabot pull requests based on ci success
conditions:
- author=dependabot[bot]
- author=dependabot[bot]
- check-success=continuous-integration/appveyor/pr
actions:
merge:
method: squash
- name: automatic merge for Transifex pull requests
- name: automatic merge for Transifex pull requests based on ci success
conditions:
- author=transifex-integration[bot]
- check-success=continuous-integration/appveyor/pr
actions:
merge:
method: squash
- name: automatic merge for ImgBot pull requests
- name: automatic merge for ImgBot pull requests based on ci success
conditions:
- author=imgbot[bot]
- author=imgbot[bot]
- check-success=continuous-integration/appveyor/pr
actions:
merge:
Expand Down
2 changes: 1 addition & 1 deletion InnoSetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "NETworkManager"
#define MyAppVersion "2023.9.21.0"
#define MyAppVersion "2023.11.15.0"
#define MyAppPublisher "BornToBeRoot"
#define MyAppURL "https://github.com/BornToBeRoot/NETworkManager/"
#define MyAppExeName "NETworkManager.exe"
Expand Down
2 changes: 1 addition & 1 deletion Source/3rdparty/Dragablz
4 changes: 2 additions & 2 deletions Source/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("2023.10.22.0")]
[assembly: AssemblyFileVersion("2023.10.22.0")]
[assembly: AssemblyVersion("2023.11.15.0")]
[assembly: AssemblyFileVersion("2023.11.15.0")]
13 changes: 4 additions & 9 deletions Source/NETworkManager.Controls/NETworkManager.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Controls</RootNamespace>
<AssemblyName>NETworkManager.Controls</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference
Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms"
TargetingPackVersion="6.0.0" />
</ItemGroup>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{BD4DDC21-7B64-41B2-BAC7-8173E0FE84BE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NETworkManager.Converters</RootNamespace>
<AssemblyName>NETworkManager.Converters</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NETworkManager.Documentation</RootNamespace>
<AssemblyName>NETworkManager.Documentation</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down Expand Up @@ -35,10 +36,6 @@
<None Remove="Licenses\PSDiscoveryProtocol.txt" />
<None Remove="Licenses\SharpSnmpLib.txt" />
</ItemGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{FF225C2E-AA67-4B10-939A-6C046CEF8697}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Localization</RootNamespace>
<AssemblyName>NETworkManager.Localization</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<NoWarn>1701;1702;CA1712</NoWarn>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Flags\cs-CZ.png" />
<None Remove="Resources\Flags\en-US.png" />
Expand Down
19 changes: 9 additions & 10 deletions Source/NETworkManager.Models/NETworkManager.Models.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{8A2859DC-38B6-4E9D-A6B2-1828DC6641B3}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Models</RootNamespace>
<AssemblyName>NETworkManager.Models</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<CsWinRTWindowsMetadata>sdk</CsWinRTWindowsMetadata>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\OUI.xml" />
<None Remove="Resources\Ports.xml" />
Expand All @@ -29,9 +26,11 @@
<EmbeddedResource Include="Resources\PSDiscoveryProtocol.psm1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AWSSDK.Core" Version="3.7.300" />
<PackageReference Include="AWSSDK.Core" Version="3.7.300.3" />
<PackageReference Include="DnsClient" Version="1.7.0" />
<PackageReference Include="IPNetwork2" Version="2.6.618" />
<PackageReference Include="IPNetwork2" Version="2.6.618">
<Aliases>IPNetwork2</Aliases>
</PackageReference>
<PackageReference Include="Lextm.SharpSnmpLib" Version="12.5.2" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="MahApps.Metro" Version="2.4.10" />
Expand All @@ -43,7 +42,7 @@
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2151.40" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.16" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.0-rc.1" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions Source/NETworkManager.Models/Network/HostRangeHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Amazon.Util.Internal;
extern alias IPNetwork2;

using NETworkManager.Utilities;
using System;
using System.Collections.Concurrent;
Expand Down Expand Up @@ -39,7 +40,7 @@ public static IPAddress[] CreateIPAddressesFromIPRanges(string[] ipRanges, Cance

// 192.168.0.0/24 or 192.168.0.0/255.255.255.0
case var _ when Regex.IsMatch(ipOrRange, RegexHelper.IPv4AddressCidrRegex) || Regex.IsMatch(ipOrRange, RegexHelper.IPv4AddressSubnetmaskRegex):
var network = IPNetwork.Parse(ipOrRange);
var network = IPNetwork2.System.Net.IPNetwork.Parse(ipOrRange);

Parallel.For(IPv4Address.ToInt32(network.Network), IPv4Address.ToInt32(network.Broadcast) + 1, parallelOptions, i =>
{
Expand Down
6 changes: 4 additions & 2 deletions Source/NETworkManager.Models/Network/IPNetworkInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Net;
extern alias IPNetwork2;

using System.Net;
using System.Numerics;

namespace NETworkManager.Models.Network;
Expand All @@ -25,7 +27,7 @@ public IPNetworkInfo()

}

public IPNetworkInfo(IPNetwork ipNetwork)
public IPNetworkInfo(IPNetwork2.System.Net.IPNetwork ipNetwork)
{
Network = ipNetwork.Network;
Broadcast = ipNetwork.Broadcast;
Expand Down
11 changes: 4 additions & 7 deletions Source/NETworkManager.Profiles/NETworkManager.Profiles.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{D3B37F13-E8E6-4218-9E8E-96D52432A9CF}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Profiles</RootNamespace>
<AssemblyName>NETworkManager.Profiles</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
11 changes: 4 additions & 7 deletions Source/NETworkManager.Settings/NETworkManager.Settings.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{954E8703-3E6E-42BF-BD28-F0B19BE10E0C}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Settings</RootNamespace>
<AssemblyName>NETworkManager.Settings</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand All @@ -16,10 +17,6 @@
<Page Remove="Themes\Light.Accent1.xaml" />
<Page Remove="Themes\Light.Accent2.xaml" />
</ItemGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
11 changes: 4 additions & 7 deletions Source/NETworkManager.Update/NETworkManager.Update.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{008467AF-D83F-4B1E-8733-B65136F595F2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NETworkManager.Update</RootNamespace>
<AssemblyName>NETworkManager.Update</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{93733008-7269-460D-8390-AB281C75DB91}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Utilities.WPF</RootNamespace>
<AssemblyName>NETworkManager.Utilities.WPF</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference
Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms"
TargetingPackVersion="6.0.0" />
</ItemGroup>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Utilities</RootNamespace>
<AssemblyName>NETworkManager.Utilities</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms" TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{29172E71-52AF-4E64-9683-30C5F4D0C746}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>NETworkManager.Validators</RootNamespace>
<AssemblyName>NETworkManager.Validators</AssemblyName>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PlatformTarget>x64</PlatformTarget>
<SelfContained>false</SelfContained>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
<!-- Target 6.0.0 for compatibility https://github.com/dotnet/core/issues/7176 -->
<ItemGroup>
<FrameworkReference
Update="Microsoft.WindowsDesktop.App;Microsoft.WindowsDesktop.App.WPF;Microsoft.WindowsDesktop.App.WindowsForms"
TargetingPackVersion="6.0.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup>
Expand Down
Loading

0 comments on commit f9b4230

Please sign in to comment.