Azure管道中非预览版ASP .NET Core 3的最新版本

问题描述 投票:0回答:3

在azure管道中安装.net core 3.0非预览版的命令是什么?

我尝试过

- task: DotNetCoreInstaller@0
  displayName: 'Install .net core 3.0'
  inputs:
    packageType: 'sdk'
    version: '3.0.100'

构建失败,并带有

Getting URL to download .NET Core sdk version: 3.0.100.

Could not fetch download information for version 3.0.100. Please check if the version specified is correct. You can refer the link for supported versions => https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/DotNetCoreInstallerV0/externals/releases.json. Falling back to creating convention based URL.

##[warning]Kindly upgrade to new major version of this task 'Use .NET Core (2.*)' for installing newer versions of .NET Core. '0.*' task version might not be able to download newer .NET core versions. To know more about 'Use Dot Net (2.*)', refer https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops. 3.0.100

在工作之前:

- task: DotNetCoreInstaller@0
  displayName: 'Install .net core 3.0 (preview)'
  inputs:
    packageType: 'sdk'
    version: '3.0.100-rc1-014190'
asp.net-core azure-pipelines
3个回答
0
投票

我测试了您的下载任务,它对我来说很好用。

但是,您可以尝试使用新的安装程序任务UseDotNet@2

- task: UseDotNet@2
  displayName: Install .NET Core 3.0 SDK
  inputs:
    packageType: 'sdk'
    version: '3.0.100'

0
投票

感谢您的回复。

此命令对我有用,但使用命令

  • 任务:UseDotNet @ 2

构建稍后在以下位置失败:

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'
##[error]The nuget command failed with exit code(1) and error(/usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0.  Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [/home/vsts/work/1/s/TaxiGestion/TaxiGestion.csproj]
/usr/lib/mono/msbuild/Current/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0.  Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [/home/vsts/work/1/s/TaxiGestionUnit/TaxiGestionUnit.csproj])
##[error]Packages failed to restore

池是ubuntu

pool:
  vmImage: 'ubuntu-latest'

0
投票

我在同一问题上感到震惊,但有不同的错误

enter image description here

这是我执行Powershell脚本的方式

$globaljson = '{"sdk": {"version": "3.0.100-preview3-010431"}}';
$globaljson | out-file $(Agent.ToolsDirectory)/dotnet2

这就是安装程序的调用方式。

enter image description here

不知道我在这里想念的是什么。

© www.soinside.com 2019 - 2024. All rights reserved.