【发布时间】:2017-04-10 17:13:59
【问题描述】:
我正在尝试使用 .NET CORE 和 VSCode 在 Mac 上创建一个基本的 Web 应用程序 [没有成员资格和授权]。
使用
创建新项目后yo aspnet
命令我正在尝试恢复我的应用程序文件夹中的包,但我收到此错误:
log : Restoring packages for /Users/<user_name>/<app_name>/project.json...
error: Unable to load the service index for source https://api.nuget.org/v3/index.json.
error: The type initializer for 'System.Net.Http.CurlHandler' threw an exception.
error: The type initializer for 'Http' threw an exception.
error: The type initializer for 'HttpInitializer' threw an exception.
error: The type initializer for 'CryptoInitializer' threw an exception.
error: Unable to load DLL 'System.Security.Cryptography.Native.OpenSsl': The specified module could not be found.
error: (Exception from HRESULT: 0x8007007E)
Done: 1.
(我已经安装了所有依赖项和工具来在 mac 上执行 ASP.NET)
【问题讨论】:
-
删除该项目并首先使用
dotnet new创建一个用于测试的项目。过时的模板通常会导致错误。您还应该在此类问题中包含dotnet --version的输出,以便人们知道您使用的是哪个版本的 SDK。 -
您说您安装了工具,但您是否也安装了运行时只是为了确定?
Unable to load DLL 'System.Security.Cryptography.Native.OpenSsl': The specified module could not be found听起来更像是.NET Core 运行时没有正确安装 -
您是否按照.NET Core download page 中关于安装 OpenSSL 和创建符号链接的说明进行操作?
标签: asp.net-core nuget visual-studio-code .net-core macos-sierra