Edi Wang

.NET and Azure Developer

Posts in March 2019

Operate Git with .NET Core

Git is the preferred source code version control tool for many programmers, and I've recently switched from TFVC to Git. I am going to show you how to operate Git with .NET Core. Why am I doing this First of all, we do have a lot of good Git clients, such as GitHub for Windows, VS/VS Code, git GUI, and so on, all quite mature, there is no need for us to reinvent this wheel in own. NET/C#. But on …
.NET Git

Restart an ASP.NET Core Application Programmatically

We developers won't have access to servers all the time, and without management capabilities, it will be difficut to restart a web application. However, in ASP.NET Core, there is a way for us to programmatically restart our application without requring management capabilities from server admins. IApplicationLifetime There is a IApplicationLifetime interface in ASP.NET Core which can handle events …
.NET ASP.NET

Read and Write Windows Registry in .NET Core

Yes, you read it right! It's totally possible! Even .NET Core is designed to be cross platform, but it does not mean you can not use platform specific APIs. Take Windows Registry for example, although .NET Standard can not contain Windows API like this. But there's still a way to use Windows Regisitry in .NET Core Applications. But first, you should be absolutely clear, that using platform …
.NET Windows Registry

Incremental Build Number for .NET Core via Azure DevOps

People familiar with the. NET framework knows that we can let the compiler self-increase the version number by specifying AssemblyVersion as 10.0.*. But. NET core and. NET Standard are not. Even with open-source projects like MSBump, there are certain flaws. Typically, such a requirement happens on a CI/CD server. Let's take a look at how to easily handle it with Azure DevOps. About Versioning in …
.NET PowerShell Azure DevOps