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

Notifications

Announcements

No record found.

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
    2,963 Super User 2025 Season 2 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,710 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans