microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.51k stars 2.62k forks source link

[BUG]: Azure pipeline - Failed on Error NU1301 after upgrade Azure Function #20645

Closed petrkasnal closed 1 week ago

petrkasnal commented 1 week ago

New issue checklist

Task name

DotNetCoreCLI@2

Task version

No response

Issue Description

Hello, I have the following error in Azure Pipelines. The error occurred after I updated the packages for Azure Function. The local build works normally and I don't know what to do about it. I use public org and us private feed, but I don't think it should be because of that.

If I do a downgrade, I lose the ability to use Aspire which was a lot of work.

Please does anyone know what to do about this error? Thank you

Use packages:

<PackageReference Include="Aspire.Azure.Data.Tables" Version="8.2.2" />
<PackageReference Include="Aspire.Azure.Storage.Blobs" Version="8.2.2" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Timer" Version="4.3.0" />
<PackageReference Include="MassTransit.WebJobs.ServiceBus" Version="8.2.1" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0-preview5" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.0-preview4" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0-preview2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />

NuGet.config:

<configuration>
  <packageSources>
    <clear />
    <add key="My_Packages" value="https://pkgs.dev.azure.com/myorg/_packaging/My_Packages/nuget/v3/index.json" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
  <activePackageSource>
    <add key="All" value="(Aggregate source)" />
  </activePackageSource>
</configuration>

Pipeline:

- task: DotNetCoreCLI@2
  displayName: Nuget restore
  inputs:
    command: 'restore'
    projects: '${{ parameters.solution }}'
    feedsToUse: 'config'
    nugetConfigPath: 'NuGet.config'
    includeNuGetOrg: true

- task: DotNetCoreCLI@2
  displayName: Build
  inputs:
    command: 'build'
    projects: ${{ parameters.projects }}
    arguments: '--no-restore --configuration ${{ parameters.buildConfiguration }} /p:Version=100.4'
    versioningScheme: byBuildNumber 

Error log:

