Skip to main content

Notifications

Community site session details

Community site session details

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

Run Pipelines failed with NuGet issue

(1) ShareShare
ReportReport
Posted on by 112
Hi, 

I'm encountering an issue with a 'DEV' pipeline run as described below.
I have no idea how to set the correct path parameter in this case. Can anyone provide me with a clue?

Many thanks.
 
1)#2024.05.03.101 (Failed)
- I run the pieline but get the error /Please switch to using NuGetCommand@2's 'restore' or 'custom'
- I changed NetGet from Task version 0.* to 2.*
 
2)#2024.05.03.102 (Failed)
- Error: The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory.
- I added NuGet tool installer and setup Task version with  1.* and version  6.9.1 to install
 
3)#2024.05.03.103 (Failed)
- Error: The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory.
- I Modify path to solution in NuGet page from '$(Build.SourcesDirectory)//Build//packages.config' to '**//*.sln'
 
4)#2024.05.03.104 (Failed)
- Error: The nuget command failed with exit code(1) and error(D://a//10//s//Build//Projects//DevBuild//Invoice//Invoice.rnrproj(37,3): error MSB4019: The imported project /C://Program Files (x86)//MSBuild//Microsoft//Dynamics//AX//Microsoft.Dynamics.Framework.Tools.BuildTasks.targets/ was not found. Confirm that the expression in the Import declaration /C://Program Files (x86)//MSBuild//Microsoft//Dynamics//AX//Microsoft.Dynamics.Framework.Tools.BuildTasks.targets/ is correct, and that the file exists on disk.
  • Suggested answer
    Anthony Blake Profile Picture
    2,357 Super User 2025 Season 1 on at
    Run Pipelines failed with NuGet issue
    What does your get sources step look like? 
     
    Have you got a "NuGet custom install packages" step?
     
    Import on of the blank samples from the github repo and compare them to your pipeline, it will probably be mapping dependency related:
     
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    294,002 Super User 2025 Season 1 on at
    Run Pipelines failed with NuGet issue
    Hi JoBox,

    Probably you can review your settings with guidance from Denis Trunin in his blog: Step-by-Step Guide: Creating D365FO Build and Deploy Pipelines | Denis Trunin's X++ Programming Blog

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,002 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,852 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans