Skip to content

Commit

Permalink
fix: Net8 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
svrooij committed Dec 7, 2023
1 parent 4fc5d34 commit c4d2202
Show file tree
Hide file tree
Showing 10 changed files with 735 additions and 388 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
- name: 👨‍🔧 Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x
dotnet-version: |
6.x
8.x
- name: 🔍 Enable problem matchers
run: echo "::add-matcher::.github/matchers/dotnet.json"
Expand Down Expand Up @@ -75,7 +77,9 @@ jobs:
- name: 👨‍🔧 Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x
dotnet-version: |
6.x
8.x
- name: 🔍 Enable problem matchers
run: echo "::add-matcher::.github/matchers/dotnet.json"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Always wanted to control sonos speakers right from your dotnet application? I've
Currently this library is not at version one, these are the planned features that need to be build before this can be called a version one.

- [X] All sonos services generated from service discovery
- [ ] Event subscriptions
- [ ] Dynamic metadata generation based on [these docs](https://svrooij.io/sonos-api-docs/metadata.html)
- [X] Event subscriptions
- [X] Dynamic metadata generation based on [these docs](https://svrooij.io/sonos-api-docs/metadata.html)
- [ ] SonosManager class that keeps track of speaker groups
- [ ] Device discovery, though it hardly works

Expand Down
14 changes: 4 additions & 10 deletions src/Sonos.Base.Events.Http/Sonos.Base.Events.Http.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
Expand Down Expand Up @@ -29,17 +29,11 @@
<ItemGroup>
<ProjectReference Include="..\Sonos.Base\Sonos.Base.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' ">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
347 changes: 265 additions & 82 deletions src/Sonos.Base.Events.Http/packages.lock.json

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions src/Sonos.Base/Sonos.Base.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
Expand Down Expand Up @@ -31,15 +31,11 @@
<_Parameter1>Sonos.Base.Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' ">

This comment has been minimized.

Copy link
@RicoSuter

RicoSuter Dec 8, 2023

This forces me to use v8 packages in .NET 7 app.
What's the best practice here? I'd say keep it as small as possible or set it per target fw as before?

This comment has been minimized.

Copy link
@svrooij

svrooij Dec 8, 2023

Author Owner

I've checked all the projects and they all support the net6.0 and net7.0, so I figured that it would do no harm to upgrade all the packages to the latest version available

<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
</ItemGroup>
</Project>
Loading

0 comments on commit c4d2202

Please sign in to comment.