You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

151 lines
7.1 KiB

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