Skip to content

dotnet config #9967

@richlander

Description

@richlander

Add global user configuration

It happened! We just past that moment where we absolutely need dotnet config. It's time to go build it, I propose for 3.0.

The key scenario that affects a lot of people is installing .NET Core preview SDKs. They are very hard to manage.

Git has git config as documented at git config. We need something kinda/sorta the same.

global.json would still override these settings, where there is overlap.

Basic Scenarios

  • [bool] Use previews by default
  • [string] Use this SDK version (same concept as global.json) -- need more options on min and ranges and such.
  • [string] Use this --framework as the default for dotnet new (for example, netcoreapp2.2). This one might need both a default and a way to say "Oh, I want netstandard2.0 for the classlib template). latest-stable would be an awesome durable default.

Some folks would want to opt out of previews by default. Others would want the SDK preview, but want to default new projects to stay with the stable runtime/TFM. Those are both valid lifestyle options. I would choose the second choice, but I more people to choose the former.

Advanced Scenarios

  • [string] Use this --configuration by default (for example release, debug), potentially with different values for run, build, publish and pack. For example, I'd set release for publish and pack and go with the default for other scenarios.

More ideas, requiring more thought

  • [string] Use this --framework as the default for dotnet run -- useful for multi-targeted projects.
  • [array of strings] Use these flags for dotnet test by default (like the logger)
  • [array of strings] Use these flags for dotnet publish by default (like self-contained of cross-gen)
  • [array of strings] Always build for these RIDs
  • [array of key/values] Environment variables to set at dotnet run process launch

Metadata

Metadata

Assignees

No one assigned

    Labels

    config-system-candidateIssues that could be solved cleanly if the .NET CLI had a git-like configuration system

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions