dnvm 安装单声道
dnvm install Mono
我正在尝试构建一个 Docker 安装单声道并运行 .NET 应用程序的映像。
我基本上遵循关于如何为 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>
mono410
不是可接受的安装值。你想做什么?
另外,确保你安装了单声道,因为上面的命令只为单声道带来 dnx
,而不是单声道本身。
但是,由于您在 Windows 上 运行,因此无法使用 dnvm
安装单声道运行时。我们已经 an item tracking this and the PR is out for review。它可能很快就会合并。
我正在尝试构建一个 Docker 安装单声道并运行 .NET 应用程序的映像。
我基本上遵循关于如何为 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>
mono410
不是可接受的安装值。你想做什么?
另外,确保你安装了单声道,因为上面的命令只为单声道带来 dnx
,而不是单声道本身。
但是,由于您在 Windows 上 运行,因此无法使用 dnvm
安装单声道运行时。我们已经 an item tracking this and the PR is out for review。它可能很快就会合并。