Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
When building projects with the MSBuild build engine on Windows 8, MonoDevelop gets the following error from MSBuild:
Error MSB4185: The function "CurrentUICulture" on type "System.Globalization.CultureInfo" has not been enabled for execution.
This occurs on Windows 7 too.
Do you have .NET 4.7 / VS11 installed on Win7?
Yes (VS2012RC), that might be the difference from ordinal Win7.
My wild guess is that .NET 4.5's MSBuild.exe sets CurrentUICulture internally (we don't do that in MD) which requires SecurityPermissionAttribute(ControlThread = true), and we somehow launch it with insufficient privilege.
I am having the same problem on Windows 7. I tried uninstalling VS12 and re-installing monodevelop but the error remains.
@Michal, Uninstalling VS2012 does not uninstall .NET 4.5 (which replaced .NET 4.0). You will need to uninstall .NET 4.5 and then reinstall the .NET 4.0 run-time for MonoDevelop to work again. Well until a fix is released to add .NET 4.5's CurrentUICulture issue.
Thanks this worked for me.
As per the comments to this stackoverflow.com answer:
The MSB4185 error appears to be a .NET 4.5 bug, which may or may not be fixed quickly. The workaround is to migrate to using the Microsoft.Build.dll embedding API instead of using the Microsoft.Build.Engine.dll API (which is currently used).
Well, we already have one builder exe per MSBuild version, so we can make the 4.0 one use the new hosting API. However, this is complicated by the fact that Mono doesn't not have an implementation of the new hosting API.
Maybe we can add an additional builder exe that's only used when the target runtime is MS .NET 4.0+?
Fixed in master.