Skip to content

Commit

Permalink
Update project to .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
reagcz committed Oct 12, 2024
1 parent 6f84426 commit 02f23a9
Show file tree
Hide file tree
Showing 32 changed files with 35 additions and 206 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
App_Packages_Archive: IdeapadToolkit.zip
License_Path: IdeapadToolkit\Properties\PublishProfiles\3RD_PARTY_LICENSES.txt
App_Publish_Directory: bin\Release\net6.0-windows\publish\win-x64
App_Publish_Directory: bin\Release\net8.0-windows\publish\win-x64
App_Project_Directory: IdeapadToolkit\
Solution_Path: IdeapadToolkit.sln
Project_Path: IdeapadToolkit\IdeapadToolkit.csproj
Expand All @@ -29,10 +29,10 @@ jobs:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

# Install the .NET Core workload
- name: Install .NET Core
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'

# Add MsBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
Expand Down
9 changes: 1 addition & 8 deletions IdeapadToolkit/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
using Hardcodet.Wpf.TaskbarNotification;
using IdeapadToolkit.Models;
using IdeapadToolkit.Services;
using IdeapadToolkit.Services;
using IdeapadToolkit.ViewModels;
using IdeapadToolkit.Views;
using SimpleInjector;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Serilog;
using System.Windows;
using Serilog.Core;
Expand Down
4 changes: 0 additions & 4 deletions IdeapadToolkit/Helpers/BooleanToVisibilityConverter.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows;
using System.Globalization;
Expand Down
3 changes: 0 additions & 3 deletions IdeapadToolkit/Helpers/Win32.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using static IdeapadToolkit.Services.UEFISettingsService;

namespace IdeapadToolkitService.Helpers
Expand Down
15 changes: 7 additions & 8 deletions IdeapadToolkit/IdeapadToolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
<AnalysisLevel>latest-recommended</AnalysisLevel>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Common" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
<PackageReference Include="CommunityToolkit.Common" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="2.0.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.7-preview.2" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="SimpleInjector" Version="5.4.1" />
<PackageReference Include="Serilog" Version="4.0.2" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="SimpleInjector" Version="5.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 0 additions & 12 deletions IdeapadToolkit/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
using IdeapadToolkit.Services;
using IdeapadToolkit.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace IdeapadToolkit
{
Expand Down
7 changes: 1 addition & 6 deletions IdeapadToolkit/Models/CChargingMode.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Models
{
Expand Down
7 changes: 1 addition & 6 deletions IdeapadToolkit/Models/CIntelligentCooling.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Models
{
Expand Down
7 changes: 1 addition & 6 deletions IdeapadToolkit/Models/CUSBBatteryCharger.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Models
{
Expand Down
7 changes: 1 addition & 6 deletions IdeapadToolkit/Models/CUSBCharger.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Models
{
Expand Down
8 changes: 1 addition & 7 deletions IdeapadToolkit/Models/ChargingMode.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Models
namespace IdeapadToolkit.Models
{
public enum ChargingMode
{
Expand Down
8 changes: 1 addition & 7 deletions IdeapadToolkit/Models/PowerPlanEnum.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Models
namespace IdeapadToolkit.Models
{
public enum PowerPlan
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0-windows\publish\win-x64\</PublishDir>
<PublishDir>bin\Release\net8.0-windows\publish\win-x64\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
Expand Down
5 changes: 0 additions & 5 deletions IdeapadToolkit/Services/AdministratorPermissionService.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Services
{
Expand Down
8 changes: 1 addition & 7 deletions IdeapadToolkit/Services/IAdministratorPermissionService.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Services
namespace IdeapadToolkit.Services
{
public interface IAdministratorPermissionService
{
Expand Down
5 changes: 0 additions & 5 deletions IdeapadToolkit/Services/ILenovoPowerSettingsService.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using IdeapadToolkit.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Services
{
Expand Down
4 changes: 0 additions & 4 deletions IdeapadToolkit/Services/INavigationService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows;

Expand Down
8 changes: 1 addition & 7 deletions IdeapadToolkit/Services/IRunOnStartupService.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Services
namespace IdeapadToolkit.Services
{
public interface IRunOnStartupService
{
Expand Down
8 changes: 1 addition & 7 deletions IdeapadToolkit/Services/IUEFISettingsService.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Services
namespace IdeapadToolkit.Services
{
public interface IUEFISettingsService
{
Expand Down
7 changes: 0 additions & 7 deletions IdeapadToolkit/Services/LenovoPowerSettingsService.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
using IdeapadToolkit.Models;
using Microsoft.VisualBasic;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace IdeapadToolkit.Services
{
Expand Down
4 changes: 0 additions & 4 deletions IdeapadToolkit/Services/NavigationService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows;
using SimpleInjector;
Expand Down
5 changes: 0 additions & 5 deletions IdeapadToolkit/Services/RunOnStartupService.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.Services
{
Expand Down
5 changes: 0 additions & 5 deletions IdeapadToolkit/Services/UEFISettingsService.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using IdeapadToolkitService.Helpers;
using Serilog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Documents;

namespace IdeapadToolkit.Services
{
Expand Down
3 changes: 0 additions & 3 deletions IdeapadToolkit/ViewModels/LenovoSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
using ModernWpf.Controls;
using Serilog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.ViewModels
Expand Down
4 changes: 0 additions & 4 deletions IdeapadToolkit/ViewModels/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
using IdeapadToolkit.Services;
using ModernWpf.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IdeapadToolkit.ViewModels
{
Expand Down
14 changes: 0 additions & 14 deletions IdeapadToolkit/Views/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
using IdeapadToolkit.ViewModels;
using ModernWpf.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace IdeapadToolkit.Views
{
Expand Down
14 changes: 0 additions & 14 deletions IdeapadToolkit/Views/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
using IdeapadToolkit.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace IdeapadToolkit.Views
{
Expand Down
14 changes: 1 addition & 13 deletions IdeapadToolkit/Views/TrayIconView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
using Hardcodet.Wpf.TaskbarNotification;
using IdeapadToolkit.ViewModels;
using IdeapadToolkit.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace IdeapadToolkit.Views
{
Expand Down
Loading

0 comments on commit 02f23a9

Please sign in to comment.