Ludeon Forums

RimWorld => Mods => Help => Topic started by: rubenwardy on July 20, 2016, 07:57:55 PM

Title: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: rubenwardy on July 20, 2016, 07:57:55 PM
After many many hours of research, here is a repost of a blog post I made explaining how to install Monodevelop in a way that allows you to compile to .NET 3.5 http://blog.rubenwardy.com/2016/07/20/rimworld-install-monodevelop-with-dot-net-3.5/
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: 1000101 on July 20, 2016, 08:24:35 PM
Forum moderator!  Please pin this!

@rubenwardy - Good job on seeking out and providing this information.  :)
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: skullywag on July 28, 2016, 04:27:01 AM
Stickied, good work.
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: Kaiser_Gun on August 06, 2016, 02:42:41 PM
I'm on Ubuntu 16.04 and i get this warning :
W: http://download.mono-project.com/repo/debian/dists/wheezy/snapshots/3.12.0/InRelease: Signature by key 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF uses weak digest algorithm (SHA1)

just after the :

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.0 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update


Anyone know how could i fix this ? plz  :'(




Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: rubenwardy on August 06, 2016, 02:49:08 PM
You should be able to ignore it and it will still work
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: Robostove on October 26, 2016, 02:58:32 PM
Following the tutorial I'm failing to install the snapshot for mono-complete. It's missing the correct dependencies because when I run the following, the 4.2.1 libmono libraries are installed. sudo apt-get install build-essential cli-common libgtk2.0-cil-dev libglade2.0-cil-dev libgnome2.0-cil-dev libgconf2.0-cil-dev

I'm using Ubuntu 16.04. I successfully removed my existing Mono installation using the following command. (The tutorial steps weren't removing Mono fully) sudo apt-get purge libmono* cli-common mono-runtime

Can anyone help me sort this out?
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: Thirite on November 10, 2016, 10:48:54 PM
For whatever reason I could not install the snapshot using the "sudo apt-get install -t wheezy/snapshots/3.12.0 mono-complete" line in the OP. However I found a solution online that worked.

Edit your /etc/apt/sources.list.d/mono-xamarin.list to have only this line:
deb download.mono-project.com/repo/debian wheezy/snapshots/3.12.0/. main

Then you simply enter in the terminal "sudo apt-get install mono-complete" it will keep it held at 3.12.0.

Found here:
http://stackoverflow.com/questions/33763177/install-older-version-of-mono
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: Thirite on January 21, 2017, 11:48:16 PM
So I recently updated to 16.04, and had to reinstall mono. Had troubles, again. What a surprise.

I used aptitude to install mono 3.12.0, which resolved whatever issues apt-get was throwing at me.
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: rogerbacon on February 09, 2017, 07:47:54 PM
What is the advantage of using MonoDevlop over something like Visual Studio?
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: rubenwardy on February 09, 2017, 07:54:30 PM
Quote from: rogerbacon on February 09, 2017, 07:47:54 PM
What is the advantage of using MonoDevlop over something like Visual Studio?

Visual Studio only supports Windows
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: mephasor on April 12, 2017, 02:22:56 PM
I am using Linux Mint 18 and cannot get this to run.

After adding the source, updating and reinstalling the packages, my mono version is still 4.2.*

So far the only useful discussion on this that I could find is this: https://www.reddit.com/r/linuxquestions/comments/5x1y0v/installing_mono_3120/

However, this does not seem to help me either. Did anyone try this recently?
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: rubenwardy on April 12, 2017, 02:49:22 PM
What output do you get with the following commands?

apt-cache show mono-devel
apt-cache policy mono-devel
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: roxxploxx on May 02, 2017, 11:45:06 AM
I had the same issues on a mac, with MonoDevelop not supporting .Net 3.5. I tried doing some of this but I instead virtualized Windows 10 to run Visual Studio. I set up a shared drive so I could use my Mac's development tools and then the build process and disassemble tools of Windows.

Here's what I ended up doing.
  https://github.com/roxxploxx/RimWorldModGuide/wiki/SHORTTUTORIAL:-Mac-Modding-HowTo

