CodeDomProvider.CompileAssemblyFromFile(CompilerParameters, String[]) 메서드

정의

지정된 컴파일러 설정을 사용하여 지정된 파일에 포함된 소스 코드에서 어셈블리를 컴파일합니다.

public:
 virtual System::CodeDom::Compiler::CompilerResults ^ CompileAssemblyFromFile(System::CodeDom::Compiler::CompilerParameters ^ options, ... cli::array <System::String ^> ^ fileNames);
public virtual System.CodeDom.Compiler.CompilerResults CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, params string[] fileNames);
abstract member CompileAssemblyFromFile : System.CodeDom.Compiler.CompilerParameters * string[] -> System.CodeDom.Compiler.CompilerResults
override this.CompileAssemblyFromFile : System.CodeDom.Compiler.CompilerParameters * string[] -> System.CodeDom.Compiler.CompilerResults
Public Overridable Function CompileAssemblyFromFile (options As CompilerParameters, ParamArray fileNames As String()) As CompilerResults

매개 변수

options
CompilerParameters

컴파일 설정을 나타내는 CompilerParameters 개체입니다.

fileNames
String[]

컴파일할 파일 이름의 배열입니다.

반환

컴파일 결과를 나타내는 CompilerResults 개체입니다.

예외

이 메서드와 CreateCompiler() 메서드가 파생 클래스에서 재정의되지 않은 경우

.NET Core 및 .NET 5+ 전용: 모든 경우

설명

참고

.NET Framework 버전 1.0 및 1.1에서 이 메서드는 공급자의 메서드에 의해 ICodeCompiler 반환되는 구현에서 CreateCompiler 제공됩니다. 버전 2.0에서는 코드 공급자가 이 메서드를 재정의하지 않더라도 코드 공급자에서 직접 호출할 수 있습니다. 코드 공급자가 이 메서드를 재정의 ICodeCompiler 하지 않으면 기본 클래스에서 구현을 호출합니다.

참고

.NET Core 및 .NET 5 이상에서 메서드에 대한 호출은 CodeDomProvider.CompileAssemblyFromFile 을 throw합니다 PlatformNotSupportedException. 파일에서 컴파일은 지원되지 않습니다.

상속자 참고

이 메서드를 재정의하는 경우 기본 클래스의 해당 메서드를 호출해서는 안 됩니다. 기본 클래스 메서드는 코드 컴파일러를 사용하는 기존 공급자와의 호환성을 위해 사용되지 않는 CreateCompiler() 메서드를 사용하여 파생 클래스에 생성기를 만듭니다. 그런 다음, 기본 클래스 메서드는 구현에서 동등한 메서드를 ICodeCompiler 호출하여 이 함수를 수행합니다. 코드 컴파일러를 NotImplementedException 사용하지 않는 코드 공급자에서 기본 클래스 메서드를 호출하는 경우 를 가져옵니다.

적용 대상

추가 정보