|
| 1 | +# Building DotDevelop |
| 2 | + |
| 3 | +To build DotDevelop from scratch you will need to following pre-requisites. |
| 4 | + |
| 5 | +Please note, Ubuntu 20.04 LTS is the perferred environment for buiding from source as Ubuntu 22.04 LTS doesn’t support .NET Core 3.1 or 2.0 since the distro only supports openSSL 3. |
| 6 | + |
| 7 | +## Build Environment Requirements |
| 8 | + |
| 9 | +The following steps are for Ubuntu, other distros may require different URLs. |
| 10 | + |
| 11 | +```bash |
| 12 | +sudo apt update |
| 13 | +sudo apt install wget |
| 14 | +sudo apt install intltool fsharp gtk-sharp2 |
| 15 | + |
| 16 | +# DotNet |
| 17 | +## Ubuntu 20.04 |
| 18 | +wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb |
| 19 | +sudo dpkg -i packages-microsoft-prod.deb |
| 20 | +rm packages-microsoft-prod.deb |
| 21 | + |
| 22 | +## Ubuntu 22.04 |
| 23 | +# wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb |
| 24 | +# sudo dpkg -i packages-microsoft-prod.deb |
| 25 | +# rm packages-microsoft-prod.deb |
| 26 | + |
| 27 | +sudo apt-get install -y apt-transport-https |
| 28 | +sudo apt-get update && sudo apt-get install -y dotnet-sdk-3.1 |
| 29 | +sudo apt-get update && sudo apt-get install -y dotnet-sdk-5.0 |
| 30 | +sudo apt-get update && sudo apt-get install -y dotnet-sdk-6.0 |
| 31 | + |
| 32 | +# Install Mono and MSBuild |
| 33 | +sudo apt-get install -y gnupg ca-certificates |
| 34 | +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
| 35 | + |
| 36 | +# Reference mono and msbuild from stable repo for versions 6.12.0.122 (mono) and 16.6.0.15201 (msbuild) |
| 37 | +echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list |
| 38 | + |
| 39 | +# Reference mono and msbuild from preview repo for versions 6.12.0.147 (mono) and 16.10.1 (msbuild) |
| 40 | +# echo "deb https://download.mono-project.com/repo/ubuntu preview-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-preview.list |
| 41 | +sudo apt-get update |
| 42 | + |
| 43 | +# Install mono-complete and ca-certificates-mono |
| 44 | +sudo apt-get install -y mono-complete ca-certificates-mono |
| 45 | + |
| 46 | +# Synchronise Mono SSL certs |
| 47 | +cert-sync /etc/ssl/certs/ca-certificates.crt |
| 48 | + |
| 49 | +# Install extra packages required for dotdevelop build |
| 50 | +sudo apt-get install -y sed git build-essential intltool nuget fsharp gtk-sharp2 |
| 51 | +sudo apt-get install -y software-properties-common |
| 52 | +sudo apt-get update |
| 53 | + |
| 54 | +# NetCoreDbg Requirements |
| 55 | +sudo apt install curl |
| 56 | +sudo apt install -y cmake clang |
| 57 | +``` |
| 58 | + |
| 59 | +## Clone and Building |
| 60 | + |
| 61 | +Build DotDevelop |
| 62 | + |
| 63 | +```bash |
| 64 | +git clone -b main https://github.com/dotdevelop/dotdevelop.git |
| 65 | +cd dotdevelop/ |
| 66 | + |
| 67 | +./configure --profile=gnome |
| 68 | +make |
| 69 | +``` |
| 70 | + |
| 71 | +Build NetCoreDbg, starting from the root of the `dotdevelop` folder. |
| 72 | + |
| 73 | +```bash |
| 74 | +# Build NetCoreDbg (starting from DotDevelop directory) |
| 75 | +cd main/external/Samsung.Netcoredbg |
| 76 | +bash build.sh |
| 77 | +cd ../../.. |
| 78 | +``` |
| 79 | + |
| 80 | +## Launching the IDE |
| 81 | + |
| 82 | +Launch DotDevelop, using one of the 2 options |
| 83 | + |
| 84 | +```bash |
| 85 | +# Start detached from terminal window |
| 86 | +(mono main/build/bin/MonoDevelop.exe &) |
| 87 | + |
| 88 | +# Start attached to terminal window |
| 89 | +mono main/build/bin/MonoDevelop.exe |
| 90 | +``` |
| 91 | + |
| 92 | +### Verify .NET Core Debugger is attached |
| 93 | + |
| 94 | +1. Launch, MonoDevelop |
| 95 | +2. Edit > Preferences > Projects > .NET Core Debuggers |
| 96 | +3. Click `...` and navigate to, `main/build/AddIns/Samsung.Netcoredbg/netcoredbg` |
| 97 | +4. Click, OK and start debugging |
| 98 | + |
| 99 | +## References |
| 100 | + |
| 101 | +* [NetCoreDbg - Readme.md](https://github.com/dotdevelop/netcoredbg/tree/dotdevelop#readme) |
| 102 | + * [Samsung NetCoreDbg](https://github.com/Samsung/netcoredbg) |
| 103 | +* [Issue #19 - Samsung.NetCoreDbg External Package](https://github.com/dotdevelop/dotdevelop/issues/47) |
0 commit comments