【发布时间】: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 mono或dnvm install latest -r mono -
-r是-Runtime的缩写,它允许您指定要安装的运行时风格。请参阅dnvm help upgrade(或install)了解更多信息。 -
似乎不起作用
-
看起来那台机器上没有安装单声道。
标签: .net mono asp.net-core dnvm