Skip to content

Add 'PackageSourceMapping' entries to Nuget.config, since multiple sources are used - #545

Merged
Mark Schofield (mschofie) merged 1 commit into
microsoft:mainfrom
mschofie:mschofie/package-source-mapping
Oct 15, 2025
Merged

Add 'PackageSourceMapping' entries to Nuget.config, since multiple sources are used#545
Mark Schofield (mschofie) merged 1 commit into
microsoft:mainfrom
mschofie:mschofie/package-source-mapping

Conversation

@mschofie

Copy link
Copy Markdown
Contributor

Description

When building the WindowsML samples through the command-line with:

.\build.cmd x64 Debug WindowsML

I see errors, along the lines of:

S:\source\github\microsoft\WindowsAppSDK-Samples\samples\WindowsML\cs\CSharpConsoleDesktop\CSharpConsoleDesktop\CSharpConsoleDesktop.csproj : error
 NU1507: There are 2 package sources defined in your configuration. When using central package management, please map your package sources with pac
kage source mapping (https://aka.ms/nuget-package-source-mapping) or specify a single package source. The following sources are defined: nuget.org,
 WinAppSDK-SampleDeps

The error is complaining because there's a :/Samples/nuget.config file with multiple packageSource elements, but no packageSourceMapping. So this PR adds packageSourceMapping for the packageSource elements.

Note: The samples are still not building cleanly, there's more errors behind this one.

Checklist

Note that /azp run currently isn't working for this repo.

@adrastogi adrastogi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Mark Schofield (@mschofie)! This looks good to me, but I've also tagged some folks from the WASDK team to take a look in case there are implications of this change I might not be aware of.

@Scottj1s

Copy link
Copy Markdown
Member

This is fine - we may have to revisit when agg starts building against main branch samples (and no longer references nuget.org directly)

@mschofie

Mark Schofield (mschofie) commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

It looks like this might break BackgroundTask samples, since they depend on version 10.0.26100.2161 of "Microsoft.Windows.SDK.BuildTools" which isn't on nuget.org.

I'm trying to buddy build all samples, but it's a bit tricky :/

@mschofie

Copy link
Copy Markdown
Contributor Author

Hmm... So "Microsoft.Windows.SDK.BuildTools" version "10.0.26100.2161" isn't available on either source:

So the problems I'm seeing with that are unrelated to my changes.

@Scottj1s

Copy link
Copy Markdown
Member

Hmm... So "Microsoft.Windows.SDK.BuildTools" version "10.0.26100.2161" isn't available on either source:
So the problems I'm seeing with that are unrelated to my changes.

Thanks Mark - totally up to you if you want to update those references to latest, 10.0.26100.6584

@mschofie

Copy link
Copy Markdown
Contributor Author

Thanks, Scott, I've filed #558 to track the work. I think that completes due diligence for this PR.

@mschofie
Mark Schofield (mschofie) merged commit 253cb09 into microsoft:main Oct 15, 2025
1 check passed
@mschofie
Mark Schofield (mschofie) deleted the mschofie/package-source-mapping branch October 15, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants