Click here to Skip to main content
15,896,153 members
Articles / Programming Languages / C#

How does it work in Mono's C# compiler?

Rate me:
Please Sign up or sign in to vote.
4.99/5 (54 votes)
30 Apr 2012CPOL19 min read 143.6K   1.1K   77  
The Mono is an Open Source free programming language project. It has the implementation of Microsoft’s .NET Framework based on the ECMA standards for C# language and Common Language Runtime (CLR). In this article, I will explore how the Mono C# compiler works.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{D4A01C5B-A1B5-48F5-BB5B-D2E1BD236E56}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>gmcs</RootNamespace>
    <AssemblyName>gmcs</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <OldToolsVersion>3.5</OldToolsVersion>
    <UpgradeBackupLocation />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
    <UpdateEnabled>false</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateInterval>7</UpdateInterval>
    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    <UpdatePeriodically>false</UpdatePeriodically>
    <UpdateRequired>false</UpdateRequired>
    <MapFileExtensions>true</MapFileExtensions>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>.\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NET_2_0;MS_COMPATIBLE;GMCS_SOURCE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <DefineConstants>TRACE;NET_2_0;MS_COMPATIBLE;GMCS_SOURCE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <DefineConstants>TRACE;NET_2_0;MS_COMPATIBLE;GMCS_SOURCE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <OutputPath>.\</OutputPath>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="argument.cs" />
    <Compile Include="AssemblyInfo.cs">
    </Compile>
    <Compile Include="anonymous.cs">
    </Compile>
    <Compile Include="assign.cs">
    </Compile>
    <Compile Include="attribute.cs">
    </Compile>
    <Compile Include="cfold.cs">
    </Compile>
    <Compile Include="class.cs">
    </Compile>
    <Compile Include="codegen.cs">
    </Compile>
    <Compile Include="complete.cs" />
    <Compile Include="const.cs">
    </Compile>
    <Compile Include="constant.cs">
    </Compile>
    <Compile Include="context.cs" />
    <Compile Include="convert.cs">
    </Compile>
    <Compile Include="CryptoConvert.cs" />
    <Compile Include="dynamic.cs" />
    <Compile Include="eval.cs" />
    <Compile Include="lambda.cs">
    </Compile>
    <Compile Include="cs-parser.cs" />
    <Compile Include="cs-tokenizer.cs">
    </Compile>
    <Compile Include="decl.cs">
    </Compile>
    <Compile Include="delegate.cs">
    </Compile>
    <Compile Include="doc.cs">
    </Compile>
    <Compile Include="driver.cs">
    </Compile>
    <Compile Include="ecore.cs">
    </Compile>
    <Compile Include="enum.cs">
    </Compile>
    <Compile Include="expression.cs">
    </Compile>
    <Compile Include="flowanalysis.cs">
    </Compile>
    <Compile Include="generic.cs" />
    <Compile Include="iterators.cs">
    </Compile>
    <Compile Include="literal.cs">
    </Compile>
    <Compile Include="location.cs">
    </Compile>
    <Compile Include="modifiers.cs">
    </Compile>
    <Compile Include="MonoSymbolFile.cs" />
    <Compile Include="MonoSymbolTable.cs" />
    <Compile Include="MonoSymbolWriter.cs" />
    <Compile Include="namespace.cs">
    </Compile>
    <Compile Include="nullable.cs">
    </Compile>
    <Compile Include="outline.cs" />
    <Compile Include="parameter.cs">
    </Compile>
    <Compile Include="pending.cs">
    </Compile>
    <Compile Include="report.cs">
    </Compile>
    <Compile Include="rootcontext.cs">
    </Compile>
    <Compile Include="roottypes.cs">
    </Compile>
    <Compile Include="statement.cs">
    </Compile>
    <Compile Include="support.cs">
    </Compile>
    <Compile Include="symbolwriter.cs">
    </Compile>
    <Compile Include="typemanager.cs">
    </Compile>
    <Compile Include="linq.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Properties\" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Consts.cs" />
  </ItemGroup>
  <ItemGroup>
    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
      <Install>false</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
      <Visible>False</Visible>
      <ProductName>.NET Framework 3.5 SP1</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
      <Visible>False</Visible>
      <ProductName>Windows Installer 3.1</ProductName>
      <Install>true</Install>
    </BootstrapperPackage>
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Australia Australia

Comments and Discussions