dotnet-installer/src/SourceBuild
vseanreesermsft 08f3930ac3
Merging internal commits for release/6.0.1xx (#13347)
* [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk
- Coherency Updates:
  - Microsoft.WindowsDesktop.App.Ref: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.WindowsDesktop.SharedFramework.x64.6.0: from 6.0.2-servicing.22064.6 to 6.0.3-servicing.22116.1 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.WindowsDesktop.TargetingPack.x64.6.0: from 6.0.2-servicing.22064.6 to 6.0.3-servicing.22116.1 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Ref: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.NetCore.TargetingPack.x64.6.0: from 6.0.2-servicing.22064.6 to 6.0.3-servicing.22115.5 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Runtime.win-x64: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Host.win-x64: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.DotNetHostResolver: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.Platforms: from 6.0.1 to 6.0.2 (parent: Microsoft.NET.Sdk)
  - Microsoft.WindowsDesktop.App.Runtime.win-x64: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.Dotnet.WinForms.ProjectTemplates: from 6.0.2-servicing.22064.7 to 6.0.3-servicing.22115.6 (parent: Microsoft.WindowsDesktop.App.Runtime.win-x64)
  - Microsoft.WindowsDesktop.App.Runtime.win-x64: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.DotNet.Wpf.ProjectTemplates: from 6.0.2-servicing.22064.8 to 6.0.3-servicing.22115.10 (parent: Microsoft.WindowsDesktop.App.Runtime.win-x64)
  - Microsoft.Net.Compilers.Toolset: from 4.0.1-1.22053.6 to 4.0.1-1.22114.6 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.NetCore.SharedFramework.x64.6.0: from 6.0.2-servicing.22064.6 to 6.0.3-servicing.22115.5 (parent: Microsoft.NET.Sdk)
  - Microsoft.NET.Workload.Emscripten.Manifest-6.0.100: from 6.0.0 to 6.0.2 (parent: VS.Redist.Common.NetCore.SharedFramework.x64.6.0)

* [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk
- Coherency Updates:
  - Microsoft.AspNetCore.App.Ref: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.AspNetCore.App.Ref.Internal: from 6.0.2-servicing.22064.12 to 6.0.3-servicing.22116.12 (parent: Microsoft.NET.Sdk)
  - Microsoft.AspNetCore.App.Runtime.win-x64: from 6.0.2 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.AspNetCore.SharedFramework.x64.6.0: from 6.0.2-servicing.22064.12 to 6.0.3-servicing.22116.12 (parent: Microsoft.NET.Sdk)
  - dotnet-dev-certs: from 6.0.2-servicing.22064.12 to 6.0.3-servicing.22116.12 (parent: Microsoft.NET.Sdk)
  - dotnet-user-secrets: from 6.0.2-servicing.22064.12 to 6.0.3-servicing.22116.12 (parent: Microsoft.NET.Sdk)
  - Microsoft.DotNet.Common.ItemTemplates: from 6.0.102 to 6.0.103 (parent: Microsoft.NET.Sdk)
  - Microsoft.TemplateEngine.Cli: from 6.0.102-servicing.22068.7 to 6.0.103-servicing.22116.11 (parent: Microsoft.NET.Sdk)
  - Microsoft.DotNet.Common.ProjectTemplates.6.0: from 6.0.100 to 6.0.103 (parent: Microsoft.NET.Sdk)
  - Microsoft.Net.Compilers.Toolset: from 4.0.1-1.22114.6 to 4.0.1-1.22116.5 (parent: Microsoft.NET.Sdk)

 - Remove source-build aspnetcore patch to always build targeting packs because the backported fix is flowing in

* Merged PR 21331: Add runtime patch to reference correct System.Reflection.MetadataLoadContext version

System.Reflection.MetadataLoadContext references were using an incorrect version.props property which breaks source-build.
In 6.0.3 SystemReflectionMetadataVersion was revved but not SystemReflectionMetadataLoadContextVersion therefore breaking
the build because a System.Reflection.MetadataLoadContext with the SystemReflectionMetadataVersion.

* Merged PR 21346: [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk

This pull request updates the following dependencies

[marker]: <> (Begin:Coherency Updates)
## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

[DependencyUpdate]: <> (Begin)

- **Coherency Updates**:
  - **Microsoft.DotNet.Common.ItemTemplates**: from 6.0.103 to 6.0.103 (parent: Microsoft.NET.Sdk)
  - **Microsoft.TemplateEngine.Cli**: from 6.0.103-servicing.22116.11 to 6.0.103-servicing.22121.10 (parent: Microsoft.NET.Sdk)
  - **Microsoft.DotNet.Common.ProjectTemplates.6.0**: from 6.0.103 to 6.0.103 (parent: Microsoft.NET.Sdk)

[DependencyUpdate]: <> (End)

[marker]: <> (End:Coherency Updates)

[marker]: <> (Begin:a68e208b-7b40-4a19-af8d-08d961c59698)
## From https://dev.azure.com/dnceng/internal/_git/dotnet-sdk
- **Subscription**: a68e208b-7b40-4a19-af8d-08d961c59698
- **Build**: 20220221.9
- **Date Produced**: February 21, 2022 7:09:27 PM UTC
- **Commit**: 3d6f35bae36e4f0eac78ee90d58f695ad2ce2ef3
- **Branch**: refs/heads/internal/release/6.0.1xx

[DependencyUpdate]: <> (Begin)

- **Updates**:
  - **Microsoft.DotNet.MSBuildSdkResolver**: [from 6.0.103-servicing.22116.37 to 6.0.103-servicing.22121.9][1]
  - **Microsoft.NET.Sdk**: [from 6.0.103-servicing.22116.37 to 6.0.103-servicing.22121.9][1]
  - **Microsoft.DotNet.Common.ItemTemplates**: [from 6.0.103 to 6.0.103][2]
  - **Microsoft.TemplateEngine.Cli**: [from 6.0.103-servicing.22116.11 to 6.0.103-servicing.22121.10][2]
  - **Microsoft.DotNet.Common.ProjectTemplates.6.0**: [from 6.0.103 to 6.0.103][2]

[1]: https://dev.azure.com/dnceng/internal/_git/dotnet-sdk/branches?baseVersion=GCbecb321&targetVersion=GC3d6f35b&_a=files
[2]: https://dev.azure.com/dnceng/internal/_git/dotnet-templating/branches?baseVersion=GC488cbc4&targetVersion=GC988d95c&_a=files

[DependencyUpdate]: <> (End)

[marker]: <> (End:a68e208b-7b40-4a19-af8d-08d961c59698)

* Merged PR 21441: [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk

This pull request updates the following dependencies

[marker]: <> (Begin:Coherency Updates)
## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

[DependencyUpdate]: <> (Begin)

- **Coherency Updates**:
  - **Microsoft.NETCore.App.Ref**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **VS.Redist.Common.NetCore.TargetingPack.x64.6.0**: from 6.0.3-servicing.22115.5 to 6.0.3-servicing.22123.9 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.App.Runtime.win-x64**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.App.Host.win-x64**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.DotNetHostResolver**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.Platforms**: from 6.0.2 to 6.0.2 (parent: Microsoft.NET.Sdk)
  - **Microsoft.AspNetCore.App.Ref**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **Microsoft.AspNetCore.App.Ref.Internal**: from 6.0.3-servicing.22116.12 to 6.0.3-servicing.22124.1 (parent: Microsoft.NET.Sdk)
  - **Microsoft.AspNetCore.App.Runtime.win-x64**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **VS.Redist.Common.AspNetCore.SharedFramework.x64.6.0**: from 6.0.3-servicing.22116.12 to 6.0.3-servicing.22124.1 (parent: Microsoft.NET.Sdk)
  - **dotnet-dev-certs**: from 6.0.3-servicing.22116.12 to 6.0.3-servicing.22124.1 (parent: Microsoft.NET.Sdk)
  - **dotnet-user-secrets**: from 6.0.3-servicing.22116.12 to 6.0.3-servicing.22124.1 (parent: Microsoft.NET.Sdk)
  - **Microsoft.DotNet.Common.ItemTemplates**: from 6.0.103 to 6.0.103 (parent: Microsoft.NET.Sdk)
  - **Microsoft.TemplateEngine.Cli**: from 6.0.103-servicing.22121.10 to 6.0.103-servicing.22123.6 (parent: Microsoft.NET.Sdk)
  - **Microsoft.DotNet.Common.ProjectTemplates.6.0**: from 6.0.103 to 6.0.103 (parent: Microsoft.NET.Sdk)
  - **VS.Redist.Common.NetCore.SharedFramework.x64.6.0**: from 6.0.3-servicing.22115.5 to 6.0.3-servicing.22123.9 (parent: Microsoft.NET.Sdk)

[DependencyUpdate]: <> (End)

[marker]: <> (End:Coherency Updates)

[marker]: <> (Begin:a68e208b-7b40-4a19-af8d-08d961c59698)
## From https://dev.azure.com/dnceng/internal/_git/dotnet-sdk
- **Subscription**: a68e208b-7b40-4a19-af8d-08d961c59698
- **Build**: 20220224.11
- **Date Produced**: February 24, 2022 8:11:47 PM UTC
- **Commit**: 574686d9d185bd75770481fa76a82a0871210af4
- **Branch**: refs/heads/internal/release/6.0.1xx

[DependencyUpdate]: <> (Begin)

- **Updates**:
  - **Microsoft.DotNet.MSBuildSdkResolver**: [from 6.0.103-servicing.22121.9 to 6.0.103-servicing.22124.11][3]
  - **Microsoft.NET.Sdk**: [from 6.0.103-servicing.22121.9 to 6.0.103-servicing.22124.11][3]
  - **Microsoft.NETCor...

* Merged PR 21459: [internal/release/6.0.1xx] Update dependencies from dnceng/internal/dotnet-sdk

This pull request updates the following dependencies

[marker]: <> (Begin:Coherency Updates)
## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

[DependencyUpdate]: <> (Begin)

- **Coherency Updates**:
  - **Microsoft.WindowsDesktop.App.Ref**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **VS.Redist.Common.WindowsDesktop.SharedFramework.x64.6.0**: from 6.0.3-servicing.22116.1 to 6.0.3-servicing.22124.3 (parent: Microsoft.NET.Sdk)
  - **VS.Redist.Common.WindowsDesktop.TargetingPack.x64.6.0**: from 6.0.3-servicing.22116.1 to 6.0.3-servicing.22124.3 (parent: Microsoft.NET.Sdk)
  - **Microsoft.WindowsDesktop.App.Runtime.win-x64**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **Microsoft.Dotnet.WinForms.ProjectTemplates**: from 6.0.3-servicing.22115.6 to 6.0.3-servicing.22123.7 (parent: Microsoft.WindowsDesktop.App.Runtime.win-x64)
  - **Microsoft.WindowsDesktop.App.Runtime.win-x64**: from 6.0.3 to 6.0.3 (parent: Microsoft.NET.Sdk)
  - **Microsoft.DotNet.Wpf.ProjectTemplates**: from 6.0.3-servicing.22115.10 to 6.0.3-servicing.22124.2 (parent: Microsoft.WindowsDesktop.App.Runtime.win-x64)

[DependencyUpdate]: <> (End)

[marker]: <> (End:Coherency Updates)

[marker]: <> (Begin:a68e208b-7b40-4a19-af8d-08d961c59698)
## From https://dev.azure.com/dnceng/internal/_git/dotnet-sdk
- **Subscription**: a68e208b-7b40-4a19-af8d-08d961c59698
- **Build**: 20220224.18
- **Date Produced**: February 24, 2022 10:36:20 PM UTC
- **Commit**: 36d5c10d65ec7577234f1b72c25e21b9512f1895
- **Branch**: refs/heads/internal/release/6.0.1xx

[DependencyUpdate]: <> (Begin)

- **Updates**:
  - **Microsoft.DotNet.MSBuildSdkResolver**: [from 6.0.103-servicing.22124.14 to 6.0.103-servicing.22124.18][1]
  - **Microsoft.NET.Sdk**: [from 6.0.103-servicing.22124.14 to 6.0.103-servicing.22124.18][1]
  - **Microsoft.WindowsDesktop.App.Ref**: [from 6.0.3 to 6.0.3][2]
  - **VS.Redist.Common.WindowsDesktop.SharedFramework.x64.6.0**: [from 6.0.3-servicing.22116.1 to 6.0.3-servicing.22124.3][2]
  - **VS.Redist.Common.WindowsDesktop.TargetingPack.x64.6.0**: [from 6.0.3-servicing.22116.1 to 6.0.3-servicing.22124.3][2]
  - **Microsoft.WindowsDesktop.App.Runtime.win-x64**: [from 6.0.3 to 6.0.3][2]
  - **Microsoft.Dotnet.WinForms.ProjectTemplates**: [from 6.0.3-servicing.22115.6 to 6.0.3-servicing.22123.7][3]
  - **Microsoft.WindowsDesktop.App.Runtime.win-x64**: [from 6.0.3 to 6.0.3][2]
  - **Microsoft.DotNet.Wpf.ProjectTemplates**: [from 6.0.3-servicing.22115.10 to 6.0.3-servicing.22124.2][4]

[1]: https://dev.azure.com/dnceng/internal/_git/dotnet-sdk/branches?baseVersion=GC67f3050&targetVersion=GC36d5c10&_a=files
[2]: https://dev.azure.com/dnceng/intern...

* Update to temp SBRP version.

Co-authored-by: dotnet-bot <dotnet-bot@microsoft.com>
Co-authored-by: DotNet Bot <dn-bot@microsoft.com>
Co-authored-by: Michael Simons (VISUAL STUDIO) <Michael.Simons@microsoft.com>
Co-authored-by: Chris Rummel <crummel@microsoft.com>
2022-03-09 08:34:39 -06:00
..
Arcade Fix tarball CI condition 2022-03-04 14:10:42 +00:00
tarball Merging internal commits for release/6.0.1xx (#13347) 2022-03-09 08:34:39 -06:00
README.md aspnetcore stable version workaround 2021-10-21 17:19:38 +00:00

Source-Build

This directory contains files necessary to generate a tarball that can be used to build .NET from source.

For more information, see dotnet/source-build.

Local development workflow

These are the steps used by some members of the .NET source-build team to create a tarball and build it on a local machine as part of the development cycle:

  1. Check out this repository and open a command line in the directory.
  2. ./build.sh /p:ArcadeBuildTarball=true /p:TarballDir=/repos/tarball1 /p:PreserveTarballGitFolders=true
    • The TarballDir can be anywhere you want outside of the repository.
  3. cd /repos/tarball1
  4. ./prep.sh
  5. ./build.sh --online
  6. Examine results and make changes to the source code in the tarball. The .git folders are preserved, so you can commit changes and save them as patches.
  7. When a repo builds, source-build places a .complete file to prevent it from rebuilding again. This allows you to incrementally retry a build if there's a transient failure. But it also prevents you from rebuilding a repo after you've modified it.
    • To force a repo to rebuild with your new changes, run:
      rm -f ./artifacts/obj/semaphores/<repo>/Build.complete
  8. Run ./build.sh --online again, and continue to repeat as necessary.

When developing a prebuilt removal change, examine the results of the build, specifically:

  • Prebuilt report. For example:
    ./src/runtime.733a3089ec6945422caf06035c18ff700c9d51be/artifacts/source-build/self/prebuilt-report

Creating a patch file

To create a repo patch file, first commit your changes to the repo as normal, then run this command inside the repo to generate a patch file inside the repo:

git format-patch --zero-commit --no-signature -1

Then, move the patch file into this repo, at src/SourceBuild/tarball/patches/<repo>.

If you define PATCH_DIR to point at the patches directory, you can use -o to place the patch file directly in the right directory:

git format-patch --zero-commit --no-signature -1 -o "$PATCH_DIR/<repo>"

After generating the patch file, the numeric prefix on the filename may need to be changed. By convention, new patches should be one number above the largest number that already exists in the patch file directory. If there's a gap in the number sequence, do not fix it (generally speaking), to avoid unnecessary diffs and potential merge conflicts.

To apply a patch, or multiple patches, use git am while inside the target repo. For example, to apply all sdk patches onto a fresh clone of the sdk repository that has already been checked out to the correct commit, use:

git am "$PATCH_DIR/sdk/*"

This creates a Git commit with the patch contents, so you can easily amend a patch or create a new commit on top that you can be sure will apply cleanly.

There is a method to create a series of patches based on a range of Git commits, but this is not usually useful for 6.0 main development. It is used in servicing to "freshen up" the sequence of patches (resolve conflicts) all at once.

Note: Tarballs have already applied patches to the source code.