Skip to content

[release/10.0.4xx] Disable NuGet audit in SDK test processes - #57180

Merged
nagilson merged 3 commits into
release/10.0.4xxfrom
miyanni-backport-57089-to-10-0-4xx
Nov 19, 2026
Merged

nagilson merged 3 commits into
release/10.0.4xxfrom
miyanni-backport-57089-to-10-0-4xx

Conversation

@MiYanni

@MiYanni MiYanni commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

🤖Copilot🤖
Backport of #57177 to release/10.0.4xx. Relates to #57031.

Fix

Set NuGetAudit=false in SdkTestContext.AddTestEnvironmentVariables for SDK test-spawned processes, matching the release/10.0.1xx backport. This prevents NU1903 warnings from breaking exact-output assertions (#57002, #57108, #57132). The change affects tests only.

Merge conflict

This PR originally backported the template-samples pin from #57089 (Part 1). The pin to Microsoft.TemplateEngine.Samples::10.0.404 and its explanatory comment are already on release/10.0.4xx (5e8c320), so the conflict resolution retained the release-branch version. The pin is no longer part of the diff. Part 2 of #57089 (dotnet-watch TemporaryFileManager, #57065) does not apply because the regressing change is not in this branch.

Validation

  • Exercised the committed test-context method with fresh and pre-populated environments, with and without a configured NuGet cache.
  • Using SDK 10.0.404, verified a child MSBuild observes NuGetAudit=true before applying the method and false afterward.
  • The original template-pin validation, before the branch merge, compared package content and approval snapshots and passed all 16 TemplateEngineSamplesTest cases against the built redist SDK.
  • SDK integration tests were not rerun for the audit backport because this worktree has no built redist SDK.

Keep approval snapshots deterministic by installing the Template Engine samples version aligned with this servicing branch. Backport of #57089 (issue #57031).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MiYanni
MiYanni requested a review from a team as a code owner November 17, 2026 19:29
Copilot AI balanced review requested due to automatic review settings November 17, 2026 19:29
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI 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.

🟢 Approval recommended

No active review issues block the sample-package version pin.

No open issues 🎉

What changed in this PR

Backports the template-sample test fix to release/10.0.4xx, addressing the snapshot drift reported in #57031.

Changes:

  • Pins Microsoft.TemplateEngine.Samples to 10.0.404 so newer package releases do not change the sample content used by existing approval tests.
File Description
test/​dotnet-new.IntegrationTests/​TemplateEngineSamplesTest.cs Replaces the unversioned sample package install with an explicit 10.0.404 pin.

Review effort: Balanced

@MiYanni

MiYanni commented Nov 17, 2026

Copy link
Copy Markdown
Member Author

🤖Copilot🤖
Closing as a duplicate of #57176, which makes the same Microsoft.TemplateEngine.Samples::10.0.404 pin on release/10.0.4xx and was opened first. Both PRs are blocked by the branch-wide NU1903 failure (#57002), so #57176 needs a CI rerun after codeflow #56869 merges.

@MiYanni MiYanni closed this Nov 17, 2026
@MiYanni MiYanni reopened this Nov 17, 2026
@MiYanni MiYanni added the Blocked Issue is blocked on an external dependency label Nov 17, 2026
@MiYanni

MiYanni commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

Awaiting fixes from: #57002

Edit: I've cherry picked the change into this PR so we can get the branch building.

MiYanni and others added 2 commits November 19, 2026 09:46
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 50e5035)

Co-authored-by: nagilson <23152278+nagilson@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MiYanni MiYanni changed the title [release/10.0.4xx] Pin template engine samples package [release/10.0.4xx] Disable NuGet audit in SDK test processes Nov 19, 2026
@nagilson
nagilson enabled auto-merge November 19, 2026 18:34
@nagilson
nagilson disabled auto-merge November 19, 2026 20:16
@nagilson
nagilson merged commit 884b2ca into release/10.0.4xx Nov 19, 2026
24 of 27 checks passed
@nagilson
nagilson deleted the miyanni-backport-57089-to-10-0-4xx branch November 19, 2026 20:16
@MiYanni MiYanni removed the Blocked Issue is blocked on an external dependency label Nov 19, 2026
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.

5 participants