Bug 8763 - Missing method System.Environment::SetEnvironmentVariable(string,string) in assembly "/Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll"
Summary: Missing method System.Environment::SetEnvironmentVariable(string,string) in a...
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 2.8.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-12-05 04:20 UTC by Hussain
Modified: 2014-10-07 06:48 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Hussain 2012-12-05 04:20:42 UTC
Missing method System.Environment::SetEnvironmentVariable(string,string) in assembly "/Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll"
---
This happens when I open MonoDevelop, it crashes "MonoDevelop quite unexpectedly", then I get an error as above by looking at the logs. I tried uninstalling Mono, MonoTouch/Framework and MonoDevelop, following all instructions to do that and also deleting all files that have "mono" inside them. Then reinstalled and same thing.

MonoDevelop was working previously for a long time, however the launching of an app to the physical iPad had an error, something to do with "mscorlib" (same as above), then after re-installing, I couldn't get it to open anymore.
Comment 1 Mikayla Hutchinson [MSFT] 2012-12-05 13:44:11 UTC
What MonoDevelop version? If it's really 2.8.2 (as in the bug's Version field), please upgrade to the latest 3.x.

Can you attach the full MonoDevelop error log from Library/Logs/MonoDevelop-3.0?
Comment 2 Hussain 2012-12-05 16:59:07 UTC
I have uninstalled everything using the instructions found in this website (second post):
http://monotouch.2284126.n4.nabble.com/Howto-uninstall-td4180855.html
Also running the "uninstallMono.sh" script.

Then I installed monotouch-5.1.2, MonoFramework-MDK-2.10.10.macos10.xamarin.x86, and MonoDevelop-3.0.5.

Unfortunately now it doesn't crash and there's no logs. The icon just appears on the taskbar (Springboard) for less than one second and then disappears. This behavior was also noticed previously with MonoDevelop-2.8.2. Is there anything I can try? Thanks.
Comment 3 Hussain 2012-12-05 18:09:24 UTC
Extra information: I opened up /Applications/MonoDevelop.app/Contents/MacOS/MonoDevelop, then I got a terminal with the following text:
---
Last login: Thu Dec  6 11:25:35 on console
halsaadymac:~ halsaady$ /Applications/MonoDevelop.app/Contents/MacOS/MonoDevelop ; exit;
Corlib not in sync with this runtime: expected corlib version 636, found 96.
Loaded from: /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll
Download a newer corlib or a newer runtime at http://www.go-mono.com/daily.
logout

[Process completed]
---
I believe this is the root of all my problems, that mscorlib/corlib is an old version. How do I update this? I have found several websites saying "download monocharge at http://www.go-mono.com/daily", can I please get some instructions on how to do this (I think I have to use SVN?)? A direct link would be appreciated.
---
Here is one of the websites talking about fixing this issue with monocharge (from http://www.all-the-johnsons.co.uk/mono/mono-faq.html):
~Conflicts & age
One of the most common forms of compile failure is the dreaded out-of-sync error. This is when corlib is out of sync (you get an error along the lines of corlib is out of date. Found version 22 and expected version 28. Luckily this is easy to rectify. Download the latest monocharge tar ball from go-mono.com/daily, dearchive, change to su and run the recharge.sh script.
Comment 4 Jeffrey Stedfast 2012-12-11 15:09:50 UTC
You can download a pre-built Mono from http://download.mono-project.com/archive/2.10.10/macos-10-x86//MonoFramework-MDK-2.10.10.macos10.xamarin.x86.dmg
Comment 5 Hussain 2012-12-11 16:38:07 UTC
I've tried that mono framework as well but it gave the same results. I have reformatted my mac now and its all working fine. I suspect it was a software update which caused the crash and possibly the update I did to OS 10.7.5. Thanks for all the support.
Comment 6 Marius Ungureanu 2014-10-07 06:48:20 UTC
Closing this.