Skip to content

Commit

Permalink
[AOT compatible] Resolve AOT Build Error in Peek.UI (#36194)
Browse files Browse the repository at this point in the history
* add partial for aot support

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

* format

* Revert "format"

This reverts commit 742d5e2.

* 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>
  • Loading branch information
lei9444 and jaimecbernardo authored Dec 9, 2024
1 parent 51586b4 commit 3aec0a0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .pipelines/verifyNoticeMdAgainstNugetPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@ $totalList = $projFiles | ForEach-Object -Parallel {

foreach($p in $temp)
{
# ignore "Auto-referenced" string in the output
if ($p -match "Auto-referenced") {
continue
}

# breaking item down to usable array and getting 1 and 2, see below of a sample output
# > PACKAGE VERSION VERSION
# if a package is Auto-referenced, "(A)" will appear in position 1 instead of a version number.

$p = -split $p
$p = $p[1, 2]
Expand Down
1 change: 1 addition & 0 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,7 @@ EXHIBIT A -Mozilla Public License.
- Microsoft.Extensions.Hosting.WindowsServices 9.0.0
- Microsoft.Extensions.Logging 9.0.0
- Microsoft.Extensions.Logging.Abstractions 9.0.0
- Microsoft.NET.ILLink.Tasks (A)
- Microsoft.Toolkit.Uwp.Notifications 7.1.2
- Microsoft.Web.WebView2 1.0.2739.15
- Microsoft.Win32.SystemEvents 9.0.0
Expand Down
2 changes: 1 addition & 1 deletion src/modules/peek/Peek.UI/Models/NeighboringItems.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Peek.UI.Models
{
public class NeighboringItemsEnumerator : IEnumerator<IFileSystemItem>
public partial class NeighboringItemsEnumerator : IEnumerator<IFileSystemItem>
{
public IFileSystemItem Current => Items[CurrentIndex];

Expand Down
1 change: 1 addition & 0 deletions src/modules/peek/Peek.UI/Peek.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 3aec0a0

Please sign in to comment.