ResolveAssemblyReference 类

定义

在给定 assemblyFiles 列表的情况下,确定是否关闭所有符合后述特征的 assemblyFiles:依赖于那些还包含第二阶和第 n 阶依赖项的 assemblyFiles。Given a list of assemblyFiles, determine the closure of all assemblyFiles that depend on those assemblyFiles including second and nth-order dependencies too.

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

public ref class ResolveAssemblyReference : Microsoft::Build::Tasks::TaskExtension
public class ResolveAssemblyReference : Microsoft.Build.Tasks.TaskExtension
type ResolveAssemblyReference = class
    inherit TaskExtension
Public Class ResolveAssemblyReference
Inherits TaskExtension
继承
ResolveAssemblyReference

构造函数

ResolveAssemblyReference()

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

构造Construct

属性

AllowedAssemblyExtensions

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

[default=.exe;.dll] 这些是引用解析期间将考虑的程序集扩展名。[default=.exe;.dll] These are the assembly extensions that will be considered during references resolution.

AllowedRelatedFileExtensions

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

[default=.pdb;.xml] 这些是查找相关文件时要考虑的扩展名。[default=.pdb;.xml] These are the extensions that will be considered when looking for related files.

AppConfigFile

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

如果传入此文件名,则将其解析为 app.config 文件并提取 bindingRedirect 映射。If this file name is passed in, then we parse it as an app.config file and extract bindingRedirect mappings. 这些映射在依赖项计算过程中用于重新映射程序集的版本。These mappings are used in the dependency calculation process to remap versions of assemblies.

如果传入此参数,则 AutoUnify 必须为 false;否则会出错。If this parameter is passed in, then AutoUnify must be false, otherwise error.

Assemblies

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

这些属性可以是简单的合成名称,如:These can either be simple fusion names like: SystemSystem 或强名称,如or strong names like System、Version=2.0.3500.0、Culture=neutral 和 PublicKeyToken=b77a5c561934e089System, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 这些名称将解析为完整路径,并且将找到所有依赖项。These names will be resolved into full paths and all dependencies will be found.

可选属性为:bool Private [default=true] -- 表示“CopyLocal”字符串 HintPath [default=''] -- 作为参考的文件名位置,当 {HintPathFromItem} 是 SearchPaths 中的路径之一时使用。Optional attributes are: bool Private [default=true] -- means 'CopyLocal' string HintPath [default=''] -- location of file name to consider as a reference, used when {HintPathFromItem} is one of the paths in SearchPaths. bool SpecificVersion [default=absent] -- 当为 true 时,必须精确匹配 Include 中的合成名称。bool SpecificVersion [default=absent] -- when true, the exact fusionname in the Include must be matched. 当为 false 时,任何具有相同简单名称的程序集都是匹配项。when false, any assembly with the same simple name will be a match. 当为 absent 时,查看 Include 中的值。when absent, then look at the value in Include. 如果是简单名称,其行为方式与 specific version=false 时一样。If its a simple name then behave as if specific version=false. 如果是强名称,其行为方式与 specific version=true 时一样。If its a strong name name then behave as if specific version=true. 字符串 ExecutableExtension [default=absent] -- 当存在时,解析的程序集必须具有此扩展名。string ExecutableExtension [default=absent] -- when present, the resolved assembly must have this extension. 当为 absent 时,考虑 .dll,然后为每个查看的目录考虑 .exe。when absent, .dll is considered and then .exe for each directory looked at. 字符串 SubType - 仅考虑具有空 SubType 的项。string SubType -- only items with empty SubTypes will be considered. 将忽略具有非空 SubType 的项。Items with non-empty subtypes will be ignored. 字符串 AssemblyFolderKey [default=absent] -- 支持旧的 AssemblyFolder 解析。string AssemblyFolderKey [default=absent] -- supported for legacy AssemblyFolder resolution. 此键的值可以为“hklm\vendor folder”。This key can have a value like 'hklm\vendor folder'. 设置后,将仅使用此特定的程序集文件夹键。When set, only this particular assembly folder key will be used. 这是为了支持 VSWhidey#357946 中的方案,其中安装了多个并行库,并且用户希望选择一个确切的版本。This is to support the scenario in VSWhidey#357946 in which there are multiple side-by-side libraries installed and the user wants to pick an exact version. bool EmbedInteropTyeps [default=absent] -- 当为 true 时,应将此程序集视为没有依赖项,并且应将其完全嵌入目标程序集中。bool EmbedInteropTyeps [default=absent] -- when true, we should treat this assembly as if it has no dependencies and should be completely embedded into the target assembly.

