Edi Wang

.NET and Azure Developer

DevOps CI / CD / Make Deployments Awesome

Solving "npm install" ECONNRESET Error on Azure DevOps

A few months ago, my Angular project on Azure DevOps started to have build failure very often. Error message is "npm ERR! network read ECONNRESET", which indicates npm can't connect to internet. This problem does not happen every time, usually re-run failed jobs several times can produce a good build. But still, this is very annoying. So, I took some time to investigate and solve it. …
Azure DevOps NPM

How I Built This Blog with Azure Services

My website (https://edi.wang) is an open-source blog system written in .NET Core and runs on Microsoft Azure. This article explains why and how the blog benefits from Azure's services. History of this blog The history of my blog dates to 2003, and the .NET version of the blog was originally built 10 years ago by the ASP.NET 2.0 WebForm VB and Access database and has been gradually maintained and …
Azure DevOps App Service

How to Pack a .NET Core Class Library and Upload to NuGet

NuGet is the package manager of the. NET world, we can both use official website nuget.org, or build our own corporate and private servers. Now, with . NET Core, it's easier than ever to pack and upload a NuGet package, let's take a look! NuGet Account If you want your package to be used by every .NET developers in the world, then you need to have a nuget.org account to upload your own package.  …
.NET NuGet

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

Send Email After Release Deployment in Azure DevOps

By default, Azure DevOps sends an email notification to team members after the compilation succeeds or fails. But in a CI/CD environment, we are more concerned about when the deployment is complete and then conducting manual or automated testing. Let's take a look at how to get Azure DevOps to automatically send mail notifications to team members after a successful deployment. Enter Project …
Azure DevOps

Fix .NET Core Website Failure After Deployment from Azure DevOps

I met a strange problem recently. After configuring the CI/CD pipeline with Azure DevOps and automatically deploy to Azure App Services, the. NET Core Website failed to start. Let's see how we can solve this problem. Find the issue First of all, fortunately, this is a staging environment. I found that the site unexpectedly did not log anything, even log directory cannot be found, which is very …
.NET Azure Azure DevOps

Fix Azure DevOps TF14045 Error When Deploy to Azure

I encountered an error when I tried to setup CI/CD in Azure DevOps, I tried to deploy a .NET Core application to Azure App Service, but Azure DevOps won't connect to Azure. This is a known issue for Microsoft. Let's see how we can manually set up a connection between Azure DevOps and Azure to work around this issue. First, the error message I met was: Failed to get resource ID for resource type ' …
Azure Azure DevOps Azure AD

Build .NET Core 2.2 Projects on Azure DevOps

.NET Core 2.2 has been release for couple of weeks. However, the build pipeline is still failing these days. Microsoft has not installed .NET Core 2.2 SDK to the hosted VS2017 agents yet. Let's see how to work around this issue and have a success build for our .NET Core 2.2 apps. 1. Add Task Edit your build definition, and click the "+" button to add a new task. 2. Add .NET Core SDK Installer …
.NET Azure DevOps

Configure VSTS Build for UWP Apps

UWP Apps usually require a lot of time to compile a "release" package for submitting to Windows Store, and if you are working in a team, TFS/VSTS can help your team ensure that each check-in has a success build, and make it easier for deployment and testing. Let's see a basic example of how to setup a CI build for a UWP App on VSTS. Important Pre-condition: Before you do that, please ensure that …
UWP Azure DevOps

Windows 10 UWP: How to Debug OnFileActivated Launch Failure

Today I am working on my Image Portray App, and I get my code blown up. The problem is, when the App is already started, it can open .ink file with double click from a file. But when the App is not launched, opening a .ink file to start the App will make it crash. As other UWP that supports file type association, I also use OnFileActivated event to launch my App. This kind of problem could not be …
Debug Visual Studio UWP