UpdateExtensions.AddFile 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.
Overloads
AddFile(IAsyncUpdatable<ISolutionFolderSnapshot>, String) |
Add an existing file to a solution folder. |
AddFile(IAsyncUpdatable<ISolutionSnapshot>, String) |
Add an existing file to the solution. |
AddFile(IAsyncUpdatable<IProjectSnapshot>, String, String) |
Add an existing file to the project. |
AddFile(IAsyncUpdatable<ISolutionFolderSnapshot>, String)
Add an existing file to a solution folder.
public static Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.ISolutionFolderSnapshot> AddFile (this Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.ISolutionFolderSnapshot> solutionFolders, string itemPath);
static member AddFile : Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.ISolutionFolderSnapshot> * string -> Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.ISolutionFolderSnapshot>
<Extension()>
Public Function AddFile (solutionFolders As IAsyncUpdatable(Of ISolutionFolderSnapshot), itemPath As String) As IAsyncUpdatable(Of ISolutionFolderSnapshot)
Parameters
- solutionFolders
- IAsyncUpdatable<ISolutionFolderSnapshot>
A set of solution folders where this change should apply to.
- itemPath
- String
The path of the file item
Returns
A set of solution folders updated.
Applies to
AddFile(IAsyncUpdatable<ISolutionSnapshot>, String)
Add an existing file to the solution.
public static Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.ISolutionSnapshot> AddFile (this Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.ISolutionSnapshot> solutions, string itemPath);
static member AddFile : Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.ISolutionSnapshot> * string -> Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.ISolutionSnapshot>
<Extension()>
Public Function AddFile (solutions As IAsyncUpdatable(Of ISolutionSnapshot), itemPath As String) As IAsyncUpdatable(Of ISolutionSnapshot)
Parameters
- solutions
- IAsyncUpdatable<ISolutionSnapshot>
A set of solutions where this change should apply to.
- itemPath
- String
The path of the file item
Returns
A set of solutions updated.
Applies to
AddFile(IAsyncUpdatable<IProjectSnapshot>, String, String)
Add an existing file to the project.
public static Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> AddFile (this Microsoft.VisualStudio.ProjectSystem.Query.IAsyncUpdatable<Microsoft.VisualStudio.ProjectSystem.Query.IProjectSnapshot> projects, string itemPath, string? itemType = default);
static member AddFile : 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 AddFile (projects As IAsyncUpdatable(Of IProjectSnapshot), itemPath 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
- itemType
- String
The optional item type of the new file.
Returns
A set of projects updated.