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>