Skip to content

Fix CodeBehind NuGet config placement - #12367

Merged
jonathanpeppers merged 1 commit into
dotnet:mainfrom
jonathanpeppers:jonathanpeppers-fix-codebehind-nuget-config
Aug 13, 2026
Merged

Fix CodeBehind NuGet config placement#12367
jonathanpeppers merged 1 commit into
dotnet:mainfrom
jonathanpeppers:jonathanpeppers-fix-codebehind-nuget-config

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

CodeBehindTests passed a file path to CopyNuGetConfig, which expects a directory and appends NuGet.config. This placed the repository configuration in a nested path, so generated projects could miss it and contact external package feeds. Pass the temporary project root instead.

  • Useful description of why the change is necessary.
  • Links to issues fixed: N/A
  • Unit tests: Focused CodeBehind tests require an in-tree local SDK, which was unavailable. git diff --check passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 12, 2026 21:47

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.

Pull request overview

Fixes incorrect NuGet.config placement in CodeBehindTests by passing a directory (project temp root) to CopyNuGetConfig, which appends NuGet.config internally. This ensures generated test projects consistently pick up the repo NuGet configuration and avoid accidentally restoring from external feeds.

Changes:

  • Update CodeBehindTests to pass tempRoot (directory) instead of Path.Combine (tempRoot, "NuGet.config") (file path) to CopyNuGetConfig.

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) August 13, 2026 03:21

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The NuGet configuration is now copied to the correct test root, restoring CI feed discovery without introducing a product or test-path regression.

@jonathanpeppers
jonathanpeppers merged commit d57b8c4 into dotnet:main Aug 13, 2026
44 checks passed
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.

3 participants