xUnit Test Discovery Error with ASPNET Core 1.1

If you run into an error with test discovery using xUnit and ASP.NET Core 1.1 where there is a FileNotFoundException looking for Microsoft.DotNet.Internal.Abstractions version 1.0.0.0, there is a fairly simple fix. The problem is that one of the dependent packages in ASP.NET Core requires this package but for some reason it’s not being pulled in. […]

The Minimal ASPNET 1.1 App

The Minimal ASPNET 1.1 App

In a previous article, I described how to create the minimal ASP.NET Core 1.0 app. That is, what’s the smallest amount of code you could write to produce an ASP.NET Core application? In this article, I’ll demonstrate how to do the same for ASP.NET Core 1.1. The main difference is in the project file, which […]

Configuring ASPNET Core Apps with WebHostBuilder

In ASP.NET Core apps, you typically configure the application in Startup. However, the application itself runs inside of a host, which is configured separately using a WebHostBuilder. Although it’s not the default, recommended case (and thus isn’t shown in the official docs), you can actually configure the application directly from WebHostBuilder and avoid using a […]

Specifying API Routes in ASPNET Core

ASP.NET Core uses attribute routing to determine the behavior of web APIs. Its integrated support for MVC and Web API is one of my favorite features, since working with MVC 5 and Web API 2 was painful due to the similarities but separate implementations of the two stacks. When creating routes for your APIs, a […]

Real World ASPNET Core MVC Filters

Real World ASPNET Core MVC Filters

Filters are a great, often underutilized feature of ASP.NET MVC and ASP.NET Core MVC. They provide a way to hook into the MVC action invocation pipeline, which makes them idealĀ for pulling common repetitive tasks out of your actions. Often, an app will have a standard policy that it applies to how it handles certain conditions, […]