[AOT compatible] Make HostsUILib become AOT compatible (#36136)

* Remove AOT configuration

* Refer to AOT compatibility props

---------

Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
This commit is contained in:
moooyo
2024-12-19 09:22:41 +08:00
committed by GitHub
parent ea66066a54
commit 86c6b4ae95
3 changed files with 3 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ using Microsoft.UI.Dispatching;
namespace HostsUILib.Helpers
{
public class DuplicateService : IDuplicateService, IDisposable
public partial class DuplicateService : IDuplicateService, IDisposable
{
private record struct Check(string Address, string[] Hosts);

View File

@@ -21,7 +21,7 @@ using Microsoft.Win32;
namespace HostsUILib.Helpers
{
public class HostsService : IHostsService, IDisposable
public partial class HostsService : IHostsService, IDisposable
{
private const string _backupSuffix = $"_PowerToysBackup_";
private const int _defaultBufferSize = 4096; // From System.IO.File source code

View File

@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
<Import Project="..\..\..\Common.Dotnet.AotCompatibility.props" />
<PropertyGroup>
<OutputType>Library</OutputType>