Personal set of rules and analyzers distributed as a NuGet package to share configuration across .NET projects.
Heavily based on Gérald Barré (@Meziantou)'s "Sharing coding style and Roslyn analyzers across projects" post and his CodingStandard repository.
This config contains rules changed and fine-tuned to my personal and work needs as well as preferences.
Add the NuGet package to your project, and the configs will be automatically imported.
Important
It is recommended to use Directory.Build.props in your project over per .csproj configuration
- Dependencies can be found in Kiruyuto.DotNet.Config.csproj
.globalconfigrule configurations are located infiles/directory.propsfiles are located inbuild/directory. These are split into 'categories' for improved maintainability
Run this command in the repository root to generate .nupkg file in local-packages/ directory:
dotnet pack Kiruyuto.DotNet.Config/Kiruyuto.DotNet.Config.csproj -c Release -o ./local-packages -p:PackageVersion=0.0.1After that, you can add the generated package as a local source in your projects to test it out.
dotnet nuget add source "$(cygpath -w "$(pwd)/local-packages")" -n KiruyutoDotNetConfigLocalThen run this command to check if source was added:
dotnet nuget list sourceTip
You can run this one-liner to do above steps at once:
dotnet pack Kiruyuto.DotNet.Config/Kiruyuto.DotNet.Config.csproj -c Release -o ./local-packages -p:PackageVersion=0.0.1 && dotnet nuget add source "$(cygpath -w "$(pwd)/local-packages")" -n KiruyutoDotNetConfigLocal && dotnet nuget list sourceWhen you are done testing and want to remove the local source, run:
dotnet nuget remove source KiruyutoDotNetConfigLocalSee CONTRIBUTING.md for details.