[BuildCheck Suggestion]: Non-SDK project defines TargetFramework
#10635
Labels
Area: BuildCheck
BuildCheck Suggestion
Suggestion for a built in MSBuild analyzer. Label should be applied together with 'Area: BuildCheck'
triaged
Summary
A buildcheck to catch errors like the one that is the root cause of #10629.
Background and Motivation
In the modern .NET SDK, you define
<TargetFramework>
or<TargetFrameworks>
to control what the project output targets. Older non-SDK projects have other properties for this (likeTargetFrameworkVersion
). Currently it is allowed and ignored to specifyTargetFramework
. . . but that can lead to a lot of confusion if someone does it, thinks they have retargeted the project, and then moves on.Sample issue or antipattern that the check should be flagging
Sample output
No response
The text was updated successfully, but these errors were encountered: