< Back

Get-RuntimeDependencyPackage

Sat Jan 18, 2020 6:44 pm

NAME Get-RuntimeDependencyPackage



SYNOPSIS

Gets all NuGet package references from a well formed NuGet packages.config-file.





SYNTAX

Get-RuntimeDependencyPackage [-ConfigurationFilePath] <String> [<CommonParameters>]





DESCRIPTION

See https://docs.microsoft.com/en-us/nuget/ ... ges-config for the correct file format.

Only the "id" and "version" attributes are used.





PARAMETERS

-ConfigurationFilePath <String>

The path of the packages.config file.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Array





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-RuntimeDependencyPackage -ConfigurationFilePath my-solution\\runtime-dependencies.config



Contents of "runtime-dependencies.config":

<?xml version="1.0" encoding="utf-8"?>

<packages>

<package id="Sitecore.Full" version="8.2.170728" source="http://tund/nuget/NuGet" />

<package id="jQuery" version="3.1.1" />

<package id="NLog" version="4.3.10" />

</packages>



Returns an array of objects:

[

{id:"Sitecore.Full", version:"8.2.170728", source:"http://tund/nuget/NuGet"},

{id:"jQuery", version:"3.1.1"},

{id:"NLog", version:"4.3.10"}

]











RELATED LINKS