SourceBuild.props 4.1 KB

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