Skip to content

Commit

Permalink
Upgrade to NET 6.0 (untested on Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed May 6, 2022
1 parent 191801a commit a465b15
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>GalaxyBudsClient.Bluetooth.Linux</RootNamespace>
<Configurations>Debug;Release;Debug (Local server);Release - Windows ARM</Configurations>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>GalaxyBudsClient.Bluetooth.Windows</RootNamespace>
<Configurations>Debug;Release;Debug (Local server);Release - Windows ARM</Configurations>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;Release - Windows ARM</Configurations>
<Platforms>AnyCPU</Platforms>
Expand All @@ -24,7 +25,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
<PackageReference Include="System.Runtime.InteropServices.WindowsRuntime" Version="4.3.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<nullable>enable</nullable>
<Configurations>Debug;Release;Debug (Local server);Release - Windows ARM</Configurations>
<Platforms>AnyCPU</Platforms>
Expand Down
34 changes: 13 additions & 21 deletions GalaxyBudsClient/GalaxyBudsClient.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ApplicationIcon>Resources/icon_white.ico</ApplicationIcon>
<AssemblyVersion>4.5.1.0</AssemblyVersion>
<Version>4.5.1.0</Version>
Expand Down Expand Up @@ -87,25 +87,17 @@
<PackageReference Include="Tmds.DBus" Version="0.9.1" />
<PackageReference Include="Trinet.Core.IO.Ntfs" Version="4.1.1" />
</ItemGroup>

<ItemGroup Condition="'$(IsWindows)'=='true'">
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.WindowsRT\GalaxyBudsClient.Bluetooth.WindowsRT.csproj" />
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.Windows\GalaxyBudsClient.Bluetooth.Windows.csproj" />
</ItemGroup>

<Choose>
<When Condition="$(DefineConstants.Contains('WindowsNoARM'))">
<ItemGroup>
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.Linux\GalaxyBudsClient.Bluetooth.Linux.csproj" />
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.WindowsRT\GalaxyBudsClient.Bluetooth.WindowsRT.csproj" />
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.Windows\GalaxyBudsClient.Bluetooth.Windows.csproj" />
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth\GalaxyBudsClient.Bluetooth.csproj" />
<ProjectReference Include="..\ThePBone.MprisClient\ThePBone.MprisClient.csproj" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.Linux\GalaxyBudsClient.Bluetooth.Linux.csproj" />
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.WindowsRT\GalaxyBudsClient.Bluetooth.WindowsRT.csproj" />
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.Windows\GalaxyBudsClient.Bluetooth.Windows.csproj" />
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth\GalaxyBudsClient.Bluetooth.csproj" />
<ProjectReference Include="..\ThePBone.MprisClient\ThePBone.MprisClient.csproj" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth.Linux\GalaxyBudsClient.Bluetooth.Linux.csproj" />
<ProjectReference Include="..\GalaxyBudsClient.Bluetooth\GalaxyBudsClient.Bluetooth.csproj" />
<ProjectReference Include="..\ThePBone.MprisClient\ThePBone.MprisClient.csproj" />
<ProjectReference Include="..\ThePBone.Interop.Win32\ThePBone.Interop.Win32.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Windows.AI.MachineLearning;
using GalaxyBudsClient.Model.Attributes;
using GalaxyBudsClient.Model.Constants;
using GalaxyBudsClient.Utils;
Expand Down
6 changes: 5 additions & 1 deletion GalaxyBudsClient/Platform/BluetoothImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ private BluetoothImpl()
{
try
{
#if Windows
if (PlatformUtils.IsWindows && SettingsProvider.Instance.UseBluetoothWinRT
&& PlatformUtils.IsWindowsContractsSdkSupported)
{
Expand All @@ -89,11 +90,14 @@ private BluetoothImpl()
}
#endif
else if (PlatformUtils.IsLinux)
#else
if(PlatformUtils.IsLinux)
#endif
{
Log.Debug("BluetoothImpl: Using Linux.BluetoothService");
_backend = new Bluetooth.Linux.BluetoothService();
}
else
else if(_backend == null)
{
Log.Warning("BluetoothImpl: Using Dummy.BluetoothService");
_backend = new Dummy.BluetoothService();
Expand Down
2 changes: 1 addition & 1 deletion ThePBone.BlueZNet/ThePBone.BlueZNet.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>ThePBone.BlueZNet</RootNamespace>
<Configurations>Debug;Release;Debug (Local server);Release - Windows ARM</Configurations>
<Platforms>AnyCPU</Platforms>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<LangVersion>8.0</LangVersion>
<Configurations>Debug;Release;Debug (Local server);Release - Windows ARM</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion ThePBone.Interop.Win32/ThePBone.Interop.Win32.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>8</LangVersion>
<Configurations>Debug;Release;Debug (Local server);Release - Windows ARM</Configurations>
Expand Down
2 changes: 1 addition & 1 deletion ThePBone.MprisClient/ThePBone.MprisClient.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>ThePBone.MprisClient</RootNamespace>
<Configurations>Debug;Release;Debug (Local server);Release - Windows ARM</Configurations>
Expand Down

0 comments on commit a465b15

Please sign in to comment.