Skip to content

Commit

Permalink
Upgrade to .NET 9 and remove AppCenter
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenquyhy committed Dec 16, 2024
1 parent d9a5534 commit a971489
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 33 deletions.
9 changes: 0 additions & 9 deletions FlightStreamDeck.AddOn/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using FlightStreamDeck.Logics;
using FlightStreamDeck.Logics.Actions;
using FlightStreamDeck.SimConnectFSX;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand All @@ -28,12 +25,6 @@ public partial class App : Application

protected override void OnStartup(StartupEventArgs e)
{
#if DEBUG
AppCenter.Start("9343b8d4-4141-40c9-9758-5c7e2fb3a1a0", typeof(Analytics), typeof(Crashes));
#else
AppCenter.Start("0d85baad-aa1e-4694-ae3b-c6fed2056656",typeof(Analytics), typeof(Crashes));
#endif

var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
Expand Down
24 changes: 12 additions & 12 deletions FlightStreamDeck.AddOn/FlightStreamDeck.AddOn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net9.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<PlatformTarget>x64</PlatformTarget>
<ApplicationIcon>icon.ico</ApplicationIcon>
Expand All @@ -15,17 +15,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.123" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.3" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="System.IO" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
Expand Down Expand Up @@ -223,4 +221,6 @@
<Folder Include="Profiles\" />
</ItemGroup>

<ProjectExtensions><VisualStudio><UserProperties manifest_1json__JsonSchema="https://github.com/GeekyEggo/SharpDeck/raw/src/SharpDeck.PropertyInspector/manifest-schema.json" /></VisualStudio></ProjectExtensions>

</Project>
2 changes: 1 addition & 1 deletion FlightStreamDeck.Core/FlightStreamDeck.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion FlightStreamDeck.Logics/FlightStreamDeck.Logics.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net9.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
12 changes: 6 additions & 6 deletions FlightStreamDeck.LogicsTests/FlightStreamDeck.LogicsTests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net9.0-windows</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net9.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rd build /s /q
mkdir build
dotnet publish FlightStreamDeck.AddOn\FlightStreamDeck.AddOn.csproj -c Release -r win10-x64 --self-contained
XCopy FlightStreamDeck.AddOn\bin\Release\net7.0-windows\win10-x64\publish build\tech.flighttracker.streamdeck.sdPlugin /e /h /c /i
dotnet publish FlightStreamDeck.AddOn\FlightStreamDeck.AddOn.csproj -c Release -r win-x64 --self-contained
XCopy FlightStreamDeck.AddOn\bin\Release\net9.0-windows\win-x64\publish build\tech.flighttracker.streamdeck.sdPlugin /e /h /c /i
cd build
DistributionTool.exe -b -i tech.flighttracker.streamdeck.sdPlugin -o .
cd ..

0 comments on commit a971489

Please sign in to comment.