简体   繁体   English

dotnet publish 调用对 Azure devops 的意外调用

[英]dotnet publish invokes unexpected call to Azure devops

In response to this question I am typing为了回答这个问题,我正在输入

dotnet publish -r linux-x64

at the command line To my surprise dotnet tries to invoke one of my Azure build pipelines在命令行令我惊讶的是,dotnet 尝试调用我的 Azure 构建管道之一

My screen shows the following我的屏幕显示以下

C:\Users\kirst\source\repos\BlazorApp1>dotnet publish --runtime linux-x64 Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET Copyright (C) Microsoft Corporation. C:\Users\kirst\source\repos\BlazorApp1>dotnet publish --runtime linux-x64 Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET 版权所有 (C) Microsoft Corporation。 All rights reserved.版权所有。

Determining projects to restore... C:\Program Files\dotnet\sdk\5.0.101\NuGet.targets(131,5): error: Unable to load the service index for source https://pkgs.dev.azure.com/blahblah/nuget/v3/index.json . Determining projects to restore... C:\Program Files\dotnet\sdk\5.0.101\NuGet.targets(131,5): error: Unable to load the service index for source https://pkgs.dev.azure. com/blahblah/nuget/v3/index.json [C:\Users\kirst\source\repos\BlazorApp1\BlazorApp1.sln] C:\Program Files\dotnet\sdk\5.0.101\NuGet.targets(131,5): error: Response status code does not indicate success: 401 (Unauthorized). [C:\Users\kirst\source\repos\BlazorApp1\BlazorApp1.sln] C:\Program Files\dotnet\sdk\5.0.101\NuGet.targets(131,5):错误:响应状态码不表示成功:401(未经授权)。 [C:\Users\kirst\source\repos\BlazorApp1\BlazorApp1.sln] [C:\Users\kirst\source\repos\BlazorApp1\BlazorApp1.sln]

I don't use Azure Devops on this project, but I do for another project, and that pipeline started failing today.我没有在这个项目上使用 Azure Devops,但我在另一个项目中使用,并且该管道今天开始失败。

Why is the project trying to call devops?为什么该项目试图调用 devops?

The Publish profile is set to a folder发布配置文件设置为文件夹

发布个人资料

The reason for this is that you have defined blahblah as a NuGet package source somewhere, typically in global NuGet configuration (typically %appdata%\NuGet\NuGet.Config ).原因是您已将 blahblah 定义为 NuGet package 源代码,通常在全局 NuGet 配置中(通常为%appdata%\NuGet\NuGet.Config . It could also be that there is a NuGet config file somewhere in the parent folder to your project, as NuGet looks recursively for this file until it is found or until the root directory is hit.也可能是在您的项目的父文件夹中某处有一个 NuGet 配置文件,因为 NuGet 递归地查找此文件,直到找到它或直到找到根目录。 If the NuGet package source is defined in either of these, it will fail to restore packages as it can't know that the package(s) it seeks are not provided by that feed, thus restore fails.如果在其中任何一个中定义了 NuGet package 源,它将无法恢复包,因为它不知道它寻找的包不是由该提要提供的,因此恢复失败。

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

相关问题 Azure DevOps Build Pipeline:“publish”命令正在执行“dotnet build”而不是“dotnet publish” - Azure DevOps Build Pipeline: 'publish' command is executing 'dotnet build' instead of 'dotnet publish' 我可以在 Azure DevOps 中使用 dotnet publish 命令发布 .net 框架 4.7.1 解决方案吗 - Can I publish .net framework 4.7.1 solution with dotnet publish command in Azure DevOps 在 Azure DevOps 上运行 Playwright dotnet 测试 - Running Playwright dotnet tests on Azure DevOps Azure DevOps 管道 - dotnet restore Package 内容 Hash 验证失败 - Azure DevOps Pipeline - dotnet restore Package Content Hash Validation Fails Azure DevOps dotnet build 无权访问 nuget 包 - Azure DevOps dotnet build doesn't have access to nuget packages “dotnet publish”命令行会跳过部署到Azure Functions - The 'dotnet publish' command line skips deployment to Azure Functions dotnet 发布命令的 azure-pipelines.yml 中的转义空格 - Escape spaces in azure-pipelines.yml for the dotnet publish command 通过 build.cake 而不是 Azure Devops 发布构建工件 - Publish build artifact through build.cake instead of Azure Devops 将 .NET Core 项目的测试范围从 Azure DevOps 发布到 SonarCloud - Publish Test Coverage of .NET Core Project from Azure DevOps to SonarCloud 如何向同一个项目发布不同的解决方案(和存储库)? - How to publish different solutions (and repositories) to the same project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM