我正在尝试构建一个安装单声道并运行 .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>