本文介绍了错误MSB4185:" System.Globalization.CultureInfo"尚未启用执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当试图建立在MonoDevelop中使用Mono Android版我得到这个错误。根据调试它不在我的code这样的IM留下无能。你知道吗?

解决方案

我自己的MSBuild(这code)。这是一个错误原产于文件microsoft.csharp.targets,作为错误消息可能说。在有一个属性函数:

$([System.Globalization.CultureInfo] :: CurrentUICulture.Name)

什么是错误的意思是,它认为这个功能在的MSBuild的安全名单。这些选择具有无副作用的功能。 (如果您想使用的任何功能,你必须有一个环境变量MSBUILDENABLEALLPROPERTYFUNCTIONS = 1)。

我真的不知道为什么会出现,除非在某种程度上你使用的是4.5 microsoft.csharp.targets与4.0 microsoft.build.dll(它没有它的安全列表)。我还没有收到这个报告,除非与MonoDevelop的连接。

请原谅我的幼稚,但我假设的MonoDevelop是使用Microsoft .NET Framework和微软的MSBuild而不是一个重新实现。

When trying to build in MonoDevelop with Mono for Android I get this error. According to the debug it is not located in my code so im left clueless. Any idea?

解决方案

I own MSBuild (and this code). It's an error originating in the file microsoft.csharp.targets, as the error message probably says. In there is a property function:

$([System.Globalization.CultureInfo]::CurrentUICulture.Name)

What the error means is that it thinks that this function isn't in MSBuild's "safe list". These are selected functions that have no side effects. (If you want to use any function, you must have an environment variable MSBUILDENABLEALLPROPERTYFUNCTIONS=1).

I really don't know why this would appear unless somehow you're using the 4.5 microsoft.csharp.targets with the 4.0 microsoft.build.dll (which didn't have it in the safe list). I haven't received reports of this except in connection with Monodevelop.

Excuse my naivety, but I'm assuming Monodevelop is using the Microsoft .NET Framework with the Microsoft MSBuild and not a reimplementation of that.

Dan

这篇关于错误MSB4185:" System.Globalization.CultureInfo"尚未启用执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 21:57