简体   繁体   English

无法找到版本为 (>= 3.1.0) 的 package Microsoft.NETCore.App

[英]Unable to find package Microsoft.NETCore.App with version (>= 3.1.0)

I have .NET Core SDK 3.1.200 installed on my local machine.我在本地机器上安装了 .NET Core SDK 3.1.200。 I create a Asp.Net Core app (using Visual Studio) targeting netcoreapp3.1 .我创建了一个针对netcoreapp3.1的 Asp.Net Core 应用程序(使用 Visual Studio)。 I test it and it works fine.我测试了它,它工作正常。 But when I commit it to CI the build fails to get the nuget package:但是当我将它提交给 CI 时,构建无法获得 nuget package:

##[error]The nuget command failed with exit code(1) and error(NU1102: Unable to find package Microsoft.NETCore.App with version (>= 3.1.0)
  - Found 81 version(s) in MyGet [ Nearest version: 3.0.0-preview8-28405-07 ]
  - Found 73 version(s) in NuGet [ Nearest version: 2.2.8 ]

.NET Core 3.1 was released in December 2019 so why is the package not on nuget? .NET Core 3.1 于 2019 年 12 月发布,那么为什么 package 不在 nuget 上? What am I missing?我错过了什么?

Update更新

The CI is Azure Devops Pilelines and the agents are Windows machines that have Visual Studio 2017 installed. CI 是 Azure Devops Pilelines,代理是 Windows 安装了 Visual Studio 2017 的机器。 .Net core sdk 3.1 is not installed on the agents .Net core sdk 3.1 未安装代理

Method 1: Add the following task in your yaml方法一:在你的yaml中添加如下任务

steps:
- task: UseDotNet@2
  displayName: 'Use .Net Core sdk 3.1.x'
  inputs:
    version: 3.1.x

Method 2:方法二:

If using template editor, add Use.Net Core task and provide the version over there如果使用模板编辑器,请添加Use.Net Core任务并提供那边的版本

Note: Make sure this should be the first task of the pipeline configured注意:确保这应该是配置管道的第一个任务

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在VS 2015中还原Microsoft.netcore.app依赖关系(未解决) - Microsoft.netcore.app Dependency unable to be restored in VS 2015 (not resolved) Docker:找不到框架“Microsoft.WindowsDesktop.App”,版本“3.1.0”(x64) - Docker: The framework 'Microsoft.WindowsDesktop.App', version '3.1.0' (x64) was not found 无法找到包 Microsoft.AspNetCore.Blazor.Templates。 没有包存在 - Unable to find package Microsoft.AspNetCore.Blazor.Templates. No packages exist NuGet jQuery更新-无法找到'Microsoft.ScriptManager.jQuery'的版本 - NuGet jQuery Update - Unable to find a version of 'Microsoft.ScriptManager.jQuery' 无法将NuGet软件包“Microsoft ASP.NET MVC”从版本4.0.20710.0更新到5.1.2 - Unable to update NuGet package “Microsoft ASP.NET MVC” from version 4.0.20710.0 to 5.1.2 无法安装nuget软件包Microsoft.AspNet.Identity.Owin-版本2.1.0 - Unable to install nuget package Microsoft.AspNet.Identity.Owin -Version 2.1.0 找不到“NETCore.App”,版本“1.0.0-rc2-3002702” - 'NETCore.App', version '1.0.0-rc2-3002702' was not found 无法从Nuget程序包管理器的Asp.net MVC 4.5版本中添加程序包Microsoft.Owin.Host.SystemWeb - Unable to add package Microsoft.Owin.Host.SystemWeb in Asp.net MVC 4.5 version from Nuget package manager 将 NETCore 应用程序更新为 AspNetCore 应用程序 - Updating a NETCore app to an AspNetCore app 软件包'Microsoft.PortableLibrary.TargetingPack.Msi,version = 15.0.26228.0'无法安装 - Package 'Microsoft.PortableLibrary.TargetingPack.Msi,version=15.0.26228.0' failed to install
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM