Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Get NuGet Dependencies

Inspects a .NET build project/packages.config to return the required versions of NuGet package dependencies.

Script usage:

DotNet::Get-Dependencies(
	[ProjectPath: <text>],
	[PackageId: <text>],
	[Dependencies: <RuntimeValue>]
);

Arguments:

NameFormatScript UsageUsage Notes
Project path
text
ProjectPath
Value note: "$WorkingDirectory".
Package ID
text
PackageId
Value note: "return all packages as a map".
Dependencies
RuntimeValue
Dependencies
If PackageId is specified, the name of a text variable to receive the package version. If PackageId is not specified, the name of a map variable to received all dependency information.

Example:

# Store project dependencies in %depends map
DotNet::Get-Dependencies
(
    ProjectPath: ~\Src\MyProject,
    Dependencies => %depends
);