Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 606 Bytes

File metadata and controls

28 lines (22 loc) · 606 Bytes

Proj0700: Avoid defining items in SDK project

The .net.csproj SDK project is a placeholder for non-compiling files. Adding <Compile> items has no meaning, as the project has no (publically) accessable compilation artifacts.

Non-compliant

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

  <ItemGroup>
    <Compile Include="Code.cs" />
  </ItemGroup>
  
</Project>

Compliant

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

  <ItemGroup>
    <None Include="Code.cs" />
	<Content Include="Code.cs" />
	<AdditionalFiles Include="Code.cs" />
  </ItemGroup>
  
</Project>