AssemblyFiles

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

指向要为其查找依赖项的 assemblyFiles 的完全限定的路径的列表。A list of fully qualified paths-to-assemblyFiles to find dependencies for.

可选属性为:bool Private [default=true] -- 表示“CopyLocal”字符串 FusionName -- 此项的简单或强合成名称。Optional attributes are: bool Private [default=true] -- means 'CopyLocal' string FusionName -- the simple or strong fusion name for this item. 如果该属性存在,可以节省时间,因为无需打开程序集文件即可获取合成名称。If this attribute is present it can save time since the assembly file won't need to be opened to get the fusion name. bool ExternallyResolved [default=false] -- 指示该引用及其依赖项由外部系统(通常来自 nuget 资产)解析,因此可以跳过几个步骤来进行优化:查找依赖项、附属程序集等。bool ExternallyResolved [default=false] -- indicates that the reference and its dependencies are resolved by an external system (commonly from nuget assets) and so several steps can be skipped as an optimization: finding dependencies, satellite assemblies, etc.

AutoUnify

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

[default=false] 此参数用于构建程序集(如 DLL),这些程序集不包含普通的 App.Config 文件。[default=false] This parameter is used for building assemblies, such as DLLs, which cannot have a normal App.Config file.

当为 true 时,将自动处理最后得到的依赖项关系图,如同向 AppConfigFile 参数传递了 App.Config 文件一样。When true, the resulting dependency graph is automatically treated as if there were an App.Config file passed in to the AppConfigFile parameter. 此虚拟 App.Config 文件对每组冲突程序集具有 bindingRedirect 条目,以便选择最高版本的程序集。This virtual App.Config file has a bindingRedirect entry for each conflicting set of assemblies such that the highest version assembly is chosen. 这样做的结果是避免有关冲突程序集的警告,因为每个冲突都将得到解决。A consequence of this is that there will never be a warning about conflicting assemblies because every conflict will have been resolved.

当为 true 时,每个不同的重映射将导致高优先级注释,指示新旧版本以及该过程是自动完成的这一事实(因为 AutoUnify 为 true)。When true, each distinct remapping will result in a high priority comment indicating the old and new versions and the fact that this was done automatically because AutoUnify was true.

当为 true 时,AppConfigFile 参数应为空。When true, the AppConfigFile parameter should be empty. 否则会报错。Otherwise, it's an error.

当为 false 时,不会自动重新映射程序集版本。When false, no assembly version remapping will occur automatically. 当存在两个版本的程序集时,将发出警告。When two versions of an assembly are present, there will be a warning.

当为 false 时,同一程序集不同版本间每个不同的冲突将导致高优先级注释。When false, each distinct conflict between different versions of the same assembly will result in a high priority comment. 所有这些注释显示后,将显示含唯一错误代码的一条警告,其文本写有“发现不同引用版本和依赖程序集之间的冲突”。After all of these comments are displayed, there will be a single warning with a unique error code and text that reads "Found conflicts between different versions of reference and dependent assemblies".

BuildEngine

生成引擎自动设置此属性,以允许任务回调到其中。The build engine automatically sets this property to allow tasks to call back into it.

(继承自 Task)
BuildEngine2

生成引擎自动设置此属性,以允许任务回调到其中。The build engine automatically sets this property to allow tasks to call back into it. 这是一个便捷属性,因此从此类继承的任务作者不必将值从 IBuildEngine 强制转换为 IBuildEngine2。This is a convenience property so that task authors inheriting from this class do not have to cast the value from IBuildEngine to IBuildEngine2.

(继承自 Task)
BuildEngine3

检索主机提供的生成引擎接口的 IBuildEngine3 版本。Retrieves the IBuildEngine3 version of the build engine interface provided by the host.

(继承自 Task)
BuildEngine4

检索主机提供的生成引擎接口的 IBuildEngine4 版本。Retrieves the IBuildEngine4 version of the build engine interface provided by the host.

(继承自 Task)
BuildEngine5

检索主机提供的生成引擎接口的 IBuildEngine5 版本。Retrieves the IBuildEngine5 version of the build engine interface provided by the host.

