This is my first article of the series "Tips I learned this week" for 2022 🚀! And today we are going to see some tips about .NET, Azure, GitHub, and VS Code.
.NET tip of the week: changing the .NET CLI language
Did you know that you could change the language of the .NET CLI to the one you find most appropriate? By default, the dotnet CLI messages you see when running a dotnet program are your language OS (French in my case). However, by setting the "DOTNET_CLI_UI_LANGUAGE" variable environment to en
for instance I can change it to English.
Why is it useful? Let's imagine I have an issue with a dotnet CLI command and that I want to get some help from the community by posting a question to a Q&A website with a screenshot of my error. If all the messages are in French I will probably not get many answers whereas if it's in English everyone will be able to understand what my commands are doing. There is also the fact that sometimes French accents and special characters are not well displayed by some terminals.
The Azure tip you did not know about: simplify your Azure CLI configuration with azure init
I don't know if you use a lot Azure CLI but it's a very nice tool! Each time I use Azure CLI, I think "it's awesome 🤩 I should use it more often instead of using Azure Portal". I even wrote a post about that 2 years ago: "Goodbye Azure Portal, Welcome Azure CLI".
However, if you want to configure your Azure CLI, it can be sometimes a bit boring and slow to configure it using the az config
command. That is why Microsoft has released in preview an Azure CLI extension called az init
to simplify this configuration. For example you can quickly configure the output of the commands or the syntax highlighting, things like that.
Tool of the week: GitHub Code Search
Have you ever wished you could easily search code on GitHub in multiple repositories without cloning anything? That is now possible with GitHub Code Search. It is still in preview but looks promising! You have access to nice filters to find exactly the code you are looking for, and once you get it you can navigate in and across files.
For a long time, I have kept a bookmark to the "https://source.dot.net/" website for the times when I needed to understand how something was implemented in the .NET Core framework. But with GitHub Code Search I think I don't need it anymore. .NET Core is open source and all the source code is on GitHub so I can quickly find everything I need just by searching it on GitHub.
For instance, let's say I don't remember exactly what configuration is injected by default in a dotnet project when you use the Host.CreateDefaultBuilder
method. I will scope my search to dotnet organization repositories and a few keystrokes later, I can see all the configuration providers used to load some default configuration in a project.
You can read more about GitHub Code Search on GitHub's blog.
The VS Code extension you should try: i18n ally
When you are developing an application that supports several languages, it can quickly become annoying to go in every translation file when you need to check or modify a translation. If you are developing your application using VS Code, you probably should check out the extension i18n ally because it will save you a lot of time.
It is very handy and I like the fact the extension support lots of frameworks like Vue.js, Angular, React, Svelte, and Flutter (you can find the complete list of supported frameworks here). My only regret with this extension is not to have heard about it sooner.
And that's it for this week, happy learning!
Top comments (0)