Add unit test for AggregateException.GetBaseException that works on .net but is broke...
[mono.git] / mcs / tools / xbuild / xbuild / Microsoft.CSharp.targets
index 875121a4cbb11a784c1ceadf3230382fe8632087..3c378252a4643ee0679223d29642996413307b4b 100644 (file)
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
        <PropertyGroup>
-               <TargetExt Condition="'$(OutputType)' == 'Winexe'">.exe</TargetExt>
-               <TargetExt Condition="'$(OutputType)' == 'Exe'">.exe</TargetExt>
-               <TargetExt Condition="'$(OutputType)' == 'Library'">.dll</TargetExt>
-               <TargetExt Condition="'$(OutputType)' == 'Netmodule'">.netmodule</TargetExt>
+               <DefaultLanguageSourceExtension>.cs</DefaultLanguageSourceExtension>
+               <Language>C#</Language>
        </PropertyGroup>
 
        <PropertyGroup>
-               <AllowUnsafeBlocks Condition="'$(AllowUnsafeBlocks)' == ''">false</AllowUnsafeBlocks>
-               <WarningLevel Condition="'$(WarningLevel)' == ''" >2</WarningLevel>
+               <DebugSymbols Condition=" '$(DebugType)' == 'none' ">false</DebugSymbols>
+               <DebugType    Condition=" '$(DebugType)' == 'none' "></DebugType>
        </PropertyGroup>
 
-       <!-- We are passing references just as they are to Csc task. It can only work with references like:
-       System, System.Xml. (that exist in compiler's directory) ResolveAssemblyReferences task should be given
-       the references and should output list of .dll/.exe files that should be passed to Csc task.-->
+       <PropertyGroup>
+               <CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>
+               <CoreCompileDependsOn></CoreCompileDependsOn>
 
-       <Target Name="ResolveAssemblyReferences">
-               <ResolveAssemblyReference
-                       Assemblies="@(Reference)"
-               >
-                       <Output TaskParameter="ResolvedFiles" ItemName="ResolvedFiles"/>
-               </ResolveAssemblyReference>
-       </Target>
+               <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildToolsPath)\Microsoft.CSharp.targets</MSBuildAllProjects>
+       </PropertyGroup>
 
-       <Target Name="Build" DependsOnTargets="ResolveAssemblyReferences">
+       <ItemGroup>
+               <DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)' != ''"/>
+       </ItemGroup>
+
+       <Target
+               Name="CoreCompile"
+               Inputs="$(MSBuildAllProjects);@(Compile);@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile);
+                       $(KeyOriginatorFile);@(ReferencePath);$(Win32Icon);$(Win32Resource)"
+               Outputs="@(DocFileItem);@(IntermediateAssembly)"
+               DependsOnTargets="$(CoreCompileDependsOn)"
+       >
                <Csc
+                       AdditionalLibPaths="$(AdditionalLibPaths)"
+                       AddModules="@(AddModules)"
                        AllowUnsafeBlocks="$(AllowUnsafeBlocks)"
+                       BaseAddress="$(BaseAddress)"
+                       CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)"
+                       CodePage="$(CodePage)"
+                       DebugType="$(DebugType)"
                        DefineConstants="$(DefineConstants)"
+                       DelaySign="$(DelaySign)"
+                       DisabledWarnings="$(NoWarn)"
+                       DocumentationFile="@(DocFileItem)"
+                       EmitDebugInformation="$(DebugSymbols)"
+                       ErrorReport="$(ErrorReport)"
+                       FileAlignment="$(FileAlignment)"
+                       GenerateFullPaths="$(GenerateFullPaths)"
+                       KeyContainer="$(KeyContainerName)"
+                       KeyFile="$(KeyOriginatorFile)"
+                       LangVersion="$(LangVersion)"
+                       MainEntryPoint="$(StartupObject)"
+                       ModuleAssemblyName="$(ModuleAssemblyName)"
                        NoConfig="true"
