"dotnet restore" Azure DocumentDB 模拟器示例项目失败
"dotnet restore" fails for Azure DocumentDB emulator sample project
我只想尝试同一个项目来与几周前发布的 DocumentDB 模拟器的本地实例进行通信。我已经安装了 dotnet core 和 dotnet core CLI。
- 从https://docs.microsoft.com/en-us/azure/documentdb/documentdb-nosql-local-emulator
下载模拟器
- 安装模拟器(只需几秒钟)
- 为模拟器启动了一个浏览器,它现在可以工作了。
- 单击 link 下载示例 dotnet 核心项目
- 提取文件,在 VS2015 中打开并构建。这失败了。
我认为我在 VS2015 中的工具可能已经过时,所以我安装了来自 https://www.microsoft.com/net/core#windowsvs2015 的名为“.NET Core 1.0.1 工具预览版 2”的最新工具,但无济于事。仍然失败。
运行 dotnet restore
从命令行给出与 VS2015 相同的错误,即:
C:\repos\quickstart-dotnetcore [(unknown)]> dotnet --version
1.0.0-preview2-003131
C:\repos\quickstart-dotnetcore [(unknown)]> dotnet restore
log : Restoring packages for C:\repos\quickstart-dotnetcore\project.json...
error: Unable to resolve 'Microsoft.Azure.Documents.Client (>= 0.1.0)' for '.NETCoreApp,Version=v1.0'.
log : Restoring packages for tool 'BundlerMinifier.Core' in C:\repos\quickstart-dotnetcore\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in C:\repos\quickstart-dotnetcore\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in C:\repos\quickstart-dotnetcore\project.json...
log : Lock file has not changed. Skipping lock file write. Path: C:\repos\quickstart-dotnetcore\project.lock.json
log : C:\repos\quickstart-dotnetcore\project.json
log : Restore failed in 1948ms.
Errors in C:\repos\quickstart-dotnetcore\project.json
Unable to resolve 'Microsoft.Azure.Documents.Client (>= 0.1.0)' for '.NETCoreApp,Version=v1.0'.
谷歌搜索给出了带有 NuGet 配置建议的结果,但我不确定这个 Microsoft.Azure.Documents.Client
的实际位置。在什么包源上?如果我查看 VS2015,目前我正在使用这个包源:https://api.nuget.org/v3/index.json
在project.json
,请更新
"Microsoft.Azure.Documents.Client" : "0.1.0"
至
"Microsoft.Azure.DocumentDB.Core": "*"
示例中的 DocumentDB .NET Core SDK 包名称不正确。我们正在努力解决这个问题。
current/latest版本为1.0.0,但如果您如上指定*,将确保下载最新版本。
我只想尝试同一个项目来与几周前发布的 DocumentDB 模拟器的本地实例进行通信。我已经安装了 dotnet core 和 dotnet core CLI。
- 从https://docs.microsoft.com/en-us/azure/documentdb/documentdb-nosql-local-emulator 下载模拟器
- 安装模拟器(只需几秒钟)
- 为模拟器启动了一个浏览器,它现在可以工作了。
- 单击 link 下载示例 dotnet 核心项目
- 提取文件,在 VS2015 中打开并构建。这失败了。
我认为我在 VS2015 中的工具可能已经过时,所以我安装了来自 https://www.microsoft.com/net/core#windowsvs2015 的名为“.NET Core 1.0.1 工具预览版 2”的最新工具,但无济于事。仍然失败。
运行 dotnet restore
从命令行给出与 VS2015 相同的错误,即:
C:\repos\quickstart-dotnetcore [(unknown)]> dotnet --version
1.0.0-preview2-003131
C:\repos\quickstart-dotnetcore [(unknown)]> dotnet restore
log : Restoring packages for C:\repos\quickstart-dotnetcore\project.json...
error: Unable to resolve 'Microsoft.Azure.Documents.Client (>= 0.1.0)' for '.NETCoreApp,Version=v1.0'.
log : Restoring packages for tool 'BundlerMinifier.Core' in C:\repos\quickstart-dotnetcore\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in C:\repos\quickstart-dotnetcore\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in C:\repos\quickstart-dotnetcore\project.json...
log : Lock file has not changed. Skipping lock file write. Path: C:\repos\quickstart-dotnetcore\project.lock.json
log : C:\repos\quickstart-dotnetcore\project.json
log : Restore failed in 1948ms.
Errors in C:\repos\quickstart-dotnetcore\project.json
Unable to resolve 'Microsoft.Azure.Documents.Client (>= 0.1.0)' for '.NETCoreApp,Version=v1.0'.
谷歌搜索给出了带有 NuGet 配置建议的结果,但我不确定这个 Microsoft.Azure.Documents.Client
的实际位置。在什么包源上?如果我查看 VS2015,目前我正在使用这个包源:https://api.nuget.org/v3/index.json
在project.json
,请更新
"Microsoft.Azure.Documents.Client" : "0.1.0"
至
"Microsoft.Azure.DocumentDB.Core": "*"
示例中的 DocumentDB .NET Core SDK 包名称不正确。我们正在努力解决这个问题。
current/latest版本为1.0.0,但如果您如上指定*,将确保下载最新版本。