January 26, 2021 at 15:39
filed under Dynamics 365
Tagged Builds, D365, Devops, NuGet
Hi everyone,
I was setting up a build for Dynamics 365 F&O using the following guide: Azure hosted build for Dynamics 365 Finance & SCM and ran into the following error on the build solution step:
Error MSB4019: The imported project Microsoft.Dynamics.Framework.Tools.BuildTasks.targets was not found. Confirm that the path in the
declaration is correct, and that the file exists on disk.
Digging a bit deeper, it was already going wrong in the NuGet install Packages step with errors like the following:
Feeds used:
D:\a\11\s\Build\6ba2d33f-0920-4785-8d8e-1234567890/_packaging/FeedD365/nuget/v3/index.jsonRestoring NuGet package Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp.7.0.5816.35654.
Restoring NuGet package Microsoft.Dynamics.AX.Application.DevALM.BuildXpp.10.0.644.10018.
WARNING: Unable to find version ‘10.0.644.10018’ of package ‘Microsoft.Dynamics.AX.Application.DevALM.BuildXpp’.
D:\a\11\s\Build\6ba2d33f-0920-4785-8d8e-1234567890/_packaging/FeedD365/nuget/v3/index.json: Package ‘Microsoft.Dynamics.AX.Application.DevALM.BuildXpp.10.0.644.10018’ is not found on source ‘D:\a\11\s\Build\6ba2d33f-0920-4785-8d8e-1234567890/_packaging/FeedD365/nuget/v3/index.json’.Restoring NuGet package Microsoft.Dynamics.AX.Platform.CompilerPackage.7.0.5816.35654.
WARNING: Unable to find version ‘7.0.5816.35654’ of package ‘Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp’.
D:\a\11\s\Build\6ba2d33f-0920-4785-8d8e-1234567890/_packaging/FeedD365/nuget/v3/index.json: Package ‘Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp.7.0.5816.35654’ is not found on source ‘D:\a\11\s\Build\6ba2d33f-0920-4785-8d8e-1234567890/_packaging/FeedD365/nuget/v3/index.json’.WARNING: Unable to find version ‘7.0.5816.35654’ of package ‘Microsoft.Dynamics.AX.Platform.CompilerPackage’.
D:\a\11\s\Build\6ba2d33f-0920-4785-8d8e-1234567890/_packaging/FeedD365/nuget/v3/index.json: Package ‘Microsoft.Dynamics.AX.Platform.CompilerPackage.7.0.5816.35654’ is not found on source ‘D:\a\11\s\Build\6ba2d33f-0920-4785-8d8e-1234567890/_packaging/FeedD365/nuget/v3/index.json’.
The error was in the nuget.config file, that should point to the correct feed. For some reason the path was missing, causing the error.
The incorrect file was:
The corrected file:
The correct contents of this file for your project and feed can be retrieved when you go to you DevOps project > Artifacts > [Select your feed] > Connect to Feed > NuGet.exe.
no comments
RSS / trackback