Speed up compilation of ASP.NET Core 2.1 projects

If you've recently started a new ASP.NET Core 2.1 project, or upgraded an existing project, and your username contains a space, you may find your builds and compilation is very slow. This post explains how to dramatically speed things up.

Razor has received some new features in ASP.NET Core 2.1. The big one is that you can now create Razor class libraries that let you use Razor to …

Read More

How to fix IIS HTTP Error 502.5 in ASP.NET Core

When deploying an ASP.NET Core application to IIS, you may find IIS returning HTTP Error 502.5 instead of your web page.

I recently hit this problem after manually modifying the web.config file. Fortunately, the problem is easy to fix.

In this post, we see two different causes of this error, two different solutions for the first cause, a solution for the second …

Read More

ASP.NET Core - A Complete Rewrite of ASP.NET

ASP.NET Core 2.0 was released alongside Visual Studio 2017.3 and is ready for use, but its relationship with prior frameworks is often misunderstood and can be confusing.

Many people seem to think ASP.NET Core is simply the next version of ASP.NET MVC. However, it is so much more than that, it is a replacement and …

Read More

Fixing the Duplicate Content Error after Upgrading Visual Studio 2017

If you have an ASP.NET Core project that was working fine and you upgrade to Visual Studio 2017, you're bound to hit the Duplicate Content compile error. This will affect you regardless of which framework you use and affects both .NET Framework and .NET Core projects, even if you haven't upgraded to .NET Core 2.0.

In this post, I explain why it happens, why the change has been made, …

Read More

How to set a custom Code Analysis Rule Set on an ASP.NET Core project

If you want to set a custom code analysis rule set on an ASP.NET Core project, there is currently no UI tooling in Visual Studio 2017 to support this scenario. However, you can add it manually to the csproj file.

To set a custom code analysis rule set on an ASP.NET Core project, right click on the project in solution explorer, select Edit <YourProjectName>.csproj

Read More