error CS8773: “Feature ‘global using directive’ is not available in C# 9.0” after downgrade from net6.0 to net5.0

Finally I found that the reason is an extra property ImplicitUsings in the project file that is not supported by .net 5.0.

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

I needed to remove ImplicitUsings from the file.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)