Given a .NET Framework project (non-SDK) referenced by any project, (erroneously) add
<TargetFrameworks>net46;net8.0</TargetFrameworks>
to try to make it multitarget. That is ignored by the non-SDK common targets, so the individual project can build, but the referencing project fails before RPR, leaving you with
> msbuild -bl
ClassLibrary2 succeeded (0.1s) → ClassLibrary2\bin\Debug\ClassLibrary2.dll
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
ClassLibrary2 failed with 1 error(s) (0.0s)
C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1967,5): error : Internal MSBuild error: Non-CrossTargeting GetTargetFrameworks target should not be used in cross targeting (outer) build
Build failed with 1 error(s) in 0.6s
That error isn't wrong but it sure doesn't help you fix the problem.
Given a .NET Framework project (non-SDK) referenced by any project, (erroneously) add
to try to make it multitarget. That is ignored by the non-SDK common targets, so the individual project can build, but the referencing project fails before RPR, leaving you with
That error isn't wrong but it sure doesn't help you fix the problem.