(继承自 Task)
BuildEngine6

检索主机提供的生成引擎接口的 IBuildEngine6 版本。Retrieves the IBuildEngine6 version of the build engine interface provided by the host.

(继承自 Task)
BuildEngine7

获取主机提供的生成引擎接口的版本。Gets the version of the build engine interface provided by the host.

(继承自 Task)
CandidateAssemblyFiles

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

程序集文件的列表,这些文件可用于搜索和解析过程。A list of assembly files that can be part of the search and resolution process. 这些必须是绝对文件名或项目相关文件名。These must be absolute filenames, or project-relative filenames.

当 SearchPaths 包含 {CandidateAssemblyFiles} 作为要考虑的路径之一时,将会考虑此列表中的程序集文件。Assembly files in this list will be considered when SearchPaths contains {CandidateAssemblyFiles} as one of the paths to consider.

CopyLocalDependenciesWhenParentReferenceInGac

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

在确定是否应在本地复制依赖项时,要进行的一项检查是查看项目文件中的父引用是否设置了 Private 元数据。When determining if a dependency should be copied locally one of the checks done is to see if the parent reference in the project file has the Private metadata set or not. 如果设置了该元数据,则我们也会将其用于依赖项。If that metadata is set then We will use that for the dependency as well.

但是,如果未设置该元数据,则依赖项将进行与父引用相同的检查。However, if the metadata is not set then the dependency will go through the same checks as the parent reference. 其中一项检查是查看该引用是否位于 GAC 中。One of these checks is to see if the reference is in the GAC. 如果某个引用位于 GAC 中,则不会对该引用进行本地复制,因为它假定该引用也位于目标计算机上的 gac 中。If a reference is in the GAC then we will not copy it locally as it is assumed it will be in the gac on the target machine as well. 但是,这只适用于具体引用,而不适用于其依赖项。However this only applies to that specific reference and not its dependencies.

这意味着项目文件中的某个引用可能是复制本地 false,原因是该引用位于 GAC 中,但由于依赖项不在 GAC 中,因此可能仍然会对依赖项进行本地复制。This means a reference in the project file may be copy local false due to it being in the GAC but the dependencies may still be copied locally because they are not in the GAC. 这是 RAR 的默认行为,该行为会导致此属性的默认值为 true。This is the default behavior for RAR and causes the default value for this property to be true.

当此属性为 false 时,我们仍将检查项目文件引用,以查看它们是否位于 GAC 中,并根据情况设置其复制本地状态。When this property is false we will still check project file references to see if they are in the GAC and set their copy local state as appropriate. 但是,对于依赖项,我们不仅要检查它们是否位于 GAC 中,还要检查项目文件中的父引用是否位于 GAC 中。However for dependencies we will not only check to see if they are in the GAC but we will also check to see if the parent reference from the project file is in the GAC. 如果项目文件中的父引用位于 GAC 中,则不会对依赖项进行本地复制。If the parent reference from the project file is in the GAC then we will not copy the dependency locally.

注意:如果存在多个父引用并且任何一个父引用都不来自 GAC,则会将复制本地设置为 true。NOTE: If there are multiple parent reference and ANY of them does not come from the GAC then we will set copy local to true.

CopyLocalFiles

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

返回 ResolvedFiles+ResolvedDependencyFiles+RelatedFiles+SatelliteFiles+ScatterFiles+SatelliteAssemblyFiles 中将 CopyLocal 标志设置为“true”的每个文件。Returns every file in ResolvedFiles+ResolvedDependencyFiles+RelatedFiles+SatelliteFiles+ScatterFiles+SatelliteAssemblyFiles that have CopyLocal flags set to 'true'.

DependsOnNETStandard

程序集或其任何主引用是否取决于 netstandardWhether the assembly or any of its primary references depends on netstandard

DependsOnSystemRuntime

程序集或其任何主引用是否取决于 system.runtime。Whether the assembly or any of its primary references depends on system.runtime. (Aka 需要 Facade 引用来解析重复的类型)(Aka needs Facade references to resolve duplicate types)

DoNotCopyLocalIfInGac

[default=false] 为 CopyLocal 的确定启用旧模式。[default=false] Enables legacy mode for CopyLocal determination. 如果为 true,则在 GAC 中找到引用的程序集时,不会将其复制到本地。If true, referenced assemblies will not be copied locally if they are found in the GAC. 如果为 false,则在本地复制这些程序集,除非只在 GAC 中找到了程序集。If false, assemblies will be copied locally unless they were found only in the GAC.

