Skip to content

Avoid having a separate global.json for template tests #63386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2025

Conversation

ilonatommy
Copy link
Member

Follow up for #62619.

We want to avoid having the dotnet version defined in multiple places. We can use the mechanism of copying the main global.json to templates location, just making sure the destination path is correct.

@ilonatommy ilonatommy self-assigned this Aug 22, 2025
@Copilot Copilot AI review requested due to automatic review settings August 22, 2025 15:17
@ilonatommy ilonatommy added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Aug 22, 2025
@ilonatommy ilonatommy requested review from wtgodbe and a team as code owners August 22, 2025 15:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses the issue of having duplicate .NET version definitions by consolidating the global.json configuration. Instead of maintaining separate global.json files for template tests, it copies the main global.json to the templates location and updates the .NET root path structure.

  • Updated the template test .NET root path from dotnet\ to .dotnet\ to align with the new global.json paths configuration
  • Added copying of the main global.json file to the template test infrastructure
  • Enhanced global.json with SDK paths and error message configuration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/ProjectTemplates/TestInfrastructure/PrepareForTest.targets Updates .NET root path and adds global.json copying mechanism
global.json Adds SDK paths configuration and error messaging for missing .NET SDK

@ilonatommy ilonatommy force-pushed the brecon/paths-follow-up branch from 8449526 to f10fe1e Compare August 22, 2025 15:26
Copy link
Member

@BrennanConroy BrennanConroy left a comment

Choose a reason for hiding this comment

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

Ah, whoops 😆

@ilonatommy ilonatommy enabled auto-merge (squash) August 23, 2025 07:43
@ilonatommy ilonatommy merged commit 432cea8 into dotnet:main Aug 23, 2025
29 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 11.0-preview1 milestone Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants