Add background tasks project for NET8

This commit is contained in:
Burak Kaan Köse
2024-07-11 16:49:00 +02:00
parent 9edb06c1cc
commit 40657ee109
3 changed files with 42 additions and 1 deletions

View File

@@ -1,7 +1,12 @@
using Microsoft.Toolkit.Uwp.Notifications;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Background;
#if NET8_0
using CommunityToolkit.WinUI.Notifications;
#else
using Microsoft.Toolkit.Uwp.Notifications;
#endif
namespace Wino.BackgroundTasks
{
/// <summary>

View File

@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>Wino.BackgroundTasks.NET8</RootNamespace>
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) &gt;= 8">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) &lt; 8">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Properties\**" />
<Content Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
<None Remove="Properties\**" />
<Page Remove="Properties\**" />
<PRIResource Remove="Properties\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.WinUI.Notifications" Version="7.1.2" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.NET8.csproj" />
<ProjectReference Include="..\Wino.Core.UWP\Wino.Core.WinUI.csproj" />
<ProjectReference Include="..\Wino.Core\Wino.Core.NET8.csproj" />
</ItemGroup>
</Project>

View File

@@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Core.NET8", "Wino.Core
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Core.WinUI", "Wino.Core.UWP\Wino.Core.WinUI.csproj", "{FF3C03F7-4E9B-4333-9A9D-2BB1D1241C56}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.BackgroundTasks.NET8", "Wino.BackgroundTasks\Wino.BackgroundTasks.NET8.csproj", "{2C86AF48-F7DD-4EA6-A9A6-610E69287F03}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -33,6 +35,10 @@ Global
{FF3C03F7-4E9B-4333-9A9D-2BB1D1241C56}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF3C03F7-4E9B-4333-9A9D-2BB1D1241C56}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF3C03F7-4E9B-4333-9A9D-2BB1D1241C56}.Release|Any CPU.Build.0 = Release|Any CPU
{2C86AF48-F7DD-4EA6-A9A6-610E69287F03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C86AF48-F7DD-4EA6-A9A6-610E69287F03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C86AF48-F7DD-4EA6-A9A6-610E69287F03}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C86AF48-F7DD-4EA6-A9A6-610E69287F03}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE