NuSight - a .net core tool to triage your solution nuget packages

This is a .net tool that analyze your solution folder, discover all your project files and diagnose all the nuget packages if they require attention, such as any project contains outdated packages or inconsistent package versions, etc. And it can be used as validation process by your CI/CD pipelines.

Pre-request

Table of Contents


Features

NuSight is analyzing solution and discovering all project nuget packages.


Installation

NuSight

NuSight

$ dotnet tool install -g NuSight

Usage

nusight list

a command can be used for your CI build to validate your nuget packages for the whole solution.

$ nusight list -h 
$ nusight list -s=<YOUR_PATH> 
$ nusight list -s=<YOUR_PATH> -i
$ nusight list -s=<YOUR_PATH> -o
$ nusight list -s=<YOUR_PATH> -p
$ nusight list -s=<YOUR_PATH> -u

If the triage finds any above errors, it will return with an error code, and your pipeline will fail. Otherwise return with a 0 code and pipeline will succeed.

nusight update

a command can be used for bulk updating packages in multiple projects under a solution folder.

$ nusight update -h 
$ nusight update -s=<YOUR_PATH> 
$ nusight update -s=<YOUR_PATH> -d

nusight remove

a command can be used for bulk removing packages in multiple projects under a solution folder.

$ nusight remove -h 
$ nusight remove -s=<YOUR_PATH> 
$ nusight remove -s=<YOUR_PATH> -p=Serilog
$ nusight remove -s=<YOUR_PATH> -p=Serilog -d

nusight clone

a command can be used for cloning all nuget packages from a source solution/project to a target project, this is handy if you have a template project and its nuget packages will always be used for any future projects, you can always clone your them to the new projects.

$ nusight clone -h 
$ nusight clone -s=<YOUR_PATH> 
$ nusight clone -s=<YOUR_PATH> -t=<TARGET_PATH>/<PROJECT>.csproj
$ nusight clone -s=<YOUR_PATH> -t=<TARGET_PATH>/<PROJECT>.csproj -d
$ nusight clone -s=<YOUR_PATH> -t=<TARGET_PATH>/<PROJECT>.csproj -l

nusight export

a command can be used for exporting nuget package reference as json file.

$ nusight export -h 
$ nusight export -s=<YOUR_PATH> 
$ nusight export -s=<YOUR_PATH> -f=<FILE_PATH>/<FILE_NAME>.json

nusight import

a command can be used for importing nuget packages from an exported json file.

$ nusight import -h 
$ nusight import -s=<YOUR_PATH> 
$ nusight import -s=<YOUR_PATH> -f=<FILE_PATH>/<FILE_NAME>.json
$ nusight import -s=<YOUR_PATH> -f=<FILE_PATH>/<FILE_NAME>.json -d

To use it with github actions

    - name: Nuget triage
      working-directory: ./MyProject
      run: | 
        dotnet tool install -g NuSight
        nusight list -o -p -u -i

To use it with gitlab CI

build:
  stage: 'build'
  script: 
    - dotnet restore
    - dotnet build    
    - dotnet tool install -g NuSight
    - nusight list -o -p -u -i
  when: always  


Support

Reach out to me at one of the following places!


License

License


Reference

TODO