2024-11-12T06:36:48.1297294Z   myorgInfrastructure -> /home/vsts/work/1/s/Src/myorgInfrastructure/bin/Release/net8.0/myorgInfrastructure.dll
2024-11-12T06:36:55.2336149Z   Determining projects to restore...
2024-11-12T06:36:57.9162767Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
2024-11-12T06:36:57.9163651Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:57.9250962Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
2024-11-12T06:36:57.9251813Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:57.9253330Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:36:57.9254398Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:57.9255212Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:36:57.9260999Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:57.9281383Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
2024-11-12T06:36:57.9282806Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:58.9885054Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
2024-11-12T06:36:58.9886570Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:59.0646797Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
2024-11-12T06:36:59.0648166Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:59.0707665Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:36:59.0708533Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:59.1675081Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
2024-11-12T06:36:59.1676152Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:36:59.1716437Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:36:59.1717367Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:00.0717310Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
2024-11-12T06:37:00.0718455Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:00.1428853Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
2024-11-12T06:37:00.1430092Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:00.2077721Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:37:00.2079688Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:00.2772441Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:37:00.2775145Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:00.4521794Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
2024-11-12T06:37:00.4522688Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:01.2872482Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
2024-11-12T06:37:01.2873981Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:01.3455990Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:37:01.3456511Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:01.3719845Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
2024-11-12T06:37:01.3727381Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:01.4158704Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:37:01.4159469Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:01.5651481Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
2024-11-12T06:37:01.5652026Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:02.3949763Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:37:02.3950563Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:02.4882168Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
2024-11-12T06:37:02.4883055Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:02.5235787Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
2024-11-12T06:37:02.5236397Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:02.6047936Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:37:02.6048789Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:02.7220818Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
2024-11-12T06:37:02.7243458Z   Response status code does not indicate success: 401 (Unauthorized).
2024-11-12T06:37:03.5280452Z ##[error]Src/myorgFunctionApp/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
2024-11-12T06:37:03.5283254Z /home/vsts/work/1/s/Src/myorgFunctionApp/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.[fulllog.log](https://github.com/user-attachments/files/17712338/fulllog.log)

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

ubuntu-latest

Relevant log output

2024-11-12T06:36:48.1297294Z   myorgInfrastructure -> /home/vsts/work/1/s/Src/myorgInfrastructure/bin/Release/net8.0/myorgInfrastructure.dll
    2024-11-12T06:36:55.2336149Z   Determining projects to restore...
    2024-11-12T06:36:57.9162767Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
    2024-11-12T06:36:57.9163651Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:57.9250962Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
    2024-11-12T06:36:57.9251813Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:57.9253330Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:36:57.9254398Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:57.9255212Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:36:57.9260999Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:57.9281383Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
    2024-11-12T06:36:57.9282806Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:58.9885054Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
    2024-11-12T06:36:58.9886570Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:59.0646797Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
    2024-11-12T06:36:59.0648166Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:59.0707665Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:36:59.0708533Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:59.1675081Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
    2024-11-12T06:36:59.1676152Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:36:59.1716437Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:36:59.1717367Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:00.0717310Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
    2024-11-12T06:37:00.0718455Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:00.1428853Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
    2024-11-12T06:37:00.1430092Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:00.2077721Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:37:00.2079688Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:00.2772441Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:37:00.2775145Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:00.4521794Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
    2024-11-12T06:37:00.4522688Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:01.2872482Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
    2024-11-12T06:37:01.2873981Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:01.3455990Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:37:01.3456511Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:01.3719845Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
    2024-11-12T06:37:01.3727381Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:01.4158704Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:37:01.4159469Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:01.5651481Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
    2024-11-12T06:37:01.5652026Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:02.3949763Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:37:02.3950563Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:02.4882168Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.netcore.targets/index.json'.
    2024-11-12T06:37:02.4883055Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:02.5235787Z   Failed to download package 'Microsoft.NETCore.Targets.3.0.0' from 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.netcore.targets/3.0.0/microsoft.netcore.targets.3.0.0.nupkg'.
    2024-11-12T06:37:02.5236397Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:02.6047936Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/af41060d-f5f5-4667-8078-42f88f984727/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:37:02.6048789Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:02.7220818Z   Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.azure.webjobs.extensions.servicebus/index.json'.
    2024-11-12T06:37:02.7243458Z   Response status code does not indicate success: 401 (Unauthorized).
    2024-11-12T06:37:03.5280452Z ##[error]Src/myorgFunctionApp/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj(0,0): Error NU1301: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.
    2024-11-12T06:37:03.5283254Z /home/vsts/work/1/s/Src/myorgFunctionApp/obj/Release/net8.0/WorkerExtensions/WorkerExtensions.csproj : error NU1301: Failed to retrieve information about 'Microsoft.NET.Sdk.Functions' from remote source 'https://pkgs.dev.azure.com/myorg/f433b8a7-a701-48e9-b916-e4ac90fa6b4b/_packaging/036f3e9a-7104-43cd-bed3-406a8f5ec881/nuget/v3/flat2/microsoft.net.sdk.functions/index.json'.[fulllog.log](https://github.com/user-attachments/files/17712338/fulllog.log)

Full task logs with system.debug enabled

fulllog.log

Repro steps

- task: DotNetCoreCLI@2
          displayName: Nuget restore
          inputs:
            command: 'restore'
            projects: '${{ parameters.solution }}'
            feedsToUse: 'config'
            nugetConfigPath: 'NuGet.config'
            includeNuGetOrg: true

        - task: DotNetCoreCLI@2
          displayName: Build
          inputs:
            command: 'build'
            projects: ${{ parameters.projects }}
            arguments: '--no-restore --configuration ${{ parameters.buildConfiguration }} /p:Version=100.4'
            versioningScheme: byBuildNumber
petrkasnal commented 1 week ago

Sorry just add authenticate step.

steps:
- task: NuGetAuthenticate@1
  displayName: 'NuGet Authenticate'