FilesWritten

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

写入磁盘的所有文件的名称。The names of all files written to disk.

FindDependencies

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

如果设置了,则会发现依赖项。If set, then dependencies will be found. 否则,将只解析主引用。Otherwise, only Primary references will be resolved.

默认为 true。Default is true.

FindDependenciesOfExternallyResolvedReferences

即使引用被标记为 ExternallyResolved=true 元数据,仍会强制遍历依赖项。Force dependencies to be walked even when a reference is marked with ExternallyResolved=true metadata.

FindRelatedFiles

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

如果设置了,会找到相关文件(.pdbs 和 .xmls)。If set, then related files (.pdbs and .xmls) will be found.

默认为 true。Default is true.

FindSatellites

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

如果设置了,会找到附属项。If set, then satellites will be found.

默认为 true。Default is true.

FindSerializationAssemblies

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

如果设置了,会找到序列化程序集。If set, then serialization assemblies will be found.

默认为 true。Default is true.

FullFrameworkAssemblyTables

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

包含配置文件的完整框架的 XML 文件的列表。A list of XML files that contain the full framework for the profile.

通常不会在此处传递任何内容,这适用于完整框架的 xml 文件的位置不在 RedistList 文件夹下的情况。Normally nothing is passed in here, this is for the cases where the location of the xml file for the full framework is not under a RedistList folder.

文件的格式如下所示:Format of the file is like: 等。 etc.

此列表中的项必须指定“FrameworkDirectory”元数据,以将可再发行程序包列表与特定的框架目录关联。Items in this list must specify the "FrameworkDirectory" metadata to associate an redist list with a particular framework directory. 如不进行关联,会记录错误。If the association is not made an error will be logged. 原因是,rar 中的逻辑假定如果未设置 FrameworkDirectory,它将使用目标框架目录。The reason is, The logic in rar assumes if a FrameworkDirectory is not set it will use the target framework directory.

FullFrameworkFolders

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

文件夹集,其中包含 RedistList 目录,该目录表示给定客户端配置文件的完整框架。Set of folders which containd a RedistList directory which represent the full framework for a given client profile. 例如 %programfiles%\reference assemblies\microsoft\framework\v4.0An example would be %programfiles%\reference assemblies\microsoft\framework\v4.0

FullTargetFrameworkSubsetNames

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

提供一组名称,如果在 TargetFrameworkSubset 列表中看到这些名称,会导致忽略 TargetFrameworkSubsets。Provide a set of names which if seen in the TargetFrameworkSubset list will cause the ignoring of TargetFrameworkSubsets.

完全、完整Full, Complete

HelpKeywordPrefix

获取或设置前缀,该前缀用于通过字符串资源名称组成 help 关键字。Gets or sets the prefix used to compose help keywords from string resource names. 如果任务没有与消息关联的 help 关键字,则可以忽略此属性或将其设置为 null。If a task does not have help keywords associated with its messages, it can ignore this property or set it to null. 如果前缀设置为空字符串,则字符串资源名称将逐字用作 help 关键字。If the prefix is set to an empty string, then string resource names will be used verbatim as help keywords. 有关如何使用此前缀的示例,请参阅 TaskLoggingHelper.LogErrorWithCodeFromResources(string, object[]) 方法。For an example of how this prefix is used, see the TaskLoggingHelper.LogErrorWithCodeFromResources(string, object[]) method.

(继承自 Task)
HostObject

如果主机 IDE 具有与此特定任务关联的主机对象,则生成引擎会设置此属性。The build engine sets this property if the host IDE has associated a host object with this particular task.

(继承自 Task)
IgnoreDefaultInstalledAssemblySubsetTables

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

[default=false] 布尔属性,用于控制任务是否应查找并使用在提供的 TargetFrameworkDirectories 下的 SubsetList 目录中找到的其他已安装的程序集子集表(也称为子集列表)。[default=false] Boolean property to control whether or not the task should look for and use additional installed assembly subset tables (a.k.a Subset Lists) found in the SubsetList directory underneath the provided TargetFrameworkDirectories.

IgnoreDefaultInstalledAssemblyTables

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

