Skip to content

Add dotnet.config template to dotnet new #50258

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 14, 2025

Adds a new dotnet.config template to dotnet new to support Microsoft.Testing.Platform configuration and future dotnet CLI configuration needs.

Usage

# Create empty dotnet.config file (future-proofing for additional config options)
dotnet new dotnetconfig

# Create dotnet.config with test runner configuration
dotnet new dotnetconfig --runner "Microsoft.Testing.Platform"

# Alternative short name
dotnet new dotnet.config --runner "Microsoft.Testing.Platform"

Template Behavior

Empty by default: When no --runner parameter is specified, creates an empty file to allow future expansion for other dotnet.config settings.

With runner: When --runner is specified, generates proper INI format:

[dotnet.test.runner]
name = "Microsoft.Testing.Platform"

Implementation Details

  • Template located in template_feed/Microsoft.DotNet.Common.ItemTemplates/content/DotnetConfig/
  • Supports both dotnetconfig and dotnet.config short names
  • Uses template engine conditional processing to include/exclude content based on parameters
  • Follows existing template patterns similar to global.json and other config templates
  • Includes proper localization support with auto-generated language files
  • Help shows: -r, --runner <runner> The test runner to use.

This enables easy onboarding to Microsoft.Testing.Platform's new UX as requested, while providing a foundation for future dotnet.config functionality.

Fixes #47589.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Add template for dotnet.config to dotnet new Add dotnet.config template to dotnet new Aug 14, 2025
@Copilot Copilot AI requested a review from nohwnd August 14, 2025 07:53
Copilot finished work on behalf of nohwnd August 14, 2025 07:53
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.

Add template for dotnet.config to dotnet new
2 participants