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.

134 lines
6.7 KiB

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