Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Read default language for dotnet new from env var #13237

Merged

Conversation

enricosada
Copy link

@enricosada enricosada commented Feb 18, 2020

Read DOTNET_NEW_PREFERRED_LANG as default language for dotnet new.
If not set, the default continue to be C#

Currently to create F# projects, we need to specify -lang f# foreach dotnet new invocation.
It's really annoying, and atm dotnet new doesnt yet support set the preference property.

This option can be removed later, when dotnet new support set the default language (as normal config)

With this pr

set DOTNET_NEW_PREFERRED_LANG=F#
dotnet new console
dotnet new lib

/cc @cartermp

ref dotnet/sdk#4224

@enricosada enricosada force-pushed the dotnet_new_default_fsharp/3.1.2xx branch from e82d973 to acc3840 Compare February 18, 2020 10:37
@nguerrera
Copy link
Contributor

The bar for 3.1.200 is already past new features. 3.1.300 would be the soonest. We have an idea to have a configuration with aliasing like git config so then you could alias dotnet new to dotnet new -lang F#. Ideally, we wouldn't keep accumulating environment variables pending that feature. cc @KathleenDollard

@nguerrera
Copy link
Contributor

That said, it may be too long to wait for the feature. I could be convinced that the scenario is so basic for non-C# developers that we need this as the interim solution.

@nguerrera nguerrera added this to the 3.1.3xx milestone Feb 24, 2020
@nguerrera nguerrera changed the title Read default language for dotnet new from env var [WIP hold for 3.1.3xx] Read default language for dotnet new from env var Feb 24, 2020
@nguerrera
Copy link
Contributor

I approve of the code change, but this cannot be merged until a 3.1.3xx branch opens up and this is retargeted to that.

@wli3 wli3 changed the base branch from release/3.1.2xx to release/3.1.3xx March 10, 2020 21:32
@wli3 wli3 changed the title [WIP hold for 3.1.3xx] Read default language for dotnet new from env var Read default language for dotnet new from env var Mar 10, 2020
@wli3 wli3 added auto-merge Automatically merge PR once CI passes. Auto-Merge If Tests Pass labels Mar 10, 2020
@ghost
Copy link

ghost commented Mar 10, 2020

Hello @wli3!

Because this pull request has the Auto-Merge If Tests Pass label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit cbe0907 into dotnet:release/3.1.3xx Mar 11, 2020
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Auto-Merge If Tests Pass auto-merge Automatically merge PR once CI passes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants