Fix NuGet central package restore warnings from mixed sources and vulnerable Xml transitive dependency - #448
Merged
Conversation
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot
AI
changed the title
Fix NuGet restore warnings for package sources and vulnerable Xml dependency
Fix NuGet central package restore warnings from mixed sources and vulnerable Xml transitive dependency
Aug 20, 2026
Copilot created this pull request from a session on behalf of
BenjaminMichaelis
August 20, 2026 23:49
View session
BenjaminMichaelis
marked this pull request as ready for review
August 21, 2026 00:04
There was a problem hiding this comment.
Pull request overview
This PR addresses NuGet restore warnings by adding package source mapping for central package management and mitigating a vulnerable transitive dependency by centrally pinning a patched System.Security.Cryptography.Xml version.
Changes:
- Added
packageSourceMappinginNuGet.configto mapMicrosoft.DotNet.Interactive*packages to thedotnet-toolsfeed while keepingnuget.orgas the general source. - Enabled central transitive pinning and pinned
System.Security.Cryptography.Xmlto10.0.11inDirectory.Packages.propsto override the vulnerable transitive version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| NuGet.config | Adds package source mapping to eliminate NU1507 under central package management with mixed sources. |
| Directory.Packages.props | Enables transitive central pinning and pins System.Security.Cryptography.Xml to a patched version to address NU1903. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restore was emitting
NU1507because central package management was used with two package sources but no source mapping. It was also surfacingNU1903becauseMicrosoft.DotNet.Interactive.CSharpProjectpulled inSystem.Security.Cryptography.Xml10.0.0.Package source mapping
packageSourceMappingtoNuGet.confignuget.orgas the default sourceMicrosoft.DotNet.Interactive*packages to thedotnet-toolsfeedCentral transitive pinning
CentralPackageTransitivePinningEnabledinDirectory.Packages.propsSystem.Security.Cryptography.Xmlto10.0.11centrally so the vulnerable transitive version is overridden without adding per-project package referencesResulting restore behavior
Microsoft.DotNet.Interactive.CSharpProjectresolve the patched Xml package version