How not to break Mono installations

It's a bad idea to mess with the packaged version of Mono on your Linux distro by installing another version of Mono on top of it or into another of your distro's standard prefixes such as /usr/local. Your distro's developers, testers and packagers have tested the packaged version of Mono to make sure that it works with the various applications that depend on it, such as MonoDevelop, Tomboy, F-Spot, Beagle and Banshee. In addition, you're likely to end up with unusual errors due to mismatched bits and pieces interacting in unpredictable ways.

If you need a more recent version in order to test new features and bugfixes, please keep a properly separated parallel Mono environment. By following these instructions you can ensure that you don't affect your stable Mono platform while experimenting with newer versions.

This applies to platform bindings such as GTK#, GtkSourceView# and GNOME# too!

Comments

Thank you very much for pointing this out. I was also thinking to blog about it. I have seen various "how to"s that suggest to overwrite existing Mono installations by using "/usr" as prefix. I was shocked.... Hopefully users will not blow their systems anymore by overwriting files managed by the distribution. Thats what /usr/local and /opt is for. Thanks!

I'm new to your "Home on the Web", but am anticipating stopping by regularly. I hope this comment is in keeping with the spirit of MJHutchingson.com.

My point is that when I create a new ASP.NET project, I always get an error "Could not write 'Default.aspx.'" Does this sound like a possible symptom of the problem you are describing? Would you recommend uninstalling mono and reinstalling?

(I'm also new to Linux, I guess that makes me an all-around-newbiew. I am using Gentoo, so I anticipate trying something like "emerge -C mono", and then "emerge mono".)

Thanks,

Ross

That error could be a symptom of this, but I suspect it isn't. What version of MD are you using? Is there any more verbose error message on the console?

BTW, if you want "live" assistance, you can find me as "mhutch" in #monodevelop on irc.gimp.org during the week (and sometimes at weekends).

Thanks for your reply--your willingness to offer live assistance on irc is also
noted as very generous, and does not go unnoticed.

I am using MD v0.15

The steps I take are:

1) Start a New Project
2) Select C#/ASP.NET/Web Application
3) Select a Directory (Existing or "Create New Subdirectory")
4) Click "Forward" button

Then I get the MonoDevelop Error Dialog
==============================================
| |
| File Default.aspx.${LanguageExtension} could not be written. |
| > Details [ OK ] |
==============================================

Nothing on the error dialog is selectable, Not the Details link, the
OK button, or the close (x) button. I can move the error dialog, and under
it is the "New Solution" Dialog with Project features. The New Solution
dialog is fully function with the "Packaging", "Unix Integration" and
"GTk# Support" options. After I close thee "New Solution" dialog, then
the Error Dialog can be closed, and (as I just this second learned)
the "> Details " link is selectable. this is very informative, and seems
to point out a problem in the Systems. Collections.Generic namespace.
The summery of the error is:
"Exception occurred: The given key was not present in the dictionary."

There is a stack trace with lot more detail. Rather than clutter up this reply
with its lengthy contents, I'll see if I can dig down to the root of the problem.
This way I'll save from wasting your time, and possibly actually learn something
in the process.

Thanks again!

ray

--had I not tried to write out the details of the problem for you, I probably would
never have realized that the >Details link was finally available after closing the
other dialog.

That bug was introduced by changes in MD Core shortly before 0.15 was released. I'm not exactly sure what caused it, as it was fixed by other Core changes soon after 0.15 was released, and before I became aware of it...

MonoDevelop 0.16 (Beta 1) and 0.17 (Beta 2) work fine, and feature other ASP.NET improvements too.