[default=false] 布尔属性,用于控制任务是否应查找并使用在提供的 TargetFrameworkDirectories 下的 RedistList 目录中找到的其他已安装的程序集表(也称为可再发行程序包列表)。[default=false] Boolean property to control whether or not the task should look for and use additional installed assembly tables (a.k.a Redist Lists) found in the RedistList directory underneath the provided TargetFrameworkDirectories.

IgnoreTargetFrameworkAttributeVersionMismatch

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

在检查程序集是否与目标框架兼容时,是否应忽略 framework 属性。Should the framework attribute be ignored when checking to see if an assembly is compatible with the targeted framework.

IgnoreVersionForFrameworkReferences

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

如果主引用是框架程序集,则忽略其版本信息,并实际通过当前目标框架来解析框架程序集。If the primary reference is a framework assembly ignore its version information and actually resolve the framework assembly from the currently targeted framework.

InstalledAssemblySubsetTables

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

XML 文件列表,其中包含应位于目标子集中的程序集A list of XML files that contain assemblies that are expected to be in the target subset 文件的格式如下所示:Format of the file is like: 等。 etc.

此列表中的项可以选择指定“FrameworkDirectory”元数据,以将 InstalledAssemblySubsetTable 与特定的框架目录关联。Items in this list may optionally specify the "FrameworkDirectory" metadata to associate an InstalledAssemblySubsetTable with a particular framework directory. 如果只有一个 TargetFrameworkDirectories 元素,则该列表中任何缺少“FrameworkDirectory”元数据的项都将被视为已将该元数据设置为传递给 TargetFrameworkDirectories 的孤(唯一)值。If there is only a single TargetFrameworkDirectories element, then any items in this list missing the "FrameworkDirectory" metadata will be treated as though this metadata is set to the lone (unique) value passed to TargetFrameworkDirectories.

InstalledAssemblyTables

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

包含将在目标计算机上安装的程序集的 XML 文件的列表。A list of XML files that contain assemblies that are expected to be installed on the target machine.

文件的格式如下所示:Format of the file is like: 等。 etc.

当存在时,此列表中的程序集将成为在 XML 中列出的版本及以前所有版本中自动“统一”的内容的候选项。When present, assemblies from this list will be candidates to automatically "unify" from prior versions up to the version listed in the XML. 此外,除非显示重写,否则 InGAC =“true”的程序集将视为先决条件,且 CopyLocal =“false”。Also, assemblies with InGAC='true' will be considered prerequisites and will be CopyLocal='false' unless explicitly overridden. 此列表中的项可以选择指定“FrameworkDirectory”元数据,以将 InstalledAssemblyTable 与特定的框架目录关联。Items in this list may optionally specify the "FrameworkDirectory" metadata to associate an InstalledAssemblyTable with a particular framework directory. 但是,除非可再发行程序包名称以“Microsoft-Windows-CLRCoreComp”开头,否则将忽略此设置。However, this setting will be ignored unless the Redist name begins with "Microsoft-Windows-CLRCoreComp". 如果只有一个 TargetFrameworkDirectories 元素,则该列表中任何缺少“FrameworkDirectory”元数据的项都将被视为已将该元数据设置为传递给 TargetFrameworkDirectories 的孤(唯一)值。If there is only a single TargetFrameworkDirectories element, then any items in this list missing the "FrameworkDirectory" metadata will be treated as though this metadata is set to the lone (unique) value passed to TargetFrameworkDirectories.

LatestTargetFrameworkDirectories

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

目录列表,这些目录包含面向计算机的最新框架的可再发行程序包列表。The list of directories which contain the redist lists for the most current framework which can be targeted on the machine. 如果未设置此项,则将针对给定的目标框架标识符查找计算机上安装的最高框架,并使用该框架。If this is not set Then we will looks for the highest framework installed on the machine for a given target framework identifier and use that.

Log

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

获取包含任务日志记录方法的 TaskLoggingHelperExtension 类的实例。Gets an instance of a TaskLoggingHelperExtension class containing task logging methods.

(继承自 TaskExtension)
ProfileName

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

面向的目标框架配置文件的名称。Name of the target framework profile we are targeting. 例如,Eg. 客户端、Web 或网络Client, Web, or Network

RelatedFiles

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

