Я пытаюсь использовать IPrincipal в dnxcore50. Хотя он отлично работает в Windows, я получаю следующую ошибку при запуске dotnet restore
в OS X:
Не удалось разрешить System.Security.Principal (>= 4.0.1-rc3-23829) для DNXCore, версия = v5.0 (osx.10.11-x64).
Мой project.json
выглядит так:
{
"version": "0.1.3-*",
"compilationOptions": {
"emitEntryPoint": false
},
"compile": "*.cs",
"exclude": "Platform/**/*.cs",
"frameworks": {
"net45": {
"include": "Platform/DotNet45/*.cs",
"frameworkAssemblies": {
"System.Xml": "4.0.0.0",
"System.Xml.Linq": "4.0.0.0",
"System.Xml.XDocument": "4.0.0.0"
}
},
"dnxcore50": {
"include": "Platform/DotNetCore/*.cs",
"dependencies": {
"NETStandard.Library": "1.0.0-rc3-23829",
"System.Security.Principal": "4.0.1-beta-23516",
"System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-23225",
"System.Security.Cryptography.X509Certificates": "4.0.0-rc3-23829",
"System.Xml.XDocument": "4.0.11-rc3-23829",
"System.Xml.XmlSerializer": "4.0.11-rc3-23829"
}
}
}
}
Кажется, что System.Security.Principal доступен только на платформе Windows, но концепция IPrincipal мне тоже кажется довольно общей. Страница NuGet (https://www.nuget.org/packages/System.Security.Principal/4.0.1-beta-23516) также не указывает dnxcore50 в качестве зависимости, а указывает только «старые» платформы .NET.