Skip to content

A personal NuGet package containing rules and analyzers to share .NET code style and configuration across multiple projects

License

Notifications You must be signed in to change notification settings

Kiruyuto/.NET-Config

Repository files navigation

.NET-Config

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.

Usage

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

Structure overview

Building & Local testing

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.1

After 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 KiruyutoDotNetConfigLocal

Then run this command to check if source was added:

dotnet nuget list source

Tip

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 source

When you are done testing and want to remove the local source, run:

dotnet nuget remove source KiruyutoDotNetConfigLocal

Contributing

See CONTRIBUTING.md for details.

About

A personal NuGet package containing rules and analyzers to share .NET code style and configuration across multiple projects

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •