Compartir a través de


UpdateExtensions.AddFileFromCopy Method

Definition

Adds a file as a new copy into the project.

public static Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> AddFileFromCopy (this Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> projects, string originalFilePath, string targetFolderPath, string? itemType = default);
static member AddFileFromCopy : 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 AddFileFromCopy (projects As IAsyncUpdatable(Of IProjectSnapshot), originalFilePath As String, targetFolderPath 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.

originalFilePath
String

The path of the file item on the file system of the project system.

targetFolderPath
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