[英]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.