2023-03-13 14:44:42 +01:00
|
|
|
<!--
|
|
|
|
######## ######## ### ######## ######## ## ## #### ######
|
|
|
|
## ## ## ## ## ## ## ## ## ## ## ## ##
|
|
|
|
## ## ## ## ## ## ## ## ## ## ## ##
|
|
|
|
######## ###### ## ## ## ## ## ######### ## ######
|
|
|
|
## ## ## ######### ## ## ## ## ## ## ##
|
|
|
|
## ## ## ## ## ## ## ## ## ## ## ## ##
|
|
|
|
## ## ######## ## ## ######## ## ## ## #### ######
|
|
|
|
-->
|
|
|
|
|
|
|
|
This Codespace can help you debug the source build of .NET. This build takes about
|
|
|
|
45 minutes and, after completion, produces an archived .NET SDK located in
|
2024-02-13 16:19:33 +01:00
|
|
|
`/workspaces/dotnet/artifacts/assets/Release`. In case you selected the `prebuilt-sdk`
|
2024-02-08 17:42:26 +01:00
|
|
|
Codespace, the built-from-source SDK will already be there.
|
2023-03-13 14:44:42 +01:00
|
|
|
|
|
|
|
## Build the SDK
|
|
|
|
|
2024-02-08 17:42:26 +01:00
|
|
|
To build the repository, run one of the following:
|
2023-03-13 14:44:42 +01:00
|
|
|
```bash
|
2024-02-08 17:42:26 +01:00
|
|
|
# Microsoft based build
|
|
|
|
./build.sh
|
|
|
|
```
|
|
|
|
or
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Building from source only
|
2024-03-15 09:45:04 -05:00
|
|
|
./prep-source-build.sh && ./build.sh -sb
|
2023-03-13 14:44:42 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
> Please note that, at this time, the build modifies some of the checked-in sources so it might
|
|
|
|
be preferential to rebuild the Codespace between attempts (or reset the working tree changes).
|
|
|
|
|
|
|
|
For more details, see the instructions at https://github.com/dotnet/dotnet.
|
|
|
|
|
|
|
|
## Synchronize your changes in locally
|
|
|
|
|
|
|
|
When debugging the build, you have two options how to test your changes in this environment.
|
|
|
|
|
|
|
|
### Making changes to the VMR directly
|
|
|
|
|
|
|
|
You can make the changes directly to the local checkout of the VMR at `/workspaces/dotnet`. You
|
|
|
|
can then try to build the VMR and see if the change works for you.
|
|
|
|
|
|
|
|
### Pull changes into the Codespace from your fork
|
|
|
|
|
|
|
|
You can also make a fix in the individual source repository (e.g. `dotnet/runtime`) and push the
|
|
|
|
fix into a branch; can be in your fork too. Once you have the commit pushed, you can pull this
|
|
|
|
version of the repository into the Codespace by running:
|
|
|
|
|
|
|
|
```
|
|
|
|
/workspaces/synchronize-vmr.sh \
|
|
|
|
--repository <repo>:<commit, tag or branch> \
|
|
|
|
--remote <repo>:<fork URI>
|
|
|
|
```
|
|
|
|
|
|
|
|
You can now proceed building the VMR in the Codespace using instructions above. You can repeat
|
|
|
|
this process and sync a new commit from your fork. Only note that, at this time, Source-Build
|
|
|
|
modifies some of the checked-in sources so you'll need to revert the working tree changes
|
|
|
|
between attempts.
|