同步操作将从 Six Six God/dotnet 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
This repository is a Virtual Monolithic Repository (VMR) which includes all the source code and infrastructure needed to build the .NET SDK.
What this means:
In the VMR, you can find:
src/
,Just like the development repositories, the VMR will have a release branch for every feature band (e.g. release/8.0.1xx-preview1
).
Similarly, VMR's main
branch will follow main
branches of product repositories (see Synchronization Based on Declared Dependencies).
More in-depth documentation about the VMR can be found in VMR Design And Operation. See also dotnet/source-build for more information about our whole-product source-build.
This is a work-in-progress and an experiment. There are considerable limitations to what is possible at the moment. For an extensive list of current limitations, please see Temporary Mechanics.
The VMR is expected to become non-experimental by .NET 8 Preview 1 (Februrary, 2023). This means it won't be short-lived anymore and we won't be reserving the right to delete and re-create it anymore. Other limitations might apply until the .NET 9 timeframe. See the Unified Build roadmap for more details.
The VMR only supports .NET 8.0 and higher. Additionally, source-build currently supports Linux only.
It is expected that Mac and Windows will be supported in the .NET 9.0.
For the latest information about Source-Build support for new .NET versions, please check our GitHub Discussions page for announcements.
Building the product offline is not fully working at the moment. The --online
switch is needed when building the VMR as not all dependencies are currently built from source.
For the time being, the source code only flows one way - from the development repos into the VMR. More details on this process:
We expect the code flow to start working both ways in the .NET 9 timeframe. See the Unified Build roadmap for more details.
At this time, the VMR will not accept any changes and is a read-only mirror of the development repositories only. Please, make the changes in the respective development repositories (e.g., dotnet/runtime or dotnet/sdk) and they will get synchronized into the VMR automatically.
Please note that this repository is an experiment and a work-in-progress so it is possible that the build is broken. For the latest information about Source-Build support, please watch for announcements posted on our GitHub Discussions page.
The dependencies for building .NET from source can be found here. In case you don't want to / cannot prepare your environment per the requirements, consider using Docker.
Clone the VMR
git clone https://github.com/dotnet/dotnet dotnet-dotnet
Prep the source to build on your distro
This downloads a .NET SDK and a number of .NET packages needed to build .NET from source.
cd dotnet-dotnet
./prep.sh
Build the .NET SDK
./build.sh --clean-while-building --online
This builds the entire .NET SDK from source.
The resulting SDK is placed at artifacts/x64/Release/dotnet-sdk-8.0.100-your-RID.tar.gz
.
Currently, the --online
flag is required to allow NuGet restore from online sources during the build.
This is useful for testing unsupported releases that don't yet build without downloading pre-built binaries from the internet.
Run ./build.sh --help
to see more information about supported build options.
(Optional) Unpack and install the .NET SDK
mkdir -p $HOME/dotnet
tar zxf artifacts/[your-arch]/Release/dotnet-sdk-8.0.100-[your-RID].tar.gz -C $HOME/dotnet
ln -s $HOME/dotnet/dotnet /usr/bin/dotnet
To test your source-built SDK, run the following:
dotnet --info
You can also build the repository using a Docker image which has the required prerequisites inside.
The example below creates a Docker volume named vmr
and clones and builds the VMR there.
docker run --rm -it -v vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
git clone https://github.com/dotnet/dotnet .
./prep.sh && ./build.sh --online
mkdir -p $HOME/.dotnet
tar -zxf artifacts/x64/Release/dotnet-sdk-8.0.100-centos.8-x64.tar.gz -C $HOME/.dotnet
ln -s $HOME/.dotnet/dotnet /usr/bin/dotnet
To enable full offline source-building of the VMR, we have no other choice than to synchronize all the necessary code into the VMR. This also includes any code referenced via git submodules. More details on why and how this is done can be found here:
src/arcade
src/aspnetcore
src/aspnetcore/src/submodules/googletest
src/aspnetcore/src/submodules/MessagePack-CSharp
src/aspnetcore/src/submodules/spa-templates
src/command-line-api
src/deployment-tools
src/diagnostics
src/format
src/fsharp
src/installer
src/linker
src/linker/external/cecil
src/msbuild
src/nuget-client
src/nuget-client/submodules/NuGet.Build.Localization
src/razor
src/razor-compiler
src/roslyn
src/roslyn-analyzers
src/runtime
src/sdk
src/source-build-externals
src/source-build-externals/src/application-insights
src/source-build-externals/src/azure-activedirectory-identitymodel-extensions-for-dotnet
src/source-build-externals/src/cssparser
src/source-build-externals/src/humanizer
src/source-build-externals/src/MSBuildLocator
src/source-build-externals/src/newtonsoft-json
src/source-build-reference-packages
src/sourcelink
src/symreader
src/templating
src/test-templates
src/vstest
src/xdt
src/xliff-tasks
The repository also contains a JSON manifest listing all components in a machine-readable format.
This repo does not accept issues as of now. Please file issues to the appropriate development repos. For issues with the VMR itself, please use the source-build repository.
.NET Runtime is a .NET Foundation project.
.NET is licensed under the MIT license.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。