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

C# 7.1 - Everything You Need To Know

Visual Studio 2017.3 brought with it the first minor update to the C# language, C# 7.1. This update adds four new features to C#: async main, target-typed default literals, tuple name inference, and generic support for pattern-matching.

In this post, you'll learn how to enable the new C# 7.1 language features in your …

Read More

Upgrading to .NET Core and .NET Standard Made Easy

With the release of .NET Core 2.0 and .NET Standard 2.0, now is a great time to consider upgrading your projects to .NET Core and your libraries to .NET Standard.

By upgrading your projects to .NET Core 2.0 you get cross-platform support and higher performance. By upgrading your libraries to .NET Standard you get greater compatibility and ensure they can be used in projects targeting …

Read More

Understanding .NET Standard - An Interface Not An Implementation

With so many different platforms, standards, and frameworks, how do you make sense of it all? There is .NET Framework, .NET Core, and .NET Standard before you even get to Mono and Xamarin.

What is the difference, which do I need, what is .NET Standard? When do I use .NET Standard? If you're confused, then you're not alone and this post is for you.

In this post, I explain .NET …

Read More

What is .NET? Framework or Platform?

You'll often hear the terms framework and platform used interchangeably. This can be very confusing. You'll hear that .NET Core is a platform. Then you'll read that .NET Core is cross-platform. Next, you'll learn that .NET Core is a framework. And it doesn't help that framework is part of the name of the original full .NET Framework.

In this post, I explain …

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

Getting Started with Visual Studio 2017 v15.3

Microsoft has just released a round of major updates to the .NET stack. Visual Studio 2017 gets its biggest update yet. C# gets its first update to C# 7.1 as part of the faster release cadence enabled by Roslyn. The new open source frameworks .NET Core and ASP.NET Core both get their 2.0 releases and .NET Standard 2.0 has arrived to unify everything.

Over the last 16 hours I've been …

Read More

Maximizing Throughput - The Overhead of 1 Million Tasks

I recently needed to choose between two competing designs: a simple one that needed millions of tasks or a complex one that needed only a few processing threads.

Plan A was to leverage the power of Task-based asynchronous programming in .NET to create a simple solution that had tasks waiting on a mix of other tasks, timers, events, and more; but, it would need millions of tasks, all …

Read More

Better Benchmarking with Additive and Multiplicative Baselines

In my recent blog posts I've been benchmarking different ways to cast in C#. If you have a keen eye, you may have noticed that the results do not match up. In one experiment, a direct cast (no cast at all) takes 15ns, while in another experiment, a more complicated generic cast

Read More