相关文件包括 intellidoc (.XML) 等文件和基本名称与引用相同的符号 (.PDB)。Related files are files like intellidoc (.XML) and symbols (.PDB) that have the same base name as a reference. bool Primary [始终为 false] - 如果此程序集与 Assemblies 一起传入,则为 true。bool Primary [always false] - true if this assembly was passed in with Assemblies. bool CopyLocal - 给定的引用是否应复制到输出目录。bool CopyLocal - whether the given reference should be copied to the output directory.

ResolvedDependencyFiles

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

具有以下属性的所有第 n 阶依赖项路径的列表:bool CopyLocal - 是否应将给定的引用复制到输出目录。A list of all n-th order paths-to-dependencies with the following attributes: bool CopyLocal - whether the given reference should be copied to the output directory. 字符串 FusionName - 此依赖项的合成名称。string FusionName - the fusion name for this dependency. string ResolvedFrom - 此文件解析自的文字搜索路径。string ResolvedFrom - the literal search path that this file was resolved from. bool IsRedistRoot - 此程序集是否是整个可再发行程序包的代表。bool IsRedistRoot - Whether or not this assembly is the representative for an entire redist. 如果为“true”,则表示程序集代表整个可再发行程序包,并应在应用程序清单中指示为应用程序依赖项。'true' means the assembly is representative of an entire redist and should be indicated as an application dependency in an application manifest. 如果为“false”,则表示程序集是可再发行程序包的内部程序集,不应成为应用程序清单的一部分。'false' means the assembly is internal to a redist and should not be part of the application manifest. 字符串可再发行程序包 - 包含此程序集的可再发行程序包的名称(如果有)。string Redist - The name (if any) of the redist that contains this assembly. 不包括第一个排序主引用 - 此列表位于 ResolvedFiles 中。Does not include first order primary references--this list is in ResolvedFiles.

ResolvedFiles

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

这是已解析为完整路径的所有主引用的列表。This is a list of all primary references resolved to full paths. bool CopyLocal - 给定的引用是否应复制到输出目录。bool CopyLocal - whether the given reference should be copied to the output directory. 字符串 FusionName - 此依赖项的合成名称。string FusionName - the fusion name for this dependency. string ResolvedFrom - 此文件解析自的文字搜索路径。string ResolvedFrom - the literal search path that this file was resolved from. bool IsRedistRoot - 此程序集是否是整个可再发行程序包的代表。bool IsRedistRoot - Whether or not this assembly is the representative for an entire redist. 如果为“true”,则表示程序集代表整个可再发行程序包,并应在应用程序清单中指示为应用程序依赖项。'true' means the assembly is representative of an entire redist and should be indicated as an application dependency in an application manifest. 如果为“false”,则表示程序集是可再发行程序包的内部程序集,不应成为应用程序清单的一部分。'false' means the assembly is internal to a redist and should not be part of the application manifest. 字符串可再发行程序包 - 包含此程序集的可再发行程序包的名称(如果有)。string Redist - The name (if any) of the redist that contains this assembly.

ResolvedSDKReferences

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

已解析的 SDK 引用的列表,其中包含 SDK 名称、SDK 位置和目标配置。A list of resolved SDK references which contain the sdk name, sdk location and the targeted configuration. 如果引用具有 SDKName 元数据附加到,这些位置仅被搜索。These locations will only be searched if the reference has the SDKName metadata attached to it.

SatelliteFiles

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

找到的任意附属文件。Any satellite files found. 当且仅当导致此项存在的引用或依赖项是 CopyLocal = true 时,这些将为 CopyLocal = true。These will be CopyLocal=true iff the reference or dependency that caused this item to exist is CopyLocal=true. bool CopyLocal - 给定的引用是否应复制到输出目录。bool CopyLocal - whether the given reference should be copied to the output directory. 字符串 DestinationSubDirectory - 应将此文件复制到其中的相对目标目录。string DestinationSubDirectory - the relative destination directory that this file should be copied to. 这主要用于附属项。This is mainly for satellites.

ScatterFiles

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

与某个给定的程序集关联的散点文件。Scatter files associated with one of the given assemblies. bool CopyLocal - 给定的引用是否应复制到输出目录。bool CopyLocal - whether the given reference should be copied to the output directory.

SearchPaths

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

