Bagikan melalui


<compilers> Elemen

Kontainer untuk elemen konfigurasi kompilator; berisi nol atau lebih <elemen pengkompilasi> .

<konfigurasi>
   <system.codedom>
     <Compiler>

Syntax

<compilers>
  <compiler ... />
</compilers>

Atribut dan Elemen

Bagian berikut menjelaskan atribut, elemen turunan, dan elemen induk.

Attributes

Tidak ada.

Elemen Anak

Elemen Description
<Compiler> Element Menentukan atribut konfigurasi pengkompilasi untuk penyedia bahasa.

Elemen Induk

Elemen Description
<Elemen> konfigurasi Elemen akar di setiap file konfigurasi yang digunakan oleh runtime dan aplikasi .NET Framework.
<Elemen system.codedom> Menentukan pengaturan konfigurasi pengkompilasi untuk penyedia bahasa yang tersedia.

Komentar

Elemen <pengkompilasi> berisi pengaturan konfigurasi pengkompilasi untuk penyedia bahasa di komputer. Setiap <elemen kompilator> menentukan atribut konfigurasi pengkompilasi untuk penyedia bahasa tertentu.

.NET Framework mendefinisikan pengaturan pengkompilasi awal dan penyedia bahasa dalam file konfigurasi komputer (Machine.config). Pengembang dan vendor kompilator dapat menambahkan pengaturan konfigurasi untuk implementasi baru System.CodeDom.Compiler.CodeDomProvider . CodeDomProvider.GetAllCompilerInfo Gunakan metode untuk menghitung pengaturan konfigurasi penyedia bahasa dan pengkompilasi secara terprogram di komputer.

File Konfigurasi

Elemen ini dapat digunakan dalam file konfigurasi mesin dan file konfigurasi aplikasi.

Example

Contoh berikut mengilustrasikan elemen konfigurasi kompilator yang khas.

<configuration>
   <system.codedom>
     <compilers>
       <!-- zero or more compiler elements -->
       <compiler
          language="c#;cs;csharp"
          extension=".cs"
          type="Microsoft.CSharp.CSharpCodeProvider, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
          compilerOptions=""
          warningLevel="1" />
     </compilers>
   </system.codedom>
</configuration>

Lihat juga