Building and running a .NET Core application in a Docker Swarm in Azure, via Docker Cloud

Building and running a .NET Core application in a Docker Swarm in Azure, via Docker Cloud

Introduction In this article I'll walk you through how to set up a Docker Swarm in Azure through the Docker Cloud service. There's plenty of places to host your docker containers, in this post I'm covering the Docker Cloud option with the Swarm Mode on Azure. I will soon post a few guides for ACS (Azure Container Service) and AKS (Managed Kubernetes on Azure Container Service) which also touches upon how to deploy and host your containerized solutions in the Azure cloud. For the sake of this post, I've created a super-simple console application that outputs messages to an Azure…

Read More

Azure Storage REST API: Authenticate with C#

Azure Storage REST API: Authenticate with C#

In one of my projects where I've been refactoring a traditional .NET project into a .NET Core project, I used the Azure Storage nugets. As of this posting, the current version of the NuGet supports .NET Core which is awesome - but the dependencies doesn't. Why is this a problem? Well, because if you want to migrate this code to run on .NET core and you rely on the Windows Azure Storage NuGet Package, it will not be possible to run it in .NET Core currently. That's why I chose to use the Azure Storage REST API instead for all…

Read More

Using appsettings.json instead of web.config in .NET Core projects

Using appsettings.json instead of web.config in .NET Core projects

Recently I was in a discussion with an acquaintance about transforming their projects into .NET Core from their full .NET applications. Some of these apps have a few core helpers, including the very common requirement to read from config files. Most notably it's the web.config or app.config. In this post, I'm simply outlining the minimal steps required to get a grasp on how you can replace those files with the ConfigurationBuilder in .NET Core, and what your new json-based configuration files can look like. Another tip-of-the-day. Enjoy. Add settings in a new appsettings.json file Now, one thing…

Read More

Running Unit Tests for your .NET Core projects in Visual Studio Team Services (VSTS)

Running Unit Tests for your .NET Core projects in Visual Studio Team Services (VSTS)

One of the challenges I was looking to solve recently was running builds in VSTS for .NET Core, and then run any C# unit tests I had in dotnet core. This is pretty straight forward once you've figured out how - so this post is a short one, aiming to help anyone looking for build and test automation in VSTS with DotNet Core. A small tip-of-the-day post for you. Enjoy. Configure Test Task In Visual Studio Team Services (VSTS) the easiest way to run any unit tests are with the build-in task in VSTS for running tests. When you're editing…

Read More