PackIT
PackIT copied to clipboard
Directory.Build.props
Part 1:. Add <TreatWarningsAsErrors>true into Directory.Build.props, no need to add it everywhere, rather disable it explicitly if for some weird reason you need to
https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2022
You can add something like this to the root of your source code folder and they will act as defaults for the csproj files:
<Project>
<PropertyGroup Label="Configure assembly names and namespaces">
<AssemblyName>Company.Division.$(MSBuildProjectName)</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
</PropertyGroup>
<PropertyGroup Label="Defaults">
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>