Share via


UpdateExtensions.CreateFile Method

Definition

Creates a new file inside projects.

public static Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> CreateFile (this Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> projects, string itemPath, string? content = default, string? itemType = default);
static member CreateFile : 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 CreateFile (projects As IAsyncUpdatable(Of IProjectSnapshot), itemPath As String, Optional content As String = Nothing, 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 new item (relative path to the project root folder).

content
String

The initial content of the file.

itemType
String

The item type of the new file.

Returns

A set of projects updated.

Applies to