Skip to content

Commit

Permalink
Merge pull request #16 from michielpost/feature/net8
Browse files Browse the repository at this point in the history
.net 8 update
  • Loading branch information
michielpost authored Nov 15, 2023
2 parents 0be423b + 9a2ffa7 commit 6f5fb1c
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Install maui workloads
run: dotnet workload install maui-android
- name: Build with dotnet
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master_huelightdj.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'
dotnet-version: '8.x'
- name: Install maui workloads
run: dotnet workload install maui-android
- name: dotnet publish
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 59919
EXPOSE 44339
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["HueLightDJ.BlazorWeb/Server/HueLightDJ.BlazorWeb.Server.csproj", "HueLightDJ.BlazorWeb/Server/"]
COPY ["HueLightDJ.Effects/HueLightDJ.Effects.csproj", "HueLightDJ.Effects/"]
Expand Down
6 changes: 3 additions & 3 deletions HueLightDJ.Blazor.Controls/HueLightDJ.Blazor.Controls.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<BlazorEnableTimeZoneSupport>false</BlazorEnableTimeZoneSupport>
Expand All @@ -16,8 +16,8 @@

<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.10" />
<PackageReference Include="MudBlazor" Version="6.9.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageReference Include="MudBlazor" Version="6.11.0" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions HueLightDJ.BlazorWeb/Client/HueLightDJ.BlazorWeb.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
Expand All @@ -11,14 +11,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.10" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.0" />
<PackageReference Include="protobuf-net.Grpc" Version="1.1.1" />
<PackageReference Include="Grpc.Net.Client" Version="2.57.0" />
<PackageReference Include="Grpc.Net.Client.Web" Version="2.57.0" />
<PackageReference Include="System.ServiceModel.Primitives" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.10" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.59.0" />
<PackageReference Include="Grpc.Net.Client.Web" Version="2.59.0" />
<PackageReference Include="System.ServiceModel.Primitives" Version="6.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions HueLightDJ.BlazorWeb/Server/HueLightDJ.BlazorWeb.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<WarningsAsErrors>nullable</WarningsAsErrors>
Expand All @@ -12,14 +12,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.57.0" />
<PackageReference Include="Grpc.AspNetCore.Web" Version="2.57.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
<PackageReference Include="Grpc.AspNetCore" Version="2.59.0" />
<PackageReference Include="Grpc.AspNetCore.Web" Version="2.59.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="protobuf-net.Grpc.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.10" />
<PackageReference Include="HueApi" Version="1.4.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.0.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
<PackageReference Include="HueApi" Version="1.5.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.5.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions HueLightDJ.Effects/HueLightDJ.Effects.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HueApi" Version="1.4.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.0.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.4.0" />
<PackageReference Include="HueApi" Version="1.5.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.5.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.5.0" />
</ItemGroup>

</Project>
19 changes: 11 additions & 8 deletions HueLightDJ.Maui/HueLightDJ.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net7.0-android33.0</TargetFrameworks>
<TargetFrameworks>net8.0-android</TargetFrameworks>
<!-- <TargetFrameworks>net7.0-ios;net7.0-maccatalyst</TargetFrameworks> -->
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<Nullable>enable</Nullable>
Expand Down Expand Up @@ -33,32 +32,36 @@

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">32.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">30.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-android|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
<ApplicationId>com.webvnext.huelightdj.maui</ApplicationId>
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-android|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
<ApplicationId>com.webvnext.huelightdj.maui</ApplicationId>
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-windows10.0.19041.0|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-windows10.0.19041.0|AnyCPU'">
<ApplicationId>com.webvnext.huelightdj.maui</ApplicationId>
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-windows10.0.19041.0|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-windows10.0.19041.0|AnyCPU'">
<ApplicationId>com.webvnext.huelightdj.maui</ApplicationId>
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.png" />
Expand All @@ -77,7 +80,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
</PropertyGroup>
Expand Down
12 changes: 6 additions & 6 deletions HueLightDJ.Services/HueLightDJ.Services.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
</PropertyGroup>
Expand Down Expand Up @@ -31,11 +31,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="HueApi" Version="1.4.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.0.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="HueApi" Version="1.5.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.5.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.5.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion HueLightDJ.Services/Internal/StreamingSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,14 @@ private async Task Connect(bool demoMode, bool useSimulator, ConnectionConfigura
if (locations == null)
throw new Exception("No locations found.");

//new locations
Dictionary<int, Tuple<HuePosition, List<Guid>>> newLocations = new Dictionary<int, Tuple<HuePosition, List<Guid>>>();
foreach (var location in locations)
{
newLocations.Add(location.Key, new Tuple<HuePosition, List<Guid>>(location.Value, new List<Guid>()));
}
//Create a streaming group
var stream = new StreamingGroup(locations);
var stream = new StreamingGroup(newLocations);
stream.IsForSimulator = useSimulator;

if (!demoMode)
Expand Down
12 changes: 6 additions & 6 deletions HueLightDJ.Web/HueLightDJ.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<DockerTargetOS>Linux</DockerTargetOS>
Expand All @@ -10,10 +10,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.9" />
<PackageReference Include="HueApi" Version="1.4.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.0.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.4.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.0" />
<PackageReference Include="HueApi" Version="1.5.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.5.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 6f5fb1c

Please sign in to comment.