【发布时间】:2019-06-28 17:01:15
【问题描述】:
我正在尝试使用启动任务在 azure 批处理节点上安装 .net core 2.2?我在启动任务中尝试使用的命令如下:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Runtime dotnet -Version 2.2.5"
启动任务失败。此外,如果我在节点上手动运行脚本,它不会安装 .net core sdk。
有什么帮助吗?
【问题讨论】:
-
您可以在批处理帐户的应用程序包中手动添加.net核心设置,然后添加启动任务以静默/安静地安装dotnet核心,并为启动任务提供应用程序包。另一种解决方法是,您可以在存储容器中添加 .net 核心设置,并获取 Blob 源(包括 SAS 令牌)和路径的完整 uri,并将其作为
-ResourceFile提供给启动任务以安装 .net 核心。安静安装模式:dotnet-runtime-2.2.5-win-x64.exe -q
标签: .net .net-core azure-batch