Dajbych.net


🏷️ .NET

net2015 logo

What’s new in .NET 8?

.NET 8 brings another number of innovations. One of them is the ability to compile a ASP.NET Core application in AOT (ahead-of-time) mode. In this regime, however, forget about MVC, Blazor or SignalR right away. On the other hand, you will be rewarded with an application that will be smaller, take up less memory and start significantly faster. In addition, .NET 8 also brings the ability to easily generate random strings. And C# is not on the sidelines either, as its 12th version fundamentally simplifies class notation. Read more ›

net2015 logo

What’s new in .NET 7?

Although .NET 7 brings another number of innovations, this time the main emphasis was on performance. ASP.NET contains rate limiter, so we can usually do without the web.config file. The 11th version of C# brings better work with strings. And one feature that was previously only available in UWP and Mono – compilation in AOT mode (ahead-of-time) – is now available for the entire framework. Read more ›

net2015 logo

What’s new in .NET 6?

.NET 6 completes the alignment with mobile and desktop development. It introduces the so-called Target framework moniker (TFM), which specifies that the project targets a specific SDK. For example, iOS targeting is written as net6.0-ios. Previously, TFM described a specific version. NET or its clone modified for a specific platform. But that is changing now. All platforms share a single .NET and the specific platform-specific API that is accessible through the SDK is listed after the dash. Read more ›

uwp logo

UWP will become WinUI 3, surpassing WPF and WinRT

The latest and greatest technology, according to Microsoft’s marketing statements, is the Universal Windows Platform. The reason for this was the need for a single runtime for mobile devices, tablets, and desktops. Until recently. Surface Duo will stick with Android, and Windows development is experiencing a rollback. Current UWP apps will no longer be eligible for distribution via the Microsoft Store. Only those based on the Windows App SDK will see the green light. Read more ›

net2015 logo

What’s new in .NET 5?

.NET 5.0 is here. It is a successor to .NET Framework 4.8 and .NET Core 3.1. This means that Console, Windows Forms, and WPF apps can now be packaged with their own runtime. While it was always possible to embed the .NET Runtime installer into the application installer itself, the new approach means that multiple apps do not share and therefore do not depend on a single .NET Runtime. You can develop on the latest bits without affecting others. The implications are huge. Read more ›

net2015 logo

How C# Nullable Reference Types Affects your ASP.NET Core Routing

I thought that the new C# 8.0 feature – non-nullable reference types – was just an IntelliSense feature powered by Roslyn that prevents null reference exceptions. I was wrong. It may affect how your application works in many ways. More specifically, everything that uses reflection can start behaving differently. This includes ASP.NET Core routing. Some bindings can stop working when no additional code changes are applied. Read more ›

blazor logo

Blazor is .NET in a Web Browser. What Makes it Possible?

The most powerful, performant, and easy-to-use UI framework is HTML with CSS and JavaScript. DirectX has an extremely high development cost, and UWP is missing many features that are standard in CSS. The Achilles' heel of pure web development is JavaScript. When you use a higher-level language compiled to JavaScript, one question arises: is JavaScript an efficient intermediate language? The answer is no, and the result is a web bytecode called WebAssembly. Read more ›

net2015 logo

Host ASP.NET Core on Oracle Autonomous Linux with Nginx

This article is a step-by-step manual explaining how to create and configure an Oracle Autonomous Linux virtual machine for hosting an ASP.NET Core 3.1 web application. We will connect to the Linux machine from a Windows workstation using PowerShell. The application will be created and compiled in Visual Studio. The application is self-contained, so the installation of the .NET Core runtime is not necessary. Read more ›

service fabric logo

Visual Studio: Please Restore the MSBuild Nuget Package

I recently ran into a problem after upgrading my Visual Studio Service Fabric project from version 3.1.283 to 3.2.178. The build has been failing, and the advice in the error message was not helpful. Something in the build system was apparently changed, and the update script failed to upgrade the solution successfully. I created a new Service Fabric project and compared what was changed in the latest version. Read more ›

azure2017 logo

Why is the Application Insights TrackMetric method missing?

The short answer is that the method is missing because someone in the development team forgot to use an Obsolete attribute. This method in the TelemetryClient class in the Microsoft.ApplicationInsights NuGet package is used very often. After the latest update of the package, it just disappeared. Surprisingly, the method isn’t listed in IntelliSense, but the older code where this method is used can be successfully compiled without any error or warning. Read more ›

net2015 logo

What’s New in C# 7.1, 7.2 & 7.3 and What’s Next

C# is continuously evolving and absorbing many useful features. Some of them are syntactic sugar, and Visual Studio will propose simplified code, but some of them allow what wasn’t possible before, so taking advantage of the new C# version requires a change in thinking about the code. The best way to unlock new capabilities is by learning functional programming because most features are taken from F#. Read more ›

http logo

How to redirect to HTTPS in ASP.NET MVC application correctly

Upgrading browsers visiting your website to a secure connection is a best practice and is easy to do. I have decided to share my implementation because I have seen many partial or insecure implementations. Correct implementation satisfies both backward compatibility and security requirements of various web browsers. This article covers what you need to know before you start redirecting your users to the HTTPS protocol. Read more ›