robyvandamme / dotnet-start

A collection of default settings for new C# .NET repositories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotnet-start

A collection of default settings for new C# .NET repositories

Project Configuration

You can find example project configurations in the test branch.

Configure a .NET Project With Style

Add the StyleCop.Analyzers NuGet package to your project. Then add the following to your .csproj file:

 <ItemGroup>
    <AdditionalFiles Include="..\..\stylecop.json">
      <Link>CodeStyle\stylecop.json</Link>
    </AdditionalFiles>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="..\..\GlobalSuppressions.cs">
      <Link>CodeStyle\GlobalSuppressions.cs</Link>
    </Compile>
  </ItemGroup>

The above assumes your directory structure to be like src/my-project.

Configure a .NET Project With Documentation

 <PropertyGroup>
    <TargetFramework>net7.0</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>

Configure a .NET Project Without Documentation

 <PropertyGroup>
    <TargetFramework>net7.0</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <NoWarn>$(NoWarn),1573,1591,1712</NoWarn>
  </PropertyGroup>

About

A collection of default settings for new C# .NET repositories


Languages

Language:C# 100.0%