Hope it helps.
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: Arcane_Chill on May 28, 2017, 12:34:48 PM
I'm using Linux Mint 18.1 and I kept having some issues.  Finally, I ended up having to explicitly list every required mono package and its dependency by version, but this seems to have worked.


sudo apt-get install mono-runtime=3.12.1-0xamarin1 mono-runtime-sgen=3.12.1-0xamarin1 mono-runtime-common=3.12.1-0xamarin1 mono-gac=3.12.1-0xamarin1 mono-4.0-gac=3.12.1-0xamarin1 libmono-corlib4.5-cil=3.12.1-0xamarin1 libmono-security4.0-cil=3.12.1-0xamarin1 libmono-system4.0-cil=3.12.1-0xamarin1 libmono-system-configuration4.0-cil=3.12.1-0xamarin1 libmono-system-xml4.0-cil=3.12.1-0xamarin1 libmono-system-security4.0-cil=3.12.1-0xamarin1


Edit: That wasn't 100% the solution, you may need this as well:

sudo apt-get install mono-gmcs=3.12.1-0xamarin1 mono-mcs=3.12.1-0xamarin1 libmono-system-core4.0-cil=3.12.1-0xamarin1 libmono-microsoft-csharp4.0-cil=3.12.1-0xamarin1 libmono-corlib4.5-cil=3.12.1-0xamarin1 libmono-csharp4.0c-cil=3.12.1-0xamarin1 libmono-system-core4.0-cil=3.12.1-0xamarin1 libmono-posix4.0-cil=3.12.1-0xamarin1
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: bpf on June 21, 2017, 11:39:03 PM
I got mono 3.12.1 installed, but I'm currently fumbling around in MonoDevelop trying to make anything at all appear. I have Assembly-CSharp.dll open, but I'm otherwise just looking at a blank screen. Am I missing something obvious here?

[attachment deleted by admin due to age]
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: lperkins2 on June 27, 2017, 07:14:45 PM
On debian based systems, just install mono-reference-assemblies-3.5
It worked for me anyway, in a debian-testing chroot.  Other distros can theoretically get the reference assemblies from the mono git repository, but I'm not sure where to install them.
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: LWM on December 27, 2018, 08:30:02 PM
For what it's worth, I'm running SolydXK, which is Ubutu-ish and based on Debian.  I didn't have a functional mono installation available from my default repositories.

I have added the following repository (using Synaptic, which is my usual package manager of choice):
  http://download.mono-project.com/repo/ubuntu/
  vs-trusty
  main

Then I installed 'monodevelop' and lo! it works.

I have found that the windows program dnSpy is fantastically superior to anything I could get running easily under Linux, and as I can duel boot, I stopped looking.  I don't know if it runs under wine, but it works better than mono at dealing with assemblies, and I just export stuff and then reboot to do actual work on it with mono.

--LWM
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: lperkins2 on January 17, 2019, 08:54:43 PM
JetBrains Rider seems to do a good job for exploring assemblies, but it's kinda spendy.  I used it for the 30 day trial, and wish they had a community version like for their other IDEs.

On the topic of mono versions, I've taken to invoking mcs with -notstdlib, and then listing the specific system libraries I want used (RimWorld/RimWorldLinux_Data/Managed/System.dll et cetera).  This seems to be the most stable way to get the right versions of things (3.5 for RimWorld, 4.something for MonoGame projects). 

The full command is something like
mcs -nostdlib -target:library -out:../Assemblies/ModName.dll `find . | grep cs$` `for f in $Reference/*dll; do echo -r:$f; done;`

Where Reference points to the Managed folder (or wherever the appropriate mono system libraries are located).
Title: Re: [Tutorial] Monodevelop and .NET 3.5 on Debian based Linux (Eg: Ubuntu)
Post by: llunak on July 26, 2021, 01:35:11 PM
These instructions appear to be outdated by now (RimWorld now uses .NET 4.7.2 and not 3.5, and there has not been a stable release of MonoDevelop for over two years, so it possibly may not work on latest distributions). If you'd like to mod RimWorld on Linux and cannot get it to work using these instructions, I've added my way to the wiki : https://rimworldwiki.com/wiki/Modding_Tutorials/Setting_up_a_solution#Mono