0

What I would basically like to know is if there is a way of knowing which versions of all the NuGet packages my project depends on/requires, so that I can configure each one accordingly. A PowerShell command that would provide the above would be great.

I receive the below error when I build my solution:

Severity Code Description Project File Line Suppression State Error The "Csc" task failed unexpectedly. System.TypeLoadException: Could not load type 'System.ValueTuple`3' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at Microsoft.CodeAnalysis.BuildTasks.ManagedToolTask.GenerateCommandLineCommands() at Microsoft.Build.Utilities.ToolTask.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() NBC.CMS.Cms

boxdog
  • 7,894
  • 2
  • 18
  • 27

2 Answers2

0

If you are using Visual Studio, you can quickly see the Dependencies and what version they are expected by the following:

.NET-Framework Solutions

  1. Your App.config file will show you all NuGet downloaded dependencies
  2. Follow Solution->Project->References for all NuGet and System dependencies

.NET-Core

  1. Solution->Dependencies->NuGet

If you are looking for a CLI solution, try the following solutions.

Visual Studio

  1. Click Tools->NuGet Package Manager->Package Manager Console
  2. Once the terminal opens, type in "Get-Package"

PowerShell (outside of Visual Studio)

  1. dotnet list package YourSln.sln

Some answers referenced here:

Get a list of all NuGet packages used in a solution

How to list all installed NuGet Packages?

GLJ
  • 1,074
  • 1
  • 9
  • 17
-1
Get-Module -listavailable

Then find the version