This repo contains the source for components that resides outside of the dotnet organization required to build .NET from source. Examples include Newtonsoft.Json and Application Insights for .NET. Git submodules are utilized to reference the external source. This repo contains the infrastructure to build these external repos within the .NET source build. See dotnet/source-build for more details on .NET source build.
This repo utilizes the .NET Arcade build infrastructure. Since this repo is intended solely for source build, it usually makes sense to build with the -sb (source build) flag.
./build.sh -sb
-
Add the repo as a submodule to
./src
git submodule add <remote_url> ./src/<destination_dir> git commit -m "<commit_message>"
-
Define a project for the new component. The project is responsible for building the submodule with the appropriate configuration for source build. See the existing projects for examples.
-
Build locally and resolve any build errors. Source changes must be applied via patches. See below for more info on patches.
-
Validate the version of the NuGet packages and binaries produced by the build. See the contents of
./artifacts/packages/<build_configuration>/NonShipping/Microsoft.SourceBuild.Intermediate.source-build-externals.x.y.z-dev.nupkg
. -
If the original binaries have strong name signatures, validate the source built ones have them as well.
-
Update the
src/<external_repo_dir>
to the desired shacd src/<external_repo_dir> git fetch git checkout <updated_sha> cd .. git add . git commit -m "<commit_message>"
-
Build locally
-
Update any patches as needed.
-
Review the repo's project to ensure it is appropriate for the new version. There are a number of projects that utilize MSBuild properties to specify the version. These need to be manually updated with each upgrade.
-
Resolve build errors. Source changes must be applied via patches. See below for more info on patches.
-
-
Validate the version of the NuGet packages and binaries produced by the build. See the contents of
./artifacts/packages/<build_configuration>/NonShipping/Microsoft.SourceBuild.Intermediate.source-build-externals.x.y.z-dev.nupkg
When creating/updating patches, it is desirable to backport the changes whenever feasible as this reduces the maintenance burden when updating a component to a newer version.
Source build related issues are tracked in the source build repo.
This repo is licensed under the MIT license.