.NET Core Self-Contained and Framework-Dependent Deployments Explained

When you publish a .NET Core project, you can choose between two deployment modes: Framework-Dependent and Self-Contained.

Framework-Dependent deployments are the default and were previously your only choice on .NET Framework. However, .NET Core has added the option of Self-Contained deployments to .NET projects including ASP.NET Core projects.

In this post, I explain the …

Read More

How to setup ASP.NET Core 2.1 on Linux in under 10 minutes

I was pleasantly surprised by how easy it was to setup and install ASP.NET Core 2.1 on Linux. I did it for the first time in 15 minutes with no previous experience with .NET Core on Linux. I did it the second time, in production, in 5 minutes by following these instructions.

In this article, I show you how to install the .NET Core runtime on CentOS, how to get a sample ASP.NET Core …

Read More

What C# can learn from Haskell: Pipe Operator

I love movies and TV shows like Memento, Westworld, and Inception for their complexity, depth, and surprises. But I prefer my code to follow a straight-forward linear progression, that tells you the whole story with no surprises, and you should too.

There are many ways to write the same piece of functionality, the same function, the same system. Different programming …

Read More

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 run Linux in Hyper-V on Windows

Spinning up a new Linux VM using Hyper-V is surprisingly easy. I managed to get CentOS installed and running on Windows Server 2016 is no time, but there were a few gotchas along the way.

In this post, I document the steps I took to install CentOS 7.5 on Hyper-V. I installed Hyper-V on a Windows Server 2016 box, but these steps should also work just as easily on Windows 10 and with …

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

The Missing Caret - 5 Tips to Save Everyone Time

I recently installed Confluence to try it out as a possible replacement for MediaWiki for internal documentation.

However, I ran into a bug. In this post, I explain the bug, the solution, and provide 5 tips on how it could have been avoided. If you follow these tips, you'll help save …

Read More

Accessing Tuples at Runtime using Reflection

C# 7 added Tuples and provides an awesome syntax for accessing them. C# 7.1 improved the usability of tuples further with Tuple Name Inference. However, sometimes you need to access them dynamically and this can be tricky.

Read More

Upgrading ASP.NET Libraries to .NET Standard

.NET Standard is great; .NET Standard is an interface that allows you to write libraries once and consume them from different applications on different .NET platforms, including ones that don't even exist yet.

Standalone libraries are often straightforward to upgrade to .NET Standard, but what about …

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