The fun part is, I do have .NET 4.0 installed, as well as all GTK#. I thought maybe I installed it in the wrong order or something ridiculous, so I uninstalled and re-installed everything. I even tried installing plain old mono, and then installing monodevelop, but I still get that same error.
Asked
Active
Viewed 2.1k times
2 Answers
8
IIRC MonoDevelop 2.4 had a bug that prevented it targeting the final released version of .NET 4.0. The fix should be in MonoDevelop 2.4.1.
As a workaround, assuming you installed Mono 2.8 (which has 4.0 support), you can change your target runtime to Mono instead of .NET. Either
- Change the default using the Tools -> Options menu, then the .NET Runtimes panel
or
- Change the target of the current project using the Project->Target Runtime menu.

Mikayla Hutchinson
- 16,113
- 2
- 44
- 50
-
I found a great shell script to install latest mono and monodevelop here: http://www.integratedwebsystems.com/2011/03/monodevelop-2-4-and-2-6-beta-install-script-for-ubuntu-fedora/ – Jeffrey Cameron May 25 '11 at 01:03
-
Thank you so much! Spent hours trying to figure out why MonoDevelop would only target MS .NET when I explicitly set Mono as a build target. Turned out I didn't add it as another .NET Runtime in the Tools -> Options. – d_d_t Jun 27 '14 at 03:28
3
you could easily change the framework under which tyour application is running to allow MonoDevelop build your's successfully by doing the following:
- open menu "Project"
- choose Application options
- from "General" tab, change the "Target framework" to be "Mono / .NET x"

Muhammad Soliman
- 21,644
- 6
- 109
- 75