问题描述
好了,这是一个奇怪的。
Okay, this is a strange one.
我试图创建使用自定义文化:
I'm trying to create a custom culture using:
using System.Globalization;
...
var x = new CultureAndRegionInfoBuilder();
但我得到的讨厌红色ReSharper的误差带任何选项。
But I get the nasty red Resharper error with no options.
的类型或命名空间名称CultureAndRegionInfoBuilder没有命名空间存在'System.Globalization
The type or namespace name 'CultureAndRegionInfoBuilder' does not exist in the namespace 'System.Globalization'
这是怎么回事,我失去了一些东西?找不到谷歌的帮助......
What's going on, am I missing something? Can't find any help on google...
推荐答案
您需要添加一个引用 sysglobl.dll
。这已经是安装在GAC为 sysglobl
。
You need to add a reference to sysglobl.dll
. This is already installed in the GAC as sysglobl
.
对于未来的参考,如果你检查的MSDN页CultureAndRegionInfo你可以看到,它说
For future reference, if you check the MSDN page for CultureAndRegionInfo you can see that it says
命名空间: System.Globalization
大会: sysglobl
(在 sysglobl.dll
)
这个问题是在不同的程序集的命名空间可以为s $ P $垫(例如, System.Globalization.CultureInfo
居 mscorlib程序
)
The issue is that namespaces can be spread across different assemblies (for example, System.Globalization.CultureInfo
lives in mscorlib
.)
这篇关于CultureAndRegionInfoBuilder不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!