Создание приложения .NET4 с RavenDB с использованием Mono 2.10.8. Когда я пытаюсь что-либо сделать со встроенным хранилищем документов в OSX, я получаю следующее исключение:
System.NotSupportedException: This platform is not supported
at System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties () [0x00000] in <filename unknown>:0
at Raven.Database.Util.PortUtil.FindPort () [0x00000] in <filename unknown>:0
at Raven.Database.Util.PortUtil.GetPort (System.String portStr) [0x00000] in <filename unknown>:0
at Raven.Database.Config.InMemoryRavenConfiguration.Initialize () [0x00000] in <filename unknown>:0
at Raven.Database.Config.RavenConfiguration.LoadConfigurationAndInitialize (IEnumerable`1 values) [0x00000] in <filename unknown>:0
at Raven.Database.Config.RavenConfiguration..ctor () [0x00000] in <filename unknown>:0
at Raven.Client.Embedded.EmbeddableDocumentStore.get_Configuration () [0x00000] in <filename unknown>:0
С самого начала я пытаюсь открыть встроенный магазин и использовать его. Я посмотрел на источник для реализации Mono IPGlobalProperties.GetIPGlobalProperties()
и обнаружил:
public static IPGlobalProperties GetIPGlobalProperties ()
{
PlatformID platform = Environment.OSVersion.Platform;
if (platform != PlatformID.Unix)
{
return new Win32IPGlobalProperties();
}
if (Directory.Exists ("/proc"))
{
MibIPGlobalProperties mibIPGlobalProperties = new MibIPGlobalProperties ("/proc");
if (File.Exists (mibIPGlobalProperties.StatisticsFile))
{
return mibIPGlobalProperties;
}
}
if (Directory.Exists ("/usr/compat/linux/proc"))
{
MibIPGlobalProperties mibIPGlobalProperties = new MibIPGlobalProperties ("/usr/compat/linux/proc");
if (File.Exists (mibIPGlobalProperties.StatisticsFile))
{
return mibIPGlobalProperties;
}
}
throw new NotSupportedException ("This platform is not supported");
}
Теперь я все еще изучаю все тонкости конфигурации системы OSX (я всю жизнь был парнем в Windows), но я почти уверен, что не сделал ничего глупого с конфигурацией моей системы. Что говорит мне, что либо никогда никогда не будет работать в OSX в текущей реализации Mono, либо у меня есть большое слепое пятно. Последнее кажется более вероятным, так что помогите мне:)