-                       OutputAssembly="$(AssemblyName)$(TargetExt)"
-                       References="@(ResolvedFiles)"
+                       NoLogo="$(NoLogo)"
+                       NoStandardLib="$(NoStdLib)"
+                       Optimize="$(Optimize)"
+                       OutputAssembly="@(IntermediateAssembly)"
+                       PdbFile="$(PdbFile)" 
+                       Platform="$(PlatformTarget)"
+                       References="@(ReferencePath)"
+                       ResponseFiles="$(CompilerResponseFile)"
                        Sources="@(Compile)"
                        TargetType="$(OutputType)"
+                       TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
+                       UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
+                       Utf8Output="$(Utf8Output)"
                        WarningLevel="$(WarningLevel)"
-               />
+                       WarningsAsErrors="$(WarningsAsErrors)"
+                       WarningsNotAsErrors="$(WarningsNotAsErrors)"
+                       Win32Icon="$(Win32Icon)"
+                       Win32Resource="$(Win32Resource)"
+                       Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
+                       ToolExe="$(CscToolExe)"
+                       ToolPath="$(CscToolPath)" />
+
        </Target>
 
+       <Target Name="CreateManifestResourceNames">
+               <CreateCSharpManifestResourceName Condition="'@(ResxWithNoCulture)' != ''"
+                       ResourceFiles="@(ResxWithNoCulture)" RootNamespace="$(RootNamespace)">
+                       <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithNoCultureName" />
+               </CreateCSharpManifestResourceName>
+
+               <CreateCSharpManifestResourceName Condition="'@(NonResxWithNoCulture)' != ''"
+                       ResourceFiles="@(NonResxWithNoCulture)" RootNamespace="$(RootNamespace)">
+                       <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithNoCulture" />
+               </CreateCSharpManifestResourceName>
+
+               <CreateCSharpManifestResourceName Condition="'@(ResxWithCulture)' != ''"
+                       ResourceFiles="@(ResxWithCulture)" RootNamespace="$(RootNamespace)">
+                       <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithCultureName" />
+               </CreateCSharpManifestResourceName>
+
+               <CreateCSharpManifestResourceName Condition="'@(NonResxWithCulture)' != ''"
+                       ResourceFiles="@(NonResxWithCulture)" RootNamespace="$(RootNamespace)">
+                       <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithCulture" />
+               </CreateCSharpManifestResourceName>
+       </Target>
+
+       <Import Project="Microsoft.Common.targets" />
+
+       <PropertyGroup>
+               <CscToolExe Condition="'$(CscToolExe)' == '' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v4.5' and '$(OS)' != 'Windows_NT'">gmcs</CscToolExe>
+               <CscToolExe Condition="'$(CscToolExe)' == '' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v4.5' and '$(OS)' == 'Windows_NT'">gmcs.bat</CscToolExe>
+
+               <CscToolExe Condition="'$(CscToolExe)' == '' and '$(TargetFrameworkVersion)' == 'v4.5' and '$(OS)' != 'Windows_NT'">mcs</CscToolExe>
+               <CscToolExe Condition="'$(CscToolExe)' == '' and '$(TargetFrameworkVersion)' == 'v4.5' and '$(OS)' == 'Windows_NT'">mcs.bat</CscToolExe>
+               
+               <CscToolExe Condition="'$(CscToolExe)' == '' and '$(TargetFrameworkVersion)' == 'v4.0' and '$(OS)' != 'Windows_NT'">dmcs</CscToolExe>
+               <CscToolExe Condition="'$(CscToolExe)' == '' and '$(TargetFrameworkVersion)' == 'v4.0' and '$(OS)' == 'Windows_NT'">dmcs.bat</CscToolExe>
+       </PropertyGroup>
+       
+       <PropertyGroup>
+               <TargetFrameworkMonikerAssemblyAttributeText Condition="'$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">
+// &lt;autogenerated /&gt;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(&quot;$(TargetFrameworkMoniker)&quot;, FrameworkDisplayName = &quot;$(TargetFrameworkMonikerDisplayName)&quot;)]
+               </TargetFrameworkMonikerAssemblyAttributeText>
+       </PropertyGroup>
+
 </Project>