解析依赖项时要用于搜索 assemblyFiles 的位置的列表。List of locations to search for assemblyFiles when resolving dependencies. 可在此处传递以下类型的内容:(1) 普通的旧目录路径。The following types of things can be passed in here: (1) A plain old directory path. (2) {HintPathFromItem} -- 查看基本项中的 HintPath 属性。(2) {HintPathFromItem} -- Look at the HintPath attribute from the base item. 此属性必须是文件名,而不是目录名称。This attribute must be a file name not a directory name. (3) {CandidateAssemblyFiles} -- 查看通过 CandidateAssemblyFiles 参数传入的文件。(3) {CandidateAssemblyFiles} -- Look at the files passed in through the CandidateAssemblyFiles parameter. (4) {Registry:AssemblyFoldersBase,RuntimeVersion,AssemblyFoldersSuffix},其中:(4) {Registry:AssemblyFoldersBase,RuntimeVersion,AssemblyFoldersSuffix} Where: AssemblyFoldersBase = Software\Microsoft[.NetFramework | .NetCompactFramework] RuntimeVersion = 项目文件中的运行时版本属性 AssemblyFoldersSuffix = [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersExAssemblyFoldersBase = Software\Microsoft[.NetFramework | .NetCompactFramework] RuntimeVersion = the runtime version property from the project file AssemblyFoldersSuffix = [ PocketPC | SmartPhone | WindowsCE]\AssemblyFoldersEx 然后在注册表中查找具有以下架构的项:Then look in the registry for keys with the following schema: [HKLM | HKCU]\SOFTWARE\MICROSOFT.NetFramework[HKLM | HKCU]\SOFTWARE\MICROSOFT.NetFramework
v1.0.3705 AssemblyFoldersEx ControlVendor.GridControl.1.0: @Default = c:\program files\ControlVendor\grid control\1.0\bin @Description = 用于 .NET 1.0 9466 版的网格控件 @Default = c:\program files\ControlVendor\grid control\1.0sp1\bin @Description = 用于 .NET 1.0 版的网格控件 SP1v1.0.3705 AssemblyFoldersEx ControlVendor.GridControl.1.0: @Default = c:\program files\ControlVendor\grid control\1.0\bin @Description = Grid Control for .NET version 1.0 9466 @Default = c:\program files\ControlVendor\grid control\1.0sp1\bin @Description = SP1 for Grid Control for .NET version 1.0 基本注册表项包括:The based registry key is composed as: [HKLM | HKCU]_AssemblyFoldersBase__RuntimeVersion__AssemblyFoldersSuffix_[HKLM | HKCU]_AssemblyFoldersBase__RuntimeVersion__AssemblyFoldersSuffix_ (5) {AssemblyFolders} -- 使用 Visual Studio 2003 .NET 的 finding-assemblies-from-registry(从注册表查找程序集)架构。(5) {AssemblyFolders} -- Use the VisualStudion 2003 .NET finding-assemblies-from-registry scheme. (6) {GAC} -- 在 GAC 中查找。(6) {GAC} -- Look in the GAC. (7) {RawFileName} -- 将 Include 值视为确切的路径和文件名。(7) {RawFileName} -- Consider the Include value to be an exact path and file name.

SerializationAssemblyFiles

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

找到的任何 XML 序列化程序集。Any XML serialization assemblies found. 当且仅当导致此项存在的引用或依赖项是 CopyLocal = true 时,这些将为 CopyLocal = true。These will be CopyLocal=true iff the reference or dependency that caused this item to exist is CopyLocal=true. bool CopyLocal - 给定的引用是否应复制到输出目录。bool CopyLocal - whether the given reference should be copied to the output directory.

Silent

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

如果设置了该项,则不会将任何消息记录到屏幕上。If set, then don't log any messages to the screen.

默认值为 false。Default is false.

StateFile

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

可选文件名,该文件名指示用于保存此任务的中间生成状态的位置。An optional file name that indicates where to save intermediate build state for this task. 如果未指定,则不会发生内部生成缓存。If not specified, then no inter-build caching will occur.

SuggestedRedirects

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

无论 AutoUnify 的值如何,都将为发现的每个不同的冲突程序集标识(包括区域性和 PKT)返回一个项目,这些标识在 ApplicationConfigurationFile 中没有合适的 bindingRedirect 条目。Regardless of the value of AutoUnify, returns one item for every distinct conflicting assembly identity--including culture and PKT--that was found that did not have a suitable bindingRedirect entry in the ApplicationConfigurationFile.

每个返回的 ITaskItem 都将具有以下值:ItemSpec - 空版本为 0.0.0.0 的程序集系列的完整合成名称;MaxVersion - 最大版本号。Each returned ITaskItem will have the following values: ItemSpec - the full fusion name of the assembly family with empty version=0.0.0.0 MaxVersion - the maximum version number.

SupportsBindingRedirectGeneration

如果项目类型支持“AutoGenerateBindingRedirects”(当前仅适用于 EXE 项目),则为 true。This is true if the project type supports "AutoGenerateBindingRedirects" (currently only for EXE projects).

TargetedRuntimeVersion

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

当前面向的运行时是 2.0.57027 还是其他,运行时是可以带 v 还是不带前缀。What is the runtime we are targeting, is it 2.0.57027 or anotherone, It can have a v or not prefixed onto it.

TargetFrameworkDirectories

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

目标框架目录的路径。Path to the target frameworks directory. 需要弄清楚结果项的 CopyLocal 状态。Required to figure out CopyLocal status for resulting items. 如果不存在,那么除非结果项在其源项上显式具有 Private='true' 属性,否则不会将其视为 CopyLocal='true'。If not present, then no resulting items will be deemed CopyLocal='true' unless they explicity have a Private='true' attribute on their source item.

TargetFrameworkMoniker

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

面向的目标框架名字对象(如果有)。The target framework moniker we are targeting if any. 这用于日志记录目的。This is used for logging purposes.

默认为空,Default is empty.

TargetFrameworkMonikerDisplayName

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

目标框架名字对象的显示名称(如果有)。The display name of the target framework moniker, if any. 这仅适用于日志记录。This is only for logging.

TargetFrameworkSubsets

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

将在目标框架目录中搜索的目标框架子集名称的列表List of target framework subset names which will be searched for in the target framework directories

TargetFrameworkVersion

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

项目目标框架版本。The project target framework version.

默认为空,Default is empty. 这意味着不会基于引用的目标框架来对其进行筛选。which means there will be no filtering for the reference based on their target framework.

TargetProcessorArchitecture

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

首选的目标处理器架构。The preferred target processor architecture. 用于解析 {GAC} 引用。Used for resolving {GAC} references. 应类似于 x86、IA64 或 AMD64。Should be like x86, IA64 or AMD64.

这是优先顺序:(1) GAC 中与提供的 ProcessorArchitecture 匹配的程序集。This is the order of preference: (1) Assemblies in the GAC that match the supplied ProcessorArchitecture. (2) GAC 中具有 ProcessorArchitecture=MSIL 的程序集 (3) GAC 中不具有 ProcessorArchitecture 的程序集。(2) Assemblies in the GAC that have ProcessorArchitecture=MSIL (3) Assemblies in the GAC that have no ProcessorArchitecture.

如果不存在,则仅考虑 GAC 中具有 ProcessorArchitecture==MSIL 或不具有 ProcessorArchitecture 的程序集(这些程序集是 Whidbey 之前的程序集)。If absent, then only consider assemblies in the GAC that have ProcessorArchitecture==MSIL or no ProcessorArchitecture (these are pre-Whidbey assemblies).

TaskResources

获取或设置任务的区域性特定资源。Gets or sets the task's culture-specific resources. 派生类应在构造期间注册资源,如果它们有本地化字符串,则可以通过此属性注册。Derived classes should register their resources either during construction, or via this property, if they have localized strings.

(继承自 Task)
UnresolveFrameworkAssembliesFromHigherFrameworks

如果设置为 true,不论目标框架如何,会强制取消解析版本高于或等于目标框架版本的框架程序集If set to true, it forces to unresolve framework assemblies with versions higher or equal the version of the target framework, regardless of the target framework

WarnOrErrorOnTargetArchitectureMismatch

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

目标处理器体系结构和主引用的体系结构之间是否存在不匹配。If there is a mismatch between the targetprocessor architecture and the architecture of a primary reference.

当它为错误时,将记录错误。When this is error, an error will be logged.

当设置此警告时,如果目标处理器体系结构与主引用的体系结构之间不匹配,则会记录警告。When this is warn, if there is a mismatch between the targetprocessor architecture and the architecture of a primary reference a warning will be logged.

如果它为“无”,不会记录任何错误或警告。When this is none, no error or warning will be logged.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Execute()

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

执行此任务。Execute the task.

GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于