ClientBuildManagerParameter.PrecompilationFlags 属性

定义

获取或设置确定预编译行为的标志。Gets or sets the flags that determine precompilation behavior.

public:
 property System::Web::Compilation::PrecompilationFlags PrecompilationFlags { System::Web::Compilation::PrecompilationFlags get(); void set(System::Web::Compilation::PrecompilationFlags value); };
public System.Web.Compilation.PrecompilationFlags PrecompilationFlags { get; set; }
member this.PrecompilationFlags : System.Web.Compilation.PrecompilationFlags with get, set
Public Property PrecompilationFlags As PrecompilationFlags

属性值

PrecompilationFlags

用于客户端生成的 PrecompilationFlagsThe PrecompilationFlags for a client build.

示例

下面的代码示例是类概述中的代码示例的一部分 ClientBuildManagerThe following code example is part of a code example found in the ClientBuildManager class overview. 在此示例中,将 ClientBuildManagerParameter 创建一个对象并设置其值。In the example, a ClientBuildManagerParameter object is created and its values set. 生成的程序集将具有基于所提供的密钥文件的强名称,并将根据提供的值进行预编译 PrecompilationFlagsThe resulting assembly will have a strong name based on the provided key file and will precompile according to the provided PrecompilationFlags values.

_cbmParameter = new ClientBuildManagerParameter();
_cbmParameter.PrecompilationFlags = _flags;
_cbmParameter.StrongNameKeyFile = _keyFile;

builder = new
        ClientBuildManager(_vPath, _pPath, _tPath, _cbmParameter);
_cbmParameter = New ClientBuildManagerParameter()
_cbmParameter.PrecompilationFlags = _flags
_cbmParameter.StrongNameKeyFile = _keyFile

builder = New ClientBuildManager(_vPath, _pPath, _tPath, _cbmParameter)

注解

PrecompilationFlags属性确定如何生成程序集。The PrecompilationFlags property determines how the assembly will be built. 例如,可以将设置 PrecompilationFlags 为以 Clean 重新编译任何以前编译过的组件,或将其设置为,以 OverwriteTarget 允许生成的程序集覆盖目标目录中的任何组件。For example, you can set PrecompilationFlags to Clean to recompile any previously compiled components, or set it to OverwriteTarget to permit the resulting assembly to overwrite any components in the target directory. PrecompilationFlags枚举器有一个 FlagsAttribute 允许其成员值的按位组合的属性。The PrecompilationFlags enumerator has a FlagsAttribute attribute that allows a bitwise combination of its member values. PrecompilationFlags属性可以包含来自枚举的多个值 PrecompilationFlags ,以指定预编译行为的组合。The PrecompilationFlags property can contain more than one value from the PrecompilationFlags enumeration to specify a combination of precompilation behaviors.

适用于

另请参阅