Merge pull request #820 from brendanzagaeski/master
[mono.git] / mcs / tools / xbuild / data / 12.0 / Microsoft.CSharp.targets
1 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2         <PropertyGroup>
3                 <DefaultLanguageSourceExtension>.cs</DefaultLanguageSourceExtension>
4                 <Language>C#</Language>
5         </PropertyGroup>
6
7         <PropertyGroup>
8                 <DebugSymbols Condition=" '$(DebugType)' == 'none' ">false</DebugSymbols>
9                 <DebugType    Condition=" '$(DebugType)' == 'none' "></DebugType>
10         </PropertyGroup>
11
12         <PropertyGroup>
13                 <CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn>
14                 <CoreCompileDependsOn></CoreCompileDependsOn>
15
16                 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildToolsPath)\Microsoft.CSharp.targets</MSBuildAllProjects>
17         </PropertyGroup>
18
19         <PropertyGroup>
20                 <NoCompilerStandardLib Condition="'$(NoCompilerStandardLib)'==''">true</NoCompilerStandardLib>
21         </PropertyGroup>
22
23         <ItemGroup>
24                 <DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)' != ''"/>
25         </ItemGroup>
26
27         <Target Name="_AddCorlibReference" DependsOnTargets="GetReferenceAssemblyPaths">
28                 <!--
29                 HACK: We don't yet support property functions, so can't calculate FrameworkPathOverride
30                 by calling ToolLocationHelper.GetPathToStandardLibraries. Instead, we search the framework
31                 directories for mscorlib.dll by constructing a filtered item set, and assume it only has
32                 one item.
33                 -->
34                 <ItemGroup>
35                         <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')"/>
36                 </ItemGroup>
37         </Target>
38
39         <Target
40                 Name="CoreCompile"
41                 Inputs="$(MSBuildAllProjects);@(Compile);@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile);
42                         $(KeyOriginatorFile);@(ReferencePath);$(Win32Icon);$(Win32Resource)"
43                 Outputs="@(DocFileItem);@(IntermediateAssembly)"
44                 DependsOnTargets="$(CoreCompileDependsOn)"
45         >
46                 <Csc
47                         AdditionalLibPaths="$(AdditionalLibPaths)"
48                         AddModules="@(AddModules)"
49                         AllowUnsafeBlocks="$(AllowUnsafeBlocks)"
50                         BaseAddress="$(BaseAddress)"
51                         CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)"
52                         CodePage="$(CodePage)"
53                         DebugType="$(DebugType)"
54                         DefineConstants="$(DefineConstants)"
55                         DelaySign="$(DelaySign)"
56                         DisabledWarnings="$(NoWarn)"
57                         DocumentationFile="@(DocFileItem)"
58                         EmitDebugInformation="$(DebugSymbols)"
59                         ErrorReport="$(ErrorReport)"
60                         FileAlignment="$(FileAlignment)"
61                         GenerateFullPaths="$(GenerateFullPaths)"
62                         KeyContainer="$(KeyContainerName)"
63                         KeyFile="$(KeyOriginatorFile)"
64                         LangVersion="$(LangVersion)"
65                         MainEntryPoint="$(StartupObject)"
66                         ModuleAssemblyName="$(ModuleAssemblyName)"
67                         NoConfig="true"
68                         NoLogo="$(NoLogo)"
69                         NoStandardLib="$(NoCompilerStandardLib)"
70                         Optimize="$(Optimize)"
71                         OutputAssembly="@(IntermediateAssembly)"
72                         PdbFile="$(PdbFile)"
73                         Platform="$(PlatformTarget)"
74                         References="@(ReferencePath)"
75                         ResponseFiles="$(CompilerResponseFile)"
76                         Sources="@(Compile)"
77                         TargetType="$(OutputType)"
78                         TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
79                         UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
80                         Utf8Output="$(Utf8Output)"
81                         WarningLevel="$(WarningLevel)"
82                         WarningsAsErrors="$(WarningsAsErrors)"
83                         WarningsNotAsErrors="$(WarningsNotAsErrors)"
84                         Win32Icon="$(Win32Icon)"
85                         Win32Resource="$(Win32Resource)"
86                         Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
87                         ToolExe="$(CscToolExe)"
88                         ToolPath="$(CscToolPath)" />
89
90         </Target>
91
92         <Target Name="CreateManifestResourceNames">
93                 <CreateCSharpManifestResourceName Condition="'@(ResxWithNoCulture)' != ''"
94                         ResourceFiles="@(ResxWithNoCulture)" RootNamespace="$(RootNamespace)">
95                         <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithNoCultureName" />
96                 </CreateCSharpManifestResourceName>
97
98                 <CreateCSharpManifestResourceName Condition="'@(NonResxWithNoCulture)' != ''"
99                         ResourceFiles="@(NonResxWithNoCulture)" RootNamespace="$(RootNamespace)">
100                         <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithNoCulture" />
101                 </CreateCSharpManifestResourceName>
102
103                 <CreateCSharpManifestResourceName Condition="'@(ResxWithCulture)' != ''"
104                         ResourceFiles="@(ResxWithCulture)" RootNamespace="$(RootNamespace)">
105                         <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestResourceWithCultureName" />
106                 </CreateCSharpManifestResourceName>
107
108                 <CreateCSharpManifestResourceName Condition="'@(NonResxWithCulture)' != ''"
109                         ResourceFiles="@(NonResxWithCulture)" RootNamespace="$(RootNamespace)">
110                         <Output TaskParameter = "ManifestResourceNames" ItemName = "ManifestNonResxWithCulture" />
111                 </CreateCSharpManifestResourceName>
112         </Target>
113
114         <Import Project="Microsoft.Common.targets" />
115
116         <PropertyGroup Condition="'$(NoCompilerStandardLib)'=='true' and '$(NoStdLib)'!='true'">
117                 <ResolveAssemblyReferencesDependsOn>$(ResolveAssemblyReferencesDependsOn);_AddCorlibReference</ResolveAssemblyReferencesDependsOn>
118         </PropertyGroup>
119
120         <PropertyGroup>
121                 <TargetFrameworkMonikerAssemblyAttributeText Condition="'$(TargetFrameworkMoniker)' != '' and '$(TargetingClr2Framework)' != 'true'">
122 // &lt;autogenerated /&gt;
123 [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(&quot;$(TargetFrameworkMoniker)&quot;, FrameworkDisplayName = &quot;$(TargetFrameworkMonikerDisplayName)&quot;)]
124                 </TargetFrameworkMonikerAssemblyAttributeText>
125         </PropertyGroup>
126
127 </Project>