[AOT compatible] Resolve AOT Build Error in Peek.UI (#36194)

* add partial for aot support

* add Microsoft.NET.ILLink.Tasks to packages.props

* format

* Revert "format"

This reverts commit 742d5e2214.

* add Microsoft.NET.ILLink.Tasks to notice.md

* add auto reference

* update script to remove the 'Auto-reference line'

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
leileizhang
2024-12-09 10:17:38 +08:00
committed by GitHub
parent 51586b43f4
commit 3aec0a06ac
5 changed files with 10 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ using Peek.UI.Extensions;
namespace Peek.UI.Models
{
public class NeighboringItems : IReadOnlyList<IFileSystemItem>
public partial class NeighboringItems : IReadOnlyList<IFileSystemItem>
{
public IFileSystemItem this[int index] => Items[index] = Items[index] ?? ShellItemArray.GetItemAt(index).ToIFileSystemItem();

View File

@@ -10,7 +10,7 @@ using Peek.Common.Models;
namespace Peek.UI.Models
{
public class NeighboringItemsEnumerator : IEnumerator<IFileSystemItem>
public partial class NeighboringItemsEnumerator : IEnumerator<IFileSystemItem>
{
public IFileSystemItem Current => Items[CurrentIndex];

View File

@@ -2,6 +2,7 @@
<!-- Look at Directory.Build.props in root for common stuff as well -->
<Import Project="..\..\..\Common.Dotnet.CsWinRT.props" />
<Import Project="..\..\..\Common.SelfContained.props" />
<Import Project="..\..\..\Common.Dotnet.AotCompatibility.props" />
<PropertyGroup>
<AssemblyName>PowerToys.Peek.UI</AssemblyName>