You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Program Files\dotnet\sdk\8.0.100-preview.7.23369.9\Microsoft.Common.CurrentVersion.targets(1842,5): error : Project
'..\lib\lib.csproj' targets 'net8.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.0'. [
C:\scratch\noBuildCrossTargeting\notargets\notargets.proj]
This is happening because common targets is setting TargetFrameworkIdentifier and TargetFrameworkVersion. Probably the fix here is to see what happens in outer build of a CSProj and try to match that.
It seems that the NoTargets project is getting confused if it's in an outer or inner build.
Try the attached repro:
noBuildCrossTargeting.zip
When building this you'll see:
This is happening because common targets is setting TargetFrameworkIdentifier and TargetFrameworkVersion. Probably the fix here is to see what happens in outer build of a CSProj and try to match that.
cc @carlossanlop @ViktorHofer
The text was updated successfully, but these errors were encountered: