<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="Pagesp" value="https://our_custom_feed_repository" />
</packageSources>
</configuration>
不确定为什么,但是管道停止在dotnet发布步骤上工作。此步骤的YAML看起来像这样:
#Your build pipeline references an undefined variable named ‘BuildConfiguration’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet publish '
inputs:
command: publish
publishWebProjects: false
projects: |
./project1.csproj
./project2.csproj
arguments: '-c $(BuildConfiguration) -o $(Build.ArtifactStagingDirectory) --self-contained -r win-x64'
verbosityRestore: Detailed
verbosityPack: Detailed
日志显示Dotnet Publish试图从我们的Nuget Feed到Microsoft.netcore.app.runtime.win-x64,而不是从官方中获取它:
025-02-05T16:56:40.0184221Z Retrying 'FindPackagesByIdAsyncCore' for source 'https://our_custom_feed_repository/nuget/FindPackagesById()?id='Microsoft.NETCore.App.Runtime.win-x64'&semVerLevel=2.0.0'.
2025-02-05T16:56:40.0189364Z Response status code does not indicate success: 401 (Unauthorized).
任何有关发生了什么事的线索?
thanks.
在您的描述上,您的
dotnet restore
似乎努力从您的预期来源检索包装,但是
dotnet publish