mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

Monodevelop Questions #9666

Open gustlgans opened 3 years ago

gustlgans commented 3 years ago

Hello, I installed monodevelop (7.8.4) on a freshly installed ubuntu 20.04. Whenn creating GTK# 2.0 Projects it always uses Gtk# Version 2.4.0.0 which ist somewhat ancient. I can use newer version via nuget but this will deactivate the GUI-Designer I have installed GTK# 2.12.0.45 on my machine. How can I configure monodevelop to use that? Thanks gustl

gustlgans commented 3 years ago

I found a walkaround for that problem Provided you have a fresh installation of ubuntu 20.04 (or Linux Mint 20.1) proceed as follows:

sudo apt-get install mono-complete -y sudo apt-get install gtk-sharp2 -y sudo apt install apt-transport-https dirmngr sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu vs-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.list sudo apt update sudo apt-get install monodevelop -y

Now start monodevelop and create a GTK2-Project. You will find that mondevelop tries to use GTK 2.12. but it won't compile - it claims that the namespace GTK cannot be found. To fix this do the following

sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF sudo apt-add-repository 'deb https://download.mono-project.com/repo/ubuntu stable-focal main' sudo apt install mono-complete -y

Now everything is working as expected. For an "old" Ubunut 20.04-Istallation: Purge all mono/monodevelop installations completely, remove the repositories and the configurationfiles (dpkg -l | grep "^rc") as well. I my case this did the trick. gustl