Updating the NodeJS version of your Azure Web App

A very nice feature of Azure Web Apps is the ability to link them to a Git repo (or specific branch of a Git repo) and have the content of the site automatically updated when changes are pushed to that Git repo (or specific branch). I use this feature for the dotnetFlix website and this has been working like a charm for several months.

Today I wanted to make some changes to the site and figured that it would be a good idea to also upgrade to the latest .NET Core version (1.0.1). I switched to the ‘Staging’ branch and started by updating the version-numbers of the dependencies in the project.json file. I made the necessary changes to the content of the site, hit F5 and everything worked like a charm on my local machine.

I pushed the changes to the Staging branch of my Git repo in VSTS and waited for the changes to appear on the Staging website. But when no changes had appeared after waiting a couple of minutes while refreshing the site periodically, I opened the Azure management portal and looked at the deployment status for the Staging website. To my surprise, I was greeted by an exclamation mark to indicate the deployment had failed. The Generate Deployment Script step had failed, but unfortunately the log didn’t reveal any errors.

In my first attempt of finding the root cause of this failure, I compared the Application Settings of the Wep App with one that I created more recently. This proofed to be a golden move because I quickly found a difference. The WEBSITE_NODE_DEFAULT_VERSION setting for the dotnetFlix staging Web App was 0.10.32 and for the new Web App it was 4.4.7.

RTM libraries

This could be the problem. After updating the setting to 4.4.7 I did a redeploy and this time everything worked like a charm.

So when you encounter any errors when deploying an Azure Web App, check the WEBSITE_NODE_DEFAULT_VERSION setting and make sure the latest NodeJS version is reflected here.

Share Comments

.NET Core Presentation

On June 1st, my co-worker Jonathan Mezach and I gave an introductory talk on .NET Core for our Info Support colleagues at our weekly knowledge-sharing meet-up.

You can watch it here (it’s in Dutch!).

Share Comments

Introducing .NET Core 1.0 RTM

Today, the Microsoft .NET team announced the general availability of the RTM version of .NET Core 1.0, ASP.NET Core 1.0 and Entity Framework Core 1.0. Go to the .NET Core website to get started.

Although this RTM release is a major milestone in the .NET Core roadmap, it does not contain a lot of new stuff compared to the RC2 release.

Tooling

Although the .NET Core runtime and libraries are RTM, the tooling for building .NET Core applications is still in preview. These include:

  • .NET Core CLI
  • Visual Studio Tools for .NET Core
  • Visual Studio Code extension for .NET Core

Before installing the Visual Studio tools for .NET Core, make sure you install Visual Studio 2015 Update 3.

Documentation

With this RTM release, also a brand-new .NET documentation site has been launched (https://docs.microsoft.com/dotnet). Besides specific documentation on .NET Core, this site also contains more general documentation on .NET concepts, C#, F#, Visual Basic.

What’s new in RTM?

Version 1.0.0

First thing that obviously stands out when you start working with the RTM bits, is the version-number of all the libraries. If you search for a .NET Core library in the NuGet package-gallery, you will find that all packages now have version 1.0.0 in stead of the pre-release RC2 versions they had until today (e.g. 1.0.0-rc2-final):

RTM libraries

Mutiple code generation types in the .NET Core CLI

In previous versions of the .NET Core CLI tooling, it was possible to create a very simple console application using the dotnet new command. With the RTM release, you can now specify one of the following application types using the -t <type> or --type <type> argument:

  • Console application - simple console application
  • Web - a simple web application
  • Lib - a class library
  • XUnitTest - an XUnit based unit-test project

Although dotnet new provides some quick-start templates out-of-the-box, you should check out the ASP.NET Core generators for Yeoman for some more scaffolding power. Besides being able to generate a complete project structure for several .NET Core application-types for you, they also offers sub-generators for generating additional stuff like: classes, MVC controllers, MVC Views, Angular Controllers, and many more.

Self-contained applications

.NET Core offers different ways of deploying your app: as a portable app or as a self-contained app. A portable app expects the .NET Core runtime and libraries to already be present on the machine the app is deployed to.

A self-contained app is (as the name implies) fully self-contained and can be deployed to a machine that doesn’t have .NET Core installed. It does however need the correct native dependencies for running .NET Core applications. This differs per platform off-course. If you want to know the core dependencies for Linux for instance, look at the Docker file for the 1.0.0-core-deps Docker image that is available on Docker Hub.

With the RTM release the way you create a self-contained app is slightly different than with the RC2 bits. To make an app self-contained, change the dependencies section in your project.json. Remove the following part:

1
2
3
4
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}

and replace this with:

1
2
3
"NETStandard.Library": "1.6.0",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
"Microsoft.NETCore.DotNetHostPolicy": "1.0.1"

Also add a runtimes section for all the runtimes that you want to build your app for:

1
2
3
4
"runtimes" : {
"win10-x64": {},
"ubuntu.14.04-x64" : {}
},

Now you can do a dotnet publish -c release -f netcoreapp1.0 -r <runtime identifier> to create a self-contained application for the specified runtime:

Self contained app

API changes

