Skip to main content

.NET 5 Global Using Error

If you have a project that is targeting a .NET 5, and you see the following error, follow this page:

image.png

The error indicates that your csproj file likely has a statement that only works in .NET6 (C# v10) and later.

Open your csproj file and look for a statement, like this:

image.png

If set to enable (in a .NET 5 project), that is causing the problem.

Set it to 'disable', and rebuild.