Add a couple of directives
<PropertyGroup Condition="'$(TargetFramework)'=='net48'">
<AssemblyName>app-net48</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net5.0-windows'">
<AssemblyName>app-net50</AssemblyName>
</PropertyGroup>
surely, you can also use
<Choose>
<When Condition="....">
<PropertyGroup>
</PropertyGroup>
</When>
<When Condition="....">
<PropertyGroup>
</PropertyGroup>
</When>
</Choose>
Reference link
use <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
in the initial <PropertyGroup>
to remove adding folder structures to the output
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…