'How to use C#10 in Visual Studio 2019

How can I use C# 10 in Visual Studio 2019? I have latest update (16.11.6) and when I try to make a new project (need NET Standard 2.0, for compatibility with 4.7.2) and change it to C#10

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <LangVersion>10.0</LangVersion>
  </PropertyGroup>
</Project>

The IDE will show C#10 features a warning (this is for global usings):

"CS8652: The feature 'global using directive' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version."

When I change the LangVersion to preview, it at least compiles, but my team has a mix of VS2022 and VS 2019 (to be upgraded later), so I am looking for a way to use proper langversion version (I am not comfortable to use preview) that works for all of them.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source