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

Run Pipelines failed with NuGet issue

(1) ShareShare
ReportReport
Posted on by 138
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
    André Arnaud de Calavon Profile Picture
    308,247 Super User 2026 Season 2 on at
    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
  • Suggested answer
    Anthony Blake Profile Picture
    3,317 Super User 2026 Season 2 on at
    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:
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 265 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 215

#3
Subra Profile Picture

Subra 177 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans