avalonia docs

Changing the Target Framework

By default, our project templates target .NET 5, but older versions of .NET Core and .NET Framework 4.6.1 and above are still supported.

You can change the frameworks that your project targets by opening the .csproj file and editing the <TargetFramework> or <TargetFrameworks> element.

When a single target framework is required, use the TargetFramework element. If you want to target multiple target frameworks from the same project you should use TargetFrameworks and separate the frameworks with a ;.

Some examples:

<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net461</TargetFramework>
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>

For more information on target frameworks, see the .NET documentation.