【问题标题】:dnvm install Monodnvm 安装单声道
【发布时间】:2015-07-22 13:23:58
【问题描述】:

我正在尝试构建一个安装单声道并运行 .NET 应用程序的 Docker 映像。

我基本上遵循关于如何为 ASP .NET 5 构建 Docker 映像的标准指南,但想使用 Mono 作为本机主机(这样我就可以利用非 CoreCLR dll)。

但是,在大门外,这失败了:

D:\>dnvm install mono410
Downloading dnx-clr-win-x86.mono410 from https://www.nuget.org/api/v2
Unable to download package: The remote server returned an error: (400) Bad Request.
At C:\Users\user.dnx\bin\dnvm.ps1:560 char:13
+             throw "Unable to download package: {0}" -f $Global:downloadData.Erro ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Unable to downl...0) Bad Request.:String) [], RuntimeException
    + FullyQualifiedErrorId : Unable to download package: The remote server returned an error: (400) Bad Request.


D:\>dnvm install mono402
Downloading dnx-clr-win-x86.mono402 from https://www.nuget.org/api/v2
Unable to download package: The remote server returned an error: (400) Bad Request.
At C:\Users\user\.dnx\bin\dnvm.ps1:560 char:13
+             throw "Unable to download package: {0}" -f $Global:downloadData.Erro ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Unable to downl...0) Bad Request.:String) [], RuntimeException
    + FullyQualifiedErrorId : Unable to download package: The remote server returned an error: (400) Bad Request.

如您所见,我尝试了两个不同版本的 Mono,所以我认为它不是特定于版本的......

我做错了什么?

更新:

C:\Program Files (x86)\Mono\bin>dnvm upgrade -r mono
Invoke-Command : Cannot validate argument on parameter 'Runtime'. The argument "mono" does not belong to the set ",clr,coreclr" specified
by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.At
C:\Users\jnevins\.dnx\bin\dnvm.ps1:1487 char:9
+         Invoke-Command ([ScriptBlock]::Create("dnvm-$cmd $cmdargs"))
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand


C:\Program Files (x86)\Mono\bin>dnvm install -r mono
Invoke-Command : Cannot validate argument on parameter 'Runtime'. The argument "mono" does not belong to the set ",clr,coreclr" specified
by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.At
C:\Users\jnevins\.dnx\bin\dnvm.ps1:1487 char:9
+         Invoke-Command ([ScriptBlock]::Create("dnvm-$cmd $cmdargs"))
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand


C:\Program Files (x86)\Mono\bin>

【问题讨论】:

  • 试试dnvm upgrade -r monodnvm install latest -r mono
  • -r-Runtime 的缩写,它允许您指定要安装的运行时风格。请参阅dnvm help upgrade(或install)了解更多信息。
  • 似乎不起作用
  • 看起来那台机器上没有安装单声道。

标签: .net mono asp.net-core dnvm


【解决方案1】:

mono410 不是可接受的安装值。你想做什么?

另外,请确保您已安装单声道,因为上面的命令只为 Mono 带来 dnx,而不是 Mono 本身。

但是,由于您在 Windows 上运行,因此无法使用 dnvm 安装单声道运行时。我们已经有an item 跟踪这个和the PR is out for review。它可能很快就会被合并。

【讨论】:

  • 是否计划允许通过 dnvm 安装单声道,就像其他运行时版本一样?
  • 如果 dnvm install 有效,为什么我需要单独安装单声道?我现在有什么办法可以利用它吗?我需要它来进行 POC。谢谢
  • 当它起作用时,如果不是 mono410,dnvm install 的接受值是多少?
猜你喜欢
  • 2015-10-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-07-31
  • 2017-08-19
相关资源
最近更新 更多