0

mono をインストールして .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 の 2 つの異なるバージョンを試したので、バージョン固有ではないと思います...

私は何を間違っていますか?

アップデート:

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>
4

1 に答える 1

1

mono410インストールで受け入れられる値ではありません。あなたは何をしようとしているのですか?

dnxまた、上記のコマンドは Mono 自体ではなく Monoのみを表示するため、mono がインストールされていることを確認してください。

ただし、Windows で実行しているため、.NET を使用して mono ランタイムをインストールすることはできませんdnvm。すでにこれを追跡するアイテムがあり、PR は審査中です。おそらくすぐに統合されるでしょう。

于 2015-07-22T15:55:12.577 に答える