首页新闻找找看学习计划

[.NET Core]mac上运行dotnet new出错

0
悬赏园豆:20 [已解决问题] 解决于 2016-06-28 10:02

在mac上安装最新的.NET Core 1.0,运行dotnet new命令出现如下的错误:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Crypto' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CryptoInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native': The specified module could not be found.
 (Exception from HRESULT: 0x8007007E)
   at Interop.CryptoInitializer.EnsureOpenSslInitialized()
   at Interop.CryptoInitializer..cctor()
   --- End of inner exception stack trace ---
   at Interop.Crypto..cctor()
   --- End of inner exception stack trace ---
   at Interop.Crypto.GetRandomBytes(Byte* buf, Int32 num)
   at System.IO.Path.GetCryptoRandomBytes(Byte* bytes, Int32 byteCount)
   at System.IO.Path.GetRandomFileName()
   at Microsoft.DotNet.InternalAbstractions.TemporaryDirectory..ctor()
   at Microsoft.Extensions.EnvironmentAbstractions.DirectoryWrapper.CreateTemporaryDirectory()
   at Microsoft.DotNet.Configurer.NuGetPackagesArchiver..ctor()
   at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(INuGetCacheSentinel nugetCacheSentinel)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
dudu的主页 dudu | 高人七级 | 园豆:39851
提问于:2016-06-28 09:21
< >
分享
最佳答案
1

运行 brew link --force openssl 命令后解决

dudu | 高人七级 |园豆:39851 | 2016-06-28 09:56
其他回答(1)
0

up

收获园豆:20
Daniel Cai | 园豆:10374 (专家六级) | 2016-06-28 09:57
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册