Running ASP.NET Core Applications on Windows Subsystem for Linux

Windows 10 has something called Windows Subsystem for Linux and this something enables us to run Linux applications on Windows 10 using Linux without Hyper-V or other virtual machines. When building multi-platform applications like my open-source TemperatureStation solution, then having Linux right there for testing comes very much in handy. This blog post shows how to get Linux running on Windows, how to install .NET Core, and how to run web applications on Linux.

NB! I have a Windows 10 Fall Creators Update and this post is written based on this. In general, same steps apply to other Windows 10 versions with some minor differences.


Using ASP.NET Core TagHelpers [Podcast]

Recently, Microsoft announced the release of ASP.NET Core 2.0. With this release comes a new feature for building HTML views called TagHelpers. With ASP.NET Core 2.0, TagHelpers allow developers to write component based-views for server-side rendering by utilizing a syntax similar to HTML. This new syntax incorporates concepts used in HTML, elements, and attributes. When using TagHelpers in a .cshtml view, Visual Studio treats the TagHelper as it would HTML, but with added server-side functionality. Often with HTML Helpers, the CSS class attribute was difficult to add and completely lacked Intellisense. With TagHelpers, developers get rich Intellisense for not only server-side code, but also with any HTML attributes supported by Visual Studio.


How to Serve Static Files in ASP.NET Core 2.0 MVC

The ability to serve static files in an MVC Core app is completely optional. This article shows you how to add and configure it should you need it.
This post follows on from Create a minimal ASP.NET Core 2.0 MVC web application, worth a read if you are creating an MVC project from an empty template.


4 Benefits of Migrating to ASP.NET Core 2.0

With the onslaught of .NET Core 2.0 blog posts and coverage released over the past week, I’m sure the most asked question in the developer community is, ” should I migrate my web application to ASP.NET Core 2.0?" My heart says answer with a resounding "YES," but my head is forcing me to say "it depends."


Create a Minimal ASP.NET Core 2.0 MVC Web Application

This guide shows you how to set up an ASP.NET Core 2.0 MVC web application from an empty template.
You can create a project using the MVC template in .NET Core but it will often include a load of things that we don’t need. My preference is always to start a project from scratch.


Self-Contained UI: Running One ASP.NET Core MVC Site Inside Another

If you have ever used any 3rd party packages like Hangfire or Elmah you will have seen a self-contained UI before. These packages when added to a web project will have their own user interfaces which can be accessed from an admin route like /hangfire or /elmah. These packages don’t bring in any HTML, CSS or JavaScript resources, they just work, and they work well.
If you have ever tried to implement a similar self-contained UI in one of your projects you may have found it quite difficult to set up. The development workflow can also be a bit of a pain. You may have had to make trade-offs on development features like editing your HTML and seeing it refresh without having to recompile the app.


Creating an Email Form With ASP.NET Core Razor Pages

In the comments of my last post, I got asked to write about how to create an email form using ASP.NET Core Razor Pages. The reader also asked about a tutorial about authentication and authorization. I’ll write about this in one of the next posts. This post is just about creating a form and sending an email with the form values.

Creating a New Project
To try this out, you need to have the latest Preview of Visual Studio 2017 installed (I use 15.3.0 Preview 3) and you need .NET Core 2.0 Preview installed (2.0.0-preview2-006497 in my case).


Learn ASP.NET Core Using Angular 2

In this article, we will learn ASP.NET Core using Angular 2 in Visual Studio 2017.

Why should we use Angular 2?
Why should we use ASP.NET Core?
What should we know about?
How do we use Angular 2 in ASP.NET Core?

Why Should We Use Angular 2?
Angular 2 is a great framework to use for getting the most out of the latest browsers and thus for creating better applications. Angular 2 can build applications that live on:


ASP.NET Core 2: New SPA Templates

With ASP.NET Core 2.0 Preview 2, there are new web application templates available for Single Page Applications (SPA). Currently Angular, React.js and React.js + Redux are supported. This blog post gives a short overview of new templates and related sample applications.

New SPA Templates
When creating a new ASP.NET Core application using Visual Studio 2017 Preview 3, there are now three new templates available for SPAs as shown in the screenshot below.


Upgrade Your .NET Core Service Fabric Microservices From VS 2015 to VS 2017

Service Fabric projects have evolved at what feels like a break-neck pace, along with the .NET Core platform and tooling, and with the recent release of Visual Studio 2017, no doubt you are considering the productivity merits of upgrading (container support). For Service Fabric projects designed in Visual Studio 2015 and using the .Net Core .xproj/project.json structures now deprecated in Visual Studio 2017, the automatic upgrade process may result in only partial conversion success.
In this article, we’ll take a look at the issues encountered while upgrading a .NET Core Service Fabric solution containing 77 .xproj/project.json projects to Visual Studio 2017.