1 <?xml version="1.0" encoding="utf-8"?>
\r
2 <!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
\r
3 <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
\r
4 <Target Name="CoreCompile"
\r
5 Inputs="$(MSBuildAllProjects);
\r
7 @(_CoreCompileResourceInputs);
\r
9 $(AssemblyOriginatorKeyFile);
\r
11 @(CompiledLicenseFile);
\r
13 @(EmbeddedDocumentation);
\r
16 @(CustomAdditionalCompileInputs);
\r
17 $(ResolvedCodeAnalysisRuleSet);
\r
20 Outputs="@(DocFileItem);
\r
21 @(IntermediateAssembly);
\r
22 @(_DebugSymbolsIntermediatePath);
\r
24 @(CustomAdditionalCompileOutputs)"
\r
25 Returns="@(CscCommandLineArgs)"
\r
26 DependsOnTargets="$(CoreCompileDependsOn)">
\r
27 <!-- These two compiler warnings are raised when a reference is bound to a different version
\r
28 than specified in the assembly reference version number. MSBuild raises the same warning in this case,
\r
29 so the compiler warning would be redundant. -->
\r
30 <PropertyGroup Condition="('$(TargetFrameworkVersion)' != 'v1.0') and ('$(TargetFrameworkVersion)' != 'v1.1')">
\r
31 <NoWarn>$(NoWarn);1701;1702</NoWarn>
\r
35 <!-- To match historical behavior, when inside VS11+ disable the warning from csc.exe indicating that no sources were passed in-->
\r
36 <NoWarn Condition="'$(BuildingInsideVisualStudio)' == 'true' AND '$(VisualStudioVersion)' != '' AND '$(VisualStudioVersion)' > '10.0'">$(NoWarn);2008</NoWarn>
\r
39 <ItemGroup Condition="'$(TargetingClr2Framework)' == 'true'">
\r
41 <EmbedInteropTypes />
\r
46 <!-- If the user has specified AppConfigForCompiler, we'll use it. If they have not, but they set UseAppConfigForCompiler,
\r
47 then we'll use AppConfig -->
\r
48 <AppConfigForCompiler Condition="'$(AppConfigForCompiler)' == '' AND '$(UseAppConfigForCompiler)' == 'true'">$(AppConfig)</AppConfigForCompiler>
\r
50 <!-- If we are targeting winmdobj we want to specifically the pdbFile property since we do not want it to collide with the output of winmdexp-->
\r
51 <PdbFile Condition="'$(PdbFile)' == '' AND '$(OutputType)' == 'winmdobj' AND '$(_DebugSymbolsProduced)' == 'true'">$(IntermediateOutputPath)$(TargetName).compile.pdb</PdbFile>
\r
54 <!-- Prefer32Bit was introduced in .NET 4.5. Set it to false if we are targeting 4.0 -->
\r
55 <PropertyGroup Condition="('$(TargetFrameworkVersion)' == 'v4.0')">
\r
56 <Prefer32Bit>false</Prefer32Bit>
\r
59 <!-- TODO: Remove this ItemGroup once it has been moved to "_GenerateCompileInputs" target in Microsoft.Common.CurrentVersion.targets.
\r
60 https://github.com/dotnet/roslyn/issues/12223 -->
\r
61 <ItemGroup Condition="('$(AdditionalFileItemNames)' != '')">
\r
62 <AdditionalFileItems Include="$(AdditionalFileItemNames)" />
\r
63 <AdditionalFiles Include="@(%(AdditionalFileItems.Identity))" />
\r
66 <PropertyGroup Condition="'$(UseSharedCompilation)' == ''">
\r
67 <UseSharedCompilation>true</UseSharedCompilation>
\r
70 <!-- Condition is to filter out the _CoreCompileResourceInputs so that it doesn't pass in culture resources to the compiler -->
\r
71 <Csc Condition="'%(_CoreCompileResourceInputs.WithCulture)' != 'true'"
\r
72 AdditionalLibPaths="$(AdditionalLibPaths)"
\r
73 AddModules="@(AddModules)"
\r
74 AdditionalFiles="@(AdditionalFiles)"
\r
75 AllowUnsafeBlocks="$(AllowUnsafeBlocks)"
\r
76 Analyzers="@(Analyzer)"
\r
77 ApplicationConfiguration="$(AppConfigForCompiler)"
\r
78 BaseAddress="$(BaseAddress)"
\r
79 CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)"
\r
80 ChecksumAlgorithm="$(ChecksumAlgorithm)"
\r
81 CodeAnalysisRuleSet="$(ResolvedCodeAnalysisRuleSet)"
\r
82 CodePage="$(CodePage)"
\r
83 DebugType="$(DebugType)"
\r
84 DefineConstants="$(DefineConstants)"
\r
85 DelaySign="$(DelaySign)"
\r
86 DisabledWarnings="$(NoWarn)"
\r
87 DocumentationFile="@(DocFileItem)"
\r
88 EmbeddedFiles="@(EmbeddedFiles)"
\r
89 EmitDebugInformation="$(DebugSymbols)"
\r
90 EnvironmentVariables="$(CscEnvironment)"
\r
91 ErrorEndLocation="$(ErrorEndLocation)"
\r
92 ErrorLog="$(ErrorLog)"
\r
93 ErrorReport="$(ErrorReport)"
\r
94 Features="$(Features)"
\r
95 FileAlignment="$(FileAlignment)"
\r
96 GenerateFullPaths="$(GenerateFullPaths)"
\r
97 HighEntropyVA="$(HighEntropyVA)"
\r
98 Instrument="$(Instrument)"
\r
99 KeyContainer="$(KeyContainerName)"
\r
100 KeyFile="$(KeyOriginatorFile)"
\r
101 LangVersion="$(LangVersion)"
\r
102 LinkResources="@(LinkResource)"
\r
103 MainEntryPoint="$(StartupObject)"
\r
104 ModuleAssemblyName="$(ModuleAssemblyName)"
\r
107 NoStandardLib="$(NoCompilerStandardLib)"
\r
108 NoWin32Manifest="$(NoWin32Manifest)"
\r
109 Optimize="$(Optimize)"
\r
110 Deterministic="$(Deterministic)"
\r
111 PublicSign="$(PublicSign)"
\r
112 OutputAssembly="@(IntermediateAssembly)"
\r
113 PdbFile="$(PdbFile)"
\r
114 Platform="$(PlatformTarget)"
\r
115 Prefer32Bit="$(Prefer32Bit)"
\r
116 PreferredUILang="$(PreferredUILang)"
\r
117 ProvideCommandLineArgs="$(ProvideCommandLineArgs)"
\r
118 References="@(ReferencePath)"
\r
119 ReportAnalyzer="$(ReportAnalyzer)"
\r
120 Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)"
\r
121 ResponseFiles="$(CompilerResponseFile)"
\r
122 RuntimeMetadataVersion="$(RuntimeMetadataVersion)"
\r
123 SkipCompilerExecution="$(SkipCompilerExecution)"
\r
124 Sources="@(Compile)"
\r
125 SubsystemVersion="$(SubsystemVersion)"
\r
126 TargetType="$(OutputType)"
\r
127 ToolExe="$(CscToolExe)"
\r
128 ToolPath="$(CscToolPath)"
\r
129 TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
\r
130 UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
\r
131 UseSharedCompilation="$(UseSharedCompilation)"
\r
132 Utf8Output="$(Utf8Output)"
\r
133 VsSessionGuid="$(VsSessionGuid)"
\r
134 WarningLevel="$(WarningLevel)"
\r
135 WarningsAsErrors="$(WarningsAsErrors)"
\r
136 WarningsNotAsErrors="$(WarningsNotAsErrors)"
\r
137 Win32Icon="$(ApplicationIcon)"
\r
138 Win32Manifest="$(Win32Manifest)"
\r
139 Win32Resource="$(Win32Resource)"
\r
140 PathMap="$(PathMap)"
\r
141 SourceLink="$(SourceLink)">
\r
142 <Output TaskParameter="CommandLineArgs" ItemName="CscCommandLineArgs" />
\r
146 <_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
\r
149 <CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''" />
\r