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.

145 lines
6.7 KiB

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