Support changing the default language
See original GitHub issueI would like to be able to default the dotnet sdk language to F#. Currently we have to remember to put -lang F#
with all standard project templates. I would like to be able to set a global flag that changes the default to F#.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:205
- Comments:20 (11 by maintainers)
Top Results From Across the Web
Change the default input language for Windows
In the Text Services and Input Languages dialog box, under Default input language, click the language that you want to use as the...
Read more >Manage display language settings in Windows
The display language you select changes the default language used by Windows features, such as Settings and File Explorer. Select Start > Settings...
Read more >Configuring the default language for your help center
Your help center default language is initially set to English. You can change the default language. You can choose from all of the...
Read more >Change your language on the web - Android
On your Android device, tap Settings Settings . · Tap System and then Languages & input and then Languages. · Tap Add a...
Read more >Change the language your Mac uses
Change the system language · On your Mac, choose Apple menu > System Settings, click General in the sidebar, then click Language &...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
the
DOTNET_NEW_PREFERRED_LANG=F#
env var is supported in the latest released .net 5 sdk preview3 (5.0.100-preview.3.20216.6
)Another option (smaller implementation but more specific, less bikeshedding) is to use an env var.
That allow a global per user configuration.
I think the
dotnet new
is something really useful for developers as cli. IDE/editor have their way to specify a default preference. To be scripted programmatically the-lang
param should be always passed to be safeA possible implementation (require rebase) is done in an old PR https://github.com/dotnet/cli/pull/5679
Having that env var doesn’t prevent a more comprensive
.netconfig
file later, when there is an agreement on this bigger scopeUsing current global.json I think is not correct, because current behavior is to stop at first found, so cannot do a shared per user atm.
Another option is allow a per user
global.json
where I can specify that preference and is always loaded (overrriden by repo specific global.json). Like other tools, a config file in user folder. Maybe call it.net
😃