GenerateApplicationManifest.FileAssociations 属性

定义

获取或设置与 ClickOnce 部署清单关联的一个或多个文件类型的列表。Gets or sets a list of one or more file type that are associated with the ClickOnce deployment manifest. 文件关联只在面向 .NET Framework.NET Framework 3.5 或更高版本时才有效。File associations only valid only when .NET Framework.NET Framework 3.5 or later is targeted.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 property cli::array <Microsoft::Build::Framework::ITaskItem ^> ^ FileAssociations { cli::array <Microsoft::Build::Framework::ITaskItem ^> ^ get(); void set(cli::array <Microsoft::Build::Framework::ITaskItem ^> ^ value); };
public Microsoft.Build.Framework.ITaskItem[] FileAssociations { get; set; }
member this.FileAssociations : Microsoft.Build.Framework.ITaskItem[] with get, set
Public Property FileAssociations As ITaskItem()

属性值

ITaskItem[]

与所生成清单关联的文件类型的列表。A list of file types that are associated with the generated manifest.

注解

文件类型可以是自定义的。File types can be custom. 下面是 <fileAssociation> (ClickOnce 应用程序) 元素的一个示例:The following is an example of a <fileAssociation> Element (ClickOnce Application):

<FileAssociation Include=".nyt">
    <ProgId>NewYorkTimes.Document</ProgId>
    <DefaultIcon>nyt.ico</DefaultIcon>
    <Description>New York Times Reader document</Description>
</FileAssociation>

适用于