We’re pleased to introduce the first preview of Source Generators, a new C# compiler feature that lets C# developers inspect user code and generate new C# source files that can be added to a compilation. This is done via a new kind of component that we’re calling a Source Generator.
Microsoft is open sourcing our QUIC library, MsQuic, on GitHub under an MIT license. MsQuic is a cross-platform, general-purpose library that implements the QUIC transport protocol. QUIC is being standardized by the Internet Engineering Task Force (IETF). MsQuic is a client and server solution optimized for multiple usage patterns and is used by multiple Microsoft products and services. MsQuic is currently in preview and supports Windows and Linux.
Channels enable a producer to safely pass data over to a consumer along with the appropriate notifications in both directions.
In this episode, Stephen Toub chats with Rich about the what, why and how of using the System.Threadding.Channels library. They walk us through a simple demo of using channels and also discuss the various strategies at our disposal.
In the quest to migrate to .NET Core, the first step at the time (a couple of years ago) was to start migrating to ASP.NET Core from using Katana (Owin). This seemed like a logical first step as ASP.NET Core 2.x could run on .NET Framework as well as .NET Core. Ultimately this was a good first step in our migration.
Our web application was using the Katana Project and was self hosted using HttpListener. It was not using IIS.
This made our migration much simpler in some aspects because Katana really feels like a precursor to ASP.NET Core. Much of the same concepts exists such as the Startup and Middleware.
I’ve previously blogged about Migrating from Katana to ASP.NET Core. The general gist for migration is to implement any custom middleware you have with Katana over to ASP.NET Core. It’s really straight forward to do so and should feel natural. Most of the types are even named the same or very close to the same.
This will save a bit of work as it adds functionality to ASP.NET Core to that was available in Web API. For example, it adds an ApiController type so you don’t need to update all your controllers to reflect the new ASP.NET Core Controller type.
Check out the official docs on the compatibility shim and what it provides and how to use it.
I don’t have much experience migrating MVC, however, I have used both ASP.NET MVC 5 and ASP.NET Core MVC and it doesn’t feel all that different. All the same, types (by name) exist such as Controller, ActionResult, etc.
Razor is still the same and so are layout files and the _ViewStart.cshtml.
Just like migrating Web API, you will need to create an ASP.NET Core application with the correct Startup class, and add/configure the MVC.
My recommendation is to migrate to ASP.NET Core 2.1 and run it on .NET Framework 4.8.
The long term goal is to be running the latest ASP.NET Core on .NET Core. However, in order to migrate to ASP.NET Core, you want to be able to still run your application, which requires .NET Framework.
Do not worry about all your other dependencies yet, we will cover that in another post.
For developers, writing bug-free software that doesn’t crash is getting difficult in an increasingly competitive world where software needs to ship before it becomes obsolete. This challenge is especially apparent with online cloud services, which are often dictated by aggressive shipping deadlines. Cloud services are distributed programs comprising multiple back-end systems that continuously exchange asynchronous signals while responding to incoming web requests. They are complex by nature, hard to get right, and require protection from failures that could jeopardize client data or halt key services.
YARP (which stands for “YARP: A Reverse Proxy”) is a project to create a reverse proxy server. We found a bunch of internal teams at Microsoft who were either building a reverse proxy for their service or had been asking about APIs and tech for building one, so we decided to get them all together to work on a common solution, this project.
It’s hard to believe that .NET only came out in 2002. There are so many versions of the framework, rapidly changing the places a C# developer could create and support. The entire ecosystem just turned 18, and it has been confusing at times with versioning. I fell in love with how powerful the platform was, but often, choosing to upgrade to the latest major or minor version proved difficult. How much actual value would I get from upgrading?
Lambdas. All the cool kid languages have them. But does ‘lambda’ mean what C#, Java, Python, C++, etc. mean by ‘lambda’? Where did lambdas come from? What were they originally for? What is their relationship to data abstraction?
In this session we will into the history, the syntax and the uses of lambdas and the way in which lambda constructs in various languages do (or do not) match the original construct introduced in lambda calculus.