web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Task is deprecated. Please switch to using NuGetCommand@2's 'restore' or 'custom' option

(2) ShareShare
ReportReport
Posted on by 162
Hi 
I had created a custom pipeline using this Link. It used to run successfully but now I am getting the error of -Task is deprecated. Please switch to using NuGetCommand@2's 'restore' or 'custom' option. Tried many things but couldn't resolve. Let me know if anyone has any idea or faced this error. 
 
I have the same question (0)
  • Suggested answer
    Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    You can refer to this official document: Deprecation announcement for NuGet Restore v1 and NuGet Installer v0 pipeline tasks | Microsoft LearnWith this update, we are announcing the upcoming deprecation of NuGet Restore v1 and NuGet Installer v0 pipeline tasks. Promptly transition to the NuGetCommand@2 pipeline task to avoid build failure starting on November 27, 2023.
    Best regards,
    Keivn
  • Harshal Jain Profile Picture
    162 on at
    HI Kevin,
    So I tried the method written in the link but faced another error. Let me know if you have any solution for that - 
     
     
     
    Error - 
     
  • Suggested answer
    Anthony Blake Profile Picture
    3,092 Super User 2026 Season 1 on at
    Hi,
     
    Microsoft's samples have been updated to use Nuget 2 - maybe create a new pipeline from the samples provided, or import a sample so you can compare the parameters side-by-side with your existing pipeline. 
     
     
     
  • Harshal Jain Profile Picture
    162 on at
    Hi Anthony,
    Thanks for the link. I was able to import the pipeline and now got another error. I imported the pipeline from this link , but getting this error now . Please help. Not able to resolve this. 
     
  • Suggested answer
    Sukrut Parab Profile Picture
    71,735 Moderator on at
    Just change the task version to 2.* and in command arguments put below command  in your original pipeline. 
     
    install -NonInteractive $(NugetConfigsPath)\packages$(D365Version).config -ConfigFile $(NugetConfigsPath)\nuget.config -Verbosity Detailed -ExcludeVersion -OutputDirectory "$(NugetsPath)"
  • Harshal Jain Profile Picture
    162 on at
    Hi Sukrut,
    I did the same but got this error - 
     
     
    I used this in cusmtom command - 
    install -Noninteractive $/XXX/Trunk/Main/BuildAutomation/packages.config -ConfigFile $/XXX/Trunk/Main/BuildAutomation/nuget.config -Verbosity Detailed -ExcludeVersion -OutputDirectory "$(NugetsPath)\$(ToolsPackage)\DevAlm"
     
    While the path of nugets and packages are this 
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 659

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 465 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 304 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans