Introduction:.NET Core source code compilation
Git clone github.com/dotnet/runt…
One: Windows compilation
-
VS 2019 16.6 (Do not install preview)
-
Win 10 Professional, Latest edition (1930/2004)
-
Long path support: Group Policy (gpedit.msc) > Computer Configuration > Administrative Templates > System > File System > Enable Win32 Long Path
-
Git config –system core.longpaths true
-
The latest official version of CMake www.cmake.org/download
-
The latest official release of Python
-
Compile instructions:
./build -subset Clr ./build -subset Libs ./build -subset Installer Copy the code
Two: Linux compilation
-
Ubuntu 18.04 LTS (Docker/ VM/VPS) has at least 1 GB memory
-
Environment:
#1. Install the following software packages sudo apt-get update sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget #2. Obtain the signature key wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - #3. Add kitware repositories to the source list and update them. sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' sudo apt-get update #4. Install the Kitware key update package sudo apt-get install kitware-archive-keyring #5. Rely on software packagesSudo apt-get install cmake llvm-9 clang-9 autoconf automake libtool build-essential python curl git lldb-6.0 Liblldb-6.0 -dev libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev libssl-dev libnuma-dev libkrb5-dev liblldb-6.0-dev libunwind8-dev gettext libicu-dev liblttng-ust-dev libssl-dev libnuma-dev libkrb5-dev #Encoding (optional) bash: Warning: setlocale: LC_ALL: cannot change locale (en_US.utF-8) apt-get install locales Copy the code
-
Clone source repository
-
Compile instructions:
./build -subset Clr ./build -subset Libs ./build -subset Installer Copy the code
-
Installation run time:
#Create a dotnet directory in /usr/share mkdir -p /usr/share/dotnet #Next, unpack the runtime binary archive into the newly created directoryThe tar ZXF/home/runtime artifacts/packages/Debug/Shipping/dotnet runtime - 5.0.0 dev - Linux - x64. Tar. Gz - C/usr/share/dotnet#Create a soft connection to the bin directory ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet #test dotnet --info Copy the code
-
The SDK installation:
#First, add Microsoft's package signing key to the trusted key listWget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb - O packages - Microsoft - prod. Deb#Then, add the package repository dpkg -i packages-microsoft-prod.deb #Update the source apt-get update #Install.net SDK 3.1Apt to get the install - y dotnet - SDK - 3.1#Look at the version information dotnet --info Copy the code