Share via


BuildProvider.GetDefaultCompilerType 方法

定義

傳回應用程式中預設語言的編譯器設定。

protected:
 System::Web::Compilation::CompilerType ^ GetDefaultCompilerType();
protected System.Web.Compilation.CompilerType GetDefaultCompilerType ();
member this.GetDefaultCompilerType : unit -> System.Web.Compilation.CompilerType
Protected Function GetDefaultCompilerType () As CompilerType

傳回

表示應用程式中預設語言之編譯器設定的 CompilerType。 基底類別會根據應用程式組態檔傳回預設的編譯器。

備註

GetDefaultCompilerType使用 方法來檢查組建提供者的預設編譯器類型。 GetDefaultCompilerTypeForLanguage使用 方法來檢查建置提供者中針對特定語言名稱所設定的編譯器類型。

BuildProvider 類會使用 defaultLanguage 應用程式組態檔 區段中的 屬性值 compilation 來決定預設編譯器類型。 如果 區段中沒有預設語言設定 compilation ,則會使用語言提供者來設定預設編譯 VBCodeProvider 程式類型。

BuildProvider 類別衍生時,您可以使用 GetDefaultCompilerType 在 實作內設定 CodeCompilerType 屬性。

適用於

另請參閱