You could use Scripty. It looks quite nice and fits with the new Analyzers from Roslyn.
http://daveaglick.com/posts/announcing-scripty
https://github.com/daveaglick/Scripty
Since they are dropping the project.json format (https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/) you should be able to use Scripty from the .xproj
or .csproj
file.