ICodeCompiler.CompileAssemblyFromFile(CompilerParameters, String) 方法

定义

从包含在指定文件中的源代码,使用指定的编译器设置编译程序集。Compiles an assembly from the source code contained within the specified file, using the specified compiler settings.

public:
 System::CodeDom::Compiler::CompilerResults ^ CompileAssemblyFromFile(System::CodeDom::Compiler::CompilerParameters ^ options, System::String ^ fileName);
public System.CodeDom.Compiler.CompilerResults CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, string fileName);
abstract member CompileAssemblyFromFile : System.CodeDom.Compiler.CompilerParameters * string -> System.CodeDom.Compiler.CompilerResults
Public Function CompileAssemblyFromFile (options As CompilerParameters, fileName As String) As CompilerResults

参数

options
CompilerParameters

一个 CompilerParameters 对象,它指示编译设置。A CompilerParameters object that indicates the settings for compilation.

fileName
String

包含要编译的源代码的文件的文件名。The file name of the file that contains the source code to compile.

返回

CompilerResults

指示编译结果的 CompilerResults 对象。A CompilerResults object that indicates the results of compilation.

适用于

另请参阅