Skip to content

Conversation

@v-dmerugu
Copy link
Contributor

@v-dmerugu v-dmerugu commented Dec 23, 2025

Context

When using Package Source Mapping in DotNetCoreCLI@2, NuGet restore fails with:
NU1100: PackageSourceMapping is enabled, the following source(s) were not considered: feed-

Root cause:
The task automatically prefixes internal feed names to feed- in , but the original user‑provided section still references the unprefixed key.
This mismatch causes NuGet to reject the internal feed, resulting in restore failures.
Related Issues:

Azure Pipelines: DotNetCoreCLI prefix bug (#21507)
NuGet Source Mapping mismatch issues (#402)
📌 DotNetCoreCLI ADO Work Items


Task Name

DotNetCoreCLIV2


Description

This PR adds a task‑level fix that:

Keeps the existing feed‑prefixing logic (e.g., canarytest → feed-canarytest)
After credentials are applied and the temp NuGet.config is generated, the task:
Loads both:
Original NuGet.config
Temporary NuGet.config (with prefixed feed names)
Uses xml2js to parse these safely and structurally.
Matches feeds by URL
Rewrites keys in the temporary config to match their new prefixed names.
Example:
key="canarytest" → key="feed-canarytest"
Writes back a corrected temporary NuGet.config so that NuGet sees consistent source and mapping keys.


Risk Assessment (Low / Medium / High)

Low - Does not change prefixing logic, only ensures mapping consistency


Change Behind Feature Flag (Yes / No)

No


Tech Design / Approach

  • Design has been written and reviewed.
  • Any architectural decisions, trade-offs, and alternatives are captured.

Documentation Changes Required (Yes/No)

Yes


Additional Testing Performed

Tested Manually - https://dev.azure.com/v-sanjayse/TestProject2/_build/results?buildId=483&view=results


Rollback Scenario and Process (Yes/No)

  • Rollback plan is documented.
  • yes

Checklist

  • Related issue linked (if applicable)
  • Task version was bumped — see versioning guide
  • Verified the task behaves as expected

@v-dmerugu
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants