SourceBuild.props 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <Project>
  2. <PropertyGroup>
  3. <GitHubRepositoryName>aspnetcore</GitHubRepositoryName>
  4. <SourceBuildManagedOnly>true</SourceBuildManagedOnly>
  5. <SourceBuildTrimNetFrameworkTargets>true</SourceBuildTrimNetFrameworkTargets>
  6. </PropertyGroup>
  7. <Target Name="PrepareGlobalJsonForSourceBuild"
  8. AfterTargets="PrepareInnerSourceBuildRepoRoot"
  9. BeforeTargets="RunInnerSourceBuildCommand">
  10. <Exec
  11. Command="./eng/scripts/prepare-sourcebuild-globaljson.sh"
  12. WorkingDirectory="$(InnerSourceBuildRepoRoot)" />
  13. </Target>
  14. <!--
  15. Remove inner source .globalconfig file as both the inner and outer config files get loaded and cause a conflict.
  16. Leaving the inner will cause all conflicting settings to be ignored.
  17. https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-files#general-options
  18. -->
  19. <Target Name="RemoveInnerGlobalConfig"
  20. DependsOnTargets="PrepareInnerSourceBuildRepoRoot"
  21. BeforeTargets="RunInnerSourceBuildCommand">
  22. <Delete Files="$(InnerSourceBuildRepoRoot).globalconfig" />
  23. </Target>
  24. <!--
  25. Build RepoTasks - this is normally triggered via the build script but the inner ArPow source-build is run via msbuild
  26. -->
  27. <Target Name="BuildRepoTasks"
  28. Condition="'$(ArcadeInnerBuildFromSource)' == 'true'"
  29. BeforeTargets="Execute">
  30. <!-- If the alternative runtime location and key are present, pass those through -->
  31. <PropertyGroup>
  32. <_AdditionalRepoTaskBuildArgs />
  33. <_AdditionalRepoTaskBuildArgs Condition="'$(DotNetRuntimeSourceFeed)' != ''" >$(_AdditionalRepoTaskBuildArgs) --runtimesourcefeed $(DotNetRuntimeSourceFeed)</_AdditionalRepoTaskBuildArgs>
  34. <_AdditionalRepoTaskBuildArgs Condition="'$(DotNetRuntimeSourceFeedKey)' != ''" >$(_AdditionalRepoTaskBuildArgs) --runtimesourcefeedkey $(DotNetRuntimeSourceFeedKey)</_AdditionalRepoTaskBuildArgs>
  35. </PropertyGroup>
  36. <ItemGroup>
  37. <!-- We need to flow FullAssemblySigningSupported even when building repo tasks because they use full signing -->
  38. <InnerBuildEnv Condition="'$(FullAssemblySigningSupported)' != ''" Include="FullAssemblySigningSupported=$(FullAssemblySigningSupported)" />
  39. <InnerBuildEnv Include="DotNetBuildFromSource=true" />
  40. </ItemGroup>
  41. <!-- Call the build.sh script to build the repo tasks. Set IgnoreStandardErrorWarningFormat
  42. to true. This avoids fatal errors, because in internal builds there are usually a few failed installation
  43. attempts as the install script walks through potential locations for a runtime.
  44. The overall build script will return a proper exit code, but we don't want to pick up the printed error messages. -->
  45. <Exec
  46. Command="./eng/build.sh --only-build-repo-tasks -bl $(_AdditionalRepoTaskBuildArgs)"
  47. IgnoreStandardErrorWarningFormat="true"
  48. WorkingDirectory="$(InnerSourceBuildRepoRoot)"
  49. EnvironmentVariables="@(InnerBuildEnv)" />
  50. </Target>
  51. <Target Name="CustomizeInnerBuildArgs"
  52. BeforeTargets="GetSourceBuildCommandConfiguration">
  53. <PropertyGroup>
  54. <InnerBuildArgs>$(InnerBuildArgs) /p:SourceBuildRuntimeIdentifier=$(TargetRuntimeIdentifier)</InnerBuildArgs>
  55. <InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:CrossgenOutput=false</InnerBuildArgs>
  56. </PropertyGroup>
  57. </Target>
  58. <Target Name="GetAspnetcoreCategorizedIntermediateNupkgContents"
  59. BeforeTargets="GetCategorizedIntermediateNupkgContents">
  60. <PropertyGroup>
  61. <InstallersArtifactsDir>$(CurrentRepoSourceBuildArtifactsDir)\installers\$(Configuration)\</InstallersArtifactsDir>
  62. </PropertyGroup>
  63. <ItemGroup>
  64. <!--
  65. Add the internal installers artifacts required by dotnet/installer.
  66. -->
  67. <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore-runtime-*.tar.gz" />
  68. <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore_base_runtime.version" />
  69. </ItemGroup>
  70. </Target>
  71. </Project>