CompilerParameters.CoreAssemblyFileName 属性

定义

获取或设置包含基类类型(如 ObjectStringInt32)的核心或标准程序集的名称。Gets or sets the name of the core or standard assembly that contains basic types such as Object, String, or Int32.

public:
 property System::String ^ CoreAssemblyFileName { System::String ^ get(); void set(System::String ^ value); };
public string CoreAssemblyFileName { get; set; }
member this.CoreAssemblyFileName : string with get, set
Public Property CoreAssemblyFileName As String

属性值

String

包含基本类型的核心程序集的名称。The name of the core assembly that contains basic types.

注解

如果此属性的值是空字符串或 null,则编译器将使用默认核心程序集。If the value of this property is an empty string or null, the compiler uses the default core assembly. 根据编译器版本,默认核心程序集可能是位于 Framework 目录或引用程序集目录中的 mscorlib.dll 或 System.Runtime.dll。Depending on the compiler version, the default core assembly may be mscorlib.dll or System.Runtime.dll in a Framework directory or reference assembly directory. 如果此属性的值不为空,则代码文档对象模型 (CodeDOM) 将显式引用指定程序集并发出导致编译器在编译期间不隐式引用任何程序集的编译器选项。If the value of this property is not empty, the Code Document Object Model (CodeDOM) explicitly references the specified assembly and emits compiler options that cause the compiler to not reference any assemblies implicitly during compilation.. 对于默认情况下仅隐式引用核心或标准程序集的编译器,此属性可单独使用。For compilers that reference the core or standard assembly only implicitly by default, this property can be used on its own. 对于隐式引用核心或标准程序集之外的程序集的编译器,使用此选项可能需要在属性中指定其他条目 CompilerParameters.ReferencedAssembliesFor compilers that implicitly reference assemblies in addition to the core or standard assembly, using this option may require specifying additional entries in the CompilerParameters.ReferencedAssemblies property.

备注

ICodeCompilerCodeDomProvider 实现可以选择忽略此属性。An ICodeCompiler or CodeDomProvider implementation may choose to ignore this property.

适用于