Skip to content

Commit 6b81c2a

Browse files
committed
revert to .net 6 because of deb packing
1 parent da55a6a commit 6b81c2a

File tree

11 files changed

+20
-14
lines changed

11 files changed

+20
-14
lines changed

.github/workflows/ci-cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Buid and test application
1313
runs-on: ubuntu-latest
1414
container:
15-
image: mcr.microsoft.com/dotnet/sdk:7.0.103-jammy
15+
image: mcr.microsoft.com/dotnet/sdk:6.0
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Restore dependencies
@@ -27,7 +27,7 @@ jobs:
2727
if: startsWith(github.ref, 'refs/tags/')
2828
runs-on: ubuntu-latest
2929
container:
30-
image: mcr.microsoft.com/dotnet/sdk:7.0.103-jammy
30+
image: mcr.microsoft.com/dotnet/sdk:6.0
3131
needs: [build-and-test]
3232
steps:
3333
- uses: actions/checkout@v2
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
cd src/PlexRichPresence.UI.Avalonia
4343
export PATH="$PATH:/github/home/.dotnet/tools"
44-
dotnet deb -c Release -f net7.0 -o dist/linux-x64
44+
dotnet deb -c Release -f net6.0 -o dist/linux-x64
4545
- name: Save deb package as artifact
4646
uses: actions/upload-artifact@v2
4747
with:

src/PlexRichPresence.DiscordRichPresence/PlexRichPresence.DiscordRichPresence.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<RootNamespace>PlexRichPresence.DiscordRichPresence</RootNamespace>

src/PlexRichPresence.PlexActivity/PlexRichPresence.PlexActivity.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

src/PlexRichPresence.UI.Avalonia/App.axaml.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using FluentAvalonia.Styling;
1111
using FluentAvalonia.UI.Controls;
1212
using Microsoft.Extensions.DependencyInjection;
13+
using Microsoft.Extensions.Logging;
1314
using Plex.Api.Factories;
1415
using Plex.Library.Factories;
1516
using Plex.ServerApi;
@@ -178,7 +179,12 @@ private void Exit_Onclick(object? _, EventArgs e)
178179
PlexActivityPageViewModel viewModel = serviceProvider.GetService<PlexActivityPageViewModel>()
179180
?? throw new InvalidOperationException(
180181
"Can't get storage service from DI");
181-
storageService.PutAsync("enableIdleStatus", viewModel.EnableIdleStatus.ToString());
182+
var logger = serviceProvider.GetService<ILogger<App>>()
183+
?? throw new InvalidOperationException(
184+
"Can't get logger from DI");
185+
var enabledIdleStatusStringValue = viewModel.EnableIdleStatus.ToString();
186+
storageService.PutAsync("enableIdleStatus", enabledIdleStatusStringValue);
187+
logger.Log(LogLevel.Information, "Saving setting enableIdleStatus to storage with value : {Value}", enabledIdleStatusStringValue);
182188
}
183189

184190
desktop.Shutdown();

src/PlexRichPresence.UI.Avalonia/PlexRichPresence.UI.Avalonia.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
77
<TrimMode>copyused</TrimMode>

src/PlexRichPresence.ViewModels/PlexRichPresence.ViewModels.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

test/PlexRichPresence.DiscordRichPresence.Tests/PlexRichPresence.DiscordRichPresence.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

test/PlexRichPresence.PlexActivity.Tests/PlexRichPresence.PlexActivity.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<Nullable>enable</Nullable>
66

77
<IsPackable>false</IsPackable>
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1212
<PackageReference Include="FluentAssertions" Version="6.10.0" />
13-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.3" />
13+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.15" />
1414
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
1515
<PackageReference Include="Moq" Version="4.18.4" />
1616
<PackageReference Include="xunit" Version="2.4.2" />

test/PlexRichPresence.Tests.Common/PlexRichPresence.Tests.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

test/PlexRichPresence.UI.Avalonia.Tests/PlexRichPresence.UI.Avalonia.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<Nullable>enable</Nullable>
66

77
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)