UpdateExtensions.AddPackageReference Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a NuGet package reference to projects.
public static Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> AddPackageReference (this Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> projects, string packageIdentity, string version);
static member AddPackageReference : Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> * string * string -> Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot>
<Extension()>
Public Function AddPackageReference (projects As IAsyncUpdatable(Of IProjectSnapshot), packageIdentity As String, version As String) As IAsyncUpdatable(Of IProjectSnapshot)
Parameters
- projects
- IAsyncUpdatable<IProjectSnapshot>
A set of projects where this change should apply to.
- packageIdentity
- String
The identity of the package reference to be added.
- version
- String
The version of the package reference to be added.
Returns
A set of projects updated.