Share via


ConnectedServiceHandlerHelper.AddFileAsync Method

Definition

Adds the specified file to the project after doing token replacement using any tokens found in TokenReplacementValues or the dictionary specified in addFileOptions.

public abstract System.Threading.Tasks.Task<string> AddFileAsync (string fileName, string targetPath, Microsoft.VisualStudio.ConnectedServices.AddFileOptions addFileOptions = default);
abstract member AddFileAsync : string * string * Microsoft.VisualStudio.ConnectedServices.AddFileOptions -> System.Threading.Tasks.Task<string>
Public MustOverride Function AddFileAsync (fileName As String, targetPath As String, Optional addFileOptions As AddFileOptions = Nothing) As Task(Of String)

Parameters

fileName
String

The file to copy and add to the project.

targetPath
String

The full or relative path where the file should be added. If specifying a full path, the path must be in a sub-directory of the project's directory.

addFileOptions
AddFileOptions

The options to use while adding the file.

Returns

Returns the path to the file that was added.

Applies to