Several new API’s are added in the RTM release. Some important additions are:

  • System.IO.FileSystem.Watcher - FileSystemWatcher.WaitForChanged
  • System.Reflection.Context
  • System.Security.SecureString

For a complete list of API changes in thr RTM release see the API Diff between RC2 and RTM.

.NET Core tools telemetry

The .NET Core CLI now contains a feature that collects usage telemetry. Microsoft claims no sensitive data will be collected. This feature is enabled by default. In case you don’t want any usage telemetry is recorded, set an environment variable named DOTNET_CLI_TELEMETRY_OPTOUT with the value true.

WCF Improvements

Support for a subset of the Windows Communication Foundation (WCF) framework was already available in earlier releases of .NET Core. This is only the client side stack (for consuming WCF services). In the RTM release, some of the most important updates for WCF are:

  • Better performance with as result increased throughput for several communication transports.
  • Improved reliability of several communication transports.
  • Better certificate support for security on different platforms.

Also an update of the WCF Connected Service extension for Visual Studio (preview) is released. This extension can be used to generate a proxy for a WCF service in a .NET Core project.

See the documentation for more in-depth information.

Offline support

The .NET Core libraries are cached locally the first time you use the .NET Core CLI. This means that you don’t have to be connected to the Internet when building applications that only target the .NET Core runtime and libraries.

Taking it to production

With this being an RTM release, you can now start using .NET Core in production, with full support from Microsoft. But keep in mind that the tooling is still in preview and will most definitely change before becoming RTM. One of the upcoming changes will be the announced switch from the project.json format to the MSBUild based .csproj format for project files.

If you start working with the RTM release, make sure you also check out the release notes and the known issues list.

Let’s build stuff!

I hope you’re as exited as I am about .NET Core and the new possibilities this “new .NET” offers us. Let’s build some great applications with it!

Share Comments

dotnetFlix: Azure Service Fabric met Mark Fussell

Er is een nieuwe aflevering van dotnetFlix beschikbaar! In deze aflevering was Mark Fussell van Microsoft de spreker. Op de //Build conferentie in San Francisco is aangekondigd dat Azure Service Fabric publiek beschikbaar is. We hebben o.a. hierover gesproken met … Continue reading

The post dotnetFlix: Azure Service Fabric met Mark Fussell appeared first on Info Support.

Share Comments

dotnetFlix: Language Understanding Intelligent Service

Er is een nieuwe aflevering van dotnetFlix beschikbaar! In deze aflevering was Edwin van Wijk van Info Support de spreker. Op de //Build conferentie in San Francisco is een aantal Cognitive Services geïntroduceerd. In deze aflevering laat Edwin zien hoe … Continue reading

The post dotnetFlix: Language Understanding Intelligent Service appeared first on Info Support.

Share Comments

dotnetFlix: Microsoft Bot Framework

Er is een nieuwe aflevering van dotnetFlix beschikbaar! In deze aflevering was Sander Molenkamp van Info Support de spreker. Op de //Build conferentie in San Francisco is het Microsoft Bot Framework geïntroduceerd. In deze aflevering laat Sander zien hoe eenvoudig … Continue reading

The post dotnetFlix: Microsoft Bot Framework appeared first on Info Support.

Share Comments

dotnetFlix: Azure Container Service (ACS) met Saurya Das van Microsoft

Er is een nieuwe aflevering van dotnetFlix beschikbaar! Tijdens de Microsoft //Build conferentie in San Francisco hebben we een interview gedaan met Saurya Das. Hij is een Program Manager bij Microsoft en is lid van het Azure Linux Compute team … Continue reading

The post dotnetFlix: Azure Container Service (ACS) met Saurya Das van Microsoft appeared first on Info Support.

Share Comments

dotnetFlix: Software Architecture at Spotify with Niklas Gustavsson

Er is een nieuwe aflevering van dotnetFlix beschikbaar! In deze aflevering was Niklas Gustavsson van Spotify onze gast. In deze aflevering waren we in de gelegenheid om Niklas Gustavsson van Spotify voor onze camera te interviewen. We vroegen hem hoe … Continue reading

The post dotnetFlix: Software Architecture at Spotify with Niklas Gustavsson appeared first on Info Support.

Share Comments

dotnetFlix: Octopus Deploy

Er is een nieuwe aflevering van dotnetFlix beschikbaar! In deze aflevering was Jonathan Mezach van Info Support onze gast. Octopus Deploy is een tool voor het geautomatiseerd deployen van software. De tool is gebouwd door .NET developers voor .NET developers … Continue reading

The post dotnetFlix: Octopus Deploy appeared first on Info Support.

Share Comments

Building, deploying and testing an ASP.NET Core application in a Docker container on Linux using the TFS2015 task-based build system

As you may have noticed, Microsoft has been following a new strategy lately when it comes to Open Source Software and cross-platform (or as the cool kids say: “xplat”) software development. One of the results of this new strategy is … Continue reading

The post Building, deploying and testing an ASP.NET Core application in a Docker container on Linux using the TFS2015 task-based build system appeared first on Info Support.

Share Comments