Share via


UpdateExtensions.AddLinkFile Method

Definition

Adds a file as a link into the project.

public static Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> AddLinkFile (this Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> projects, string itemPath, string targetFolder, string? itemType = default);
static member AddLinkFile : Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> * string * string * string -> Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot>
<Extension()>
Public Function AddLinkFile (projects As IAsyncUpdatable(Of IProjectSnapshot), itemPath As String, targetFolder As String, Optional itemType As String = Nothing) As IAsyncUpdatable(Of IProjectSnapshot)

Parameters

projects
IAsyncUpdatable<IProjectSnapshot>

A set of projects where this change should apply to.

itemPath
String

The path of the file item. It must be outside of the project cone.

targetFolder
String

A relative path of a folder inside the project.

itemType
String

The optional item type of the new file. (This might not be supported by all project systems.)

Returns

A set of projects updated.

Applies to