From 77c9c25ef38d67281702fb2067d3a982dc859fdc Mon Sep 17 00:00:00 2001 From: Julien Lebosquain Date: Thu, 13 Aug 2026 11:45:48 +0000 Subject: [PATCH] Fix Nuke build warnings (#21967) * Fix Nuke build warnings * Remove PublishProfile from WinUI projects --- Directory.Packages.props | 6 ++---- nukebuild/ApiDiffHelper.cs | 6 +++++- nukebuild/_build.csproj | 3 +-- samples/ControlGallery.WinUI/ControlGallery.WinUI.csproj | 1 - samples/WinUIEmbedSample/WinUIEmbedSample.csproj | 1 - 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 941451d635..d38cb33b28 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -2,7 +2,6 @@ true - @@ -37,7 +36,7 @@ - + @@ -76,8 +75,7 @@ - - + \ No newline at end of file diff --git a/nukebuild/ApiDiffHelper.cs b/nukebuild/ApiDiffHelper.cs index d16495969e..8325ca41f4 100644 --- a/nukebuild/ApiDiffHelper.cs +++ b/nukebuild/ApiDiffHelper.cs @@ -399,7 +399,11 @@ public static class ApiDiffHelper { var packageSource = new PackageSource(NightlyFeedUri) { ProtocolVersion = 3 }; var repository = Repository.Factory.GetCoreV3(packageSource); - var findPackageByIdResource = await repository.GetResourceAsync(); + + var findPackageByIdResource = + await repository.GetResourceAsync() ?? + throw new InvalidOperationException($"{nameof(FindPackageByIdResource)} not found on {packageSource}"); + return new NuGetDownloadContext(packageSource, findPackageByIdResource); } diff --git a/nukebuild/_build.csproj b/nukebuild/_build.csproj index bf31a5f9a2..045f652291 100644 --- a/nukebuild/_build.csproj +++ b/nukebuild/_build.csproj @@ -13,10 +13,9 @@ - - + diff --git a/samples/ControlGallery.WinUI/ControlGallery.WinUI.csproj b/samples/ControlGallery.WinUI/ControlGallery.WinUI.csproj index c500a2368a..49c2e6b8c3 100644 --- a/samples/ControlGallery.WinUI/ControlGallery.WinUI.csproj +++ b/samples/ControlGallery.WinUI/ControlGallery.WinUI.csproj @@ -7,7 +7,6 @@ app.manifest x86;x64;ARM64 win-x86;win-x64;win-arm64 - win-$(Platform).pubxml true false true diff --git a/samples/WinUIEmbedSample/WinUIEmbedSample.csproj b/samples/WinUIEmbedSample/WinUIEmbedSample.csproj index 8a47a7860c..3c7a711cbf 100644 --- a/samples/WinUIEmbedSample/WinUIEmbedSample.csproj +++ b/samples/WinUIEmbedSample/WinUIEmbedSample.csproj @@ -7,7 +7,6 @@ app.manifest x86;x64;ARM64 win-x86;win-x64;win-arm64 - win-$(Platform).pubxml true false true