dotnet-consolidate 4.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global dotnet-consolidate --version 4.0.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dotnet-consolidate --version 4.0.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-consolidate&version=4.0.1
nuke :add-package dotnet-consolidate --version 4.0.1

dotnet consolidate

Build status Quality Gate Status NuGet

.NET core tool that verifies that all NuGet packages in a solution are consolidated.

Developers typically consider it bad practice to use different versions of the same NuGet package across different projects in the same solution.

https://docs.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio#consolidate-tab

The tool finds such discrepancies.

Installation

dotnet tool install dotnet-consolidate --global

Usage

Pass a solution file as a parameter

dotnet consolidate -s YourSolution.sln

or multiple solutions

dotnet consolidate -s YourSolution.sln AnotherSolution.sln

You can also optionally specify the a package ID if you want only a single package to be consolidated dotnet consolidate -s YourSolution.sln -p PackageId

or a list of package IDs if you want to consolidate multiple, but not all which are referenced in the solution projects

dotnet consolidate -s YourSolution.sln -p PackageID1 PackageID2

If the tool finds discrepancies between projects (only the specified ones if -p is given), it exits with non-success status code and prints these discrepancies.

Examples

dotnet consolidate -s umbraco.sln

✅ Output:

All packages are consolidated.

dotnet consolidate -s Sentry.sln

❌ Output:

Found 5 non-consolidated packages

----------------------------
Newtonsoft.Json
----------------------------
Sentry - 11.0.2
Sentry - 6.0.8

----------------------------
Microsoft.Extensions.Logging.Configuration
----------------------------
Sentry.Extensions.Logging - 2.1.0
Sentry.Extensions.Logging - 3.0.0

----------------------------
Microsoft.Extensions.DependencyInjection
----------------------------
Sentry.AspNetCore - 2.1.0
Sentry.Extensions.Logging.Tests - 2.1.1
Sentry.Extensions.Logging.Tests - 3.0.0

----------------------------
Microsoft.Extensions.Configuration.Json
----------------------------
Sentry.Extensions.Logging.Tests - 2.1.1
Sentry.Samples.GenericHost - 2.1.1
Sentry.Extensions.Logging.Tests - 3.0.0

----------------------------
Microsoft.AspNetCore.TestHost
----------------------------
Sentry.Testing - 2.1.1
Sentry.Testing - 3.1.0
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
4.2.0 30,310 12/13/2023
4.1.0 9,650 11/10/2023
4.0.1 26,788 7/28/2023
4.0.0 1,262 7/27/2023
3.0.2 64,947 2/24/2023
3.0.1 1,548 2/22/2023
3.0.0 1,199 2/22/2023
2.1.0 31,979 12/11/2022
2.0.0 84,488 8/30/2022
1.2.2 25,800 12/13/2021
1.2.1 52,007 1/4/2021
1.2.0 1,361 12/29/2020
1.1.0 1,522 11/5/2020
1.0.0 3,417 4/5/2020