Your solution builds perfectly… yet crashes immediately.
Why this happens
Different projects target different runtime versions, but MSBuild doesn’t warn you.
Fix
Force a single runtime in Directory.Build.props:
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
</Project>
Why it works
It guarantees consistent compilation and runtime behavior across all projects.
