I am trying to build a project with below versions -
<PropertyGroup>
<TargetFrameworks>net48;net5.0</TargetFrameworks>
</PropertyGroup>
In this project, there is a reference project which also targets the same version.
When I try to build the project I get the below error -
Please help me to resolve this.
Observation - When I try to build these projects separately for both 4.8 and 5.0 they compile without errors.
TIA

It seems like you are referencing a library with a different .net version. Try finding another (version of the) library that uses .netframework 4.8