Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 583 Bytes

File metadata and controls

30 lines (23 loc) · 583 Bytes
parent ancestor
General
MSBuild

Proj0009: Use the <TargetFramework> node for a single target framework

To prevent confusion, only use the <TargetFrameworks> node when there are multiple target frameworks. Otherwise use the <TargetFramework> node.

Non-compliant

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>net8.0</TargetFrameworks>
  </PropertyGroup>

</Project>

Compliant

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>

</Project>