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

Build automation that uses Microsoft-hosted agents and Azure Pipelines - How to get it working

(0) ShareShare
ReportReport
Posted on by 134

Hi


I'm trying to get a new Azure pipeline working - Based on the doc page: docs.microsoft.com/.../hosted-build-automation

It took me a little while to get the Nuget thing working, so if that is an issue for anyone, let me know and I will be happy to share.

on this doc page, there is a reference to a sample, but importing that sample doe not work - the following tasks have errors after import

'Get Sources', 'Update Model version', 'Create Deployable Package','Add licenses to Deployable Package'

Fixing the errors is seems straight forward but the reality is slightly different Slight smile
'Get sources', not and issue

'Update Model version'.... one have to delete the task, and add a new, but what is the correct parameters then?
Looking at the .json file, "$(MetadataPath)" is use, but the new task say $(Build.SourcesDirectory) - which is correct ?
'Create Deployable Package' - again one have to delete the task and create a new, using the parameters form the .json seems ok

'Add licenses to Deployable Package' - again one have to delete the task and create a new, using the parameters form the .json seems ok

Now.... when executing the pipeline I get the following error:

##[error]Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj(46,3):

Error MSB4019: The imported project "D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Any hints ?

Thanks

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Steen,

    Have you checked if you have correct version numbers for NuGet packages in packages.config file?

  • steen.rabol Profile Picture
    134 on at

    Hi Sergei,

    I'm using the latest packages from LCS

    here is my packages.config

    <?xml version="1.0" encoding="utf-8"?>
    <packages>
    <package id="Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp" version="7.0.5778.35626" targetFramework="net40" />
    <package id="Microsoft.Dynamics.AX.Application.DevALM.BuildXpp" version="10.0.605.10014" targetFramework="net40" />
    <package id="Microsoft.Dynamics.AX.Platform.CompilerPackage" version="7.0.5778.35626" targetFramework="net40" />
    </packages>

    Do I miss anything here ?

    the 3 packages is in my 'Artifacts' in the DevOps project

    Here is the complete log for the build step:

    2020-11-10T14:52:13.4317126Z ##[section]Starting: Build solution **\*.sln
    2020-11-10T14:52:13.4437859Z ==============================================================================
    2020-11-10T14:52:13.4438160Z Task         : Visual Studio build
    2020-11-10T14:52:13.4438459Z Description  : Build with MSBuild and set the Visual Studio version property
    2020-11-10T14:52:13.4438705Z Version      : 1.166.2
    2020-11-10T14:52:13.4438915Z Author       : Microsoft Corporation
    2020-11-10T14:52:13.4439230Z Help         : docs.microsoft.com/.../visual-studio-build
    2020-11-10T14:52:13.4439600Z ==============================================================================
    2020-11-10T14:52:14.7109177Z ##[command]"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,16.0) -latest -format json
    2020-11-10T14:52:15.9946437Z ##[command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1.sln" /nologo /nr:false /dl:CentralLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=c09d5258-1a18-45fc-8c1a-d9ac7a5a7984|SolutionDir=D:\a\8\s\Projects\FinanceOperations1"*ForwardingLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:BuildTasksDirectory="D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm" /p:MetadataDirectory="D:\a\8\s\Metadata" /p:FrameworkDirectory="D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage" /p:ReferenceFolder="D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp\ref\net40;D:\a\8\NuGets\Microsoft.Dynamics.AX.Application.DevALM.BuildXpp\ref\net40;D:\a\8\s\Metadata;D:\a\8\b" /p:ReferencePath="D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage" /p:OutputDirectory="D:\a\8\b" /p:VisualStudioVersion="15.0" /p:_MSDeployUserAgent="VSTS_d3955d1c-dac6-4232-9ce9-9ee57850db8c_build_2_0"
    2020-11-10T14:52:17.6850810Z Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
    2020-11-10T14:52:18.5696436Z Build started 11/10/2020 2:52:18 PM.
    2020-11-10T14:52:20.9847597Z Project "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1.sln" on node 1 (default targets).
    2020-11-10T14:52:20.9875532Z ValidateSolutionConfiguration:
    2020-11-10T14:52:20.9876124Z   Building solution configuration "Debug|Any CPU".
    2020-11-10T14:52:36.7170564Z ##[error]Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj(46,3): Error MSB4019: The imported project "D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    2020-11-10T14:52:36.7173454Z Project "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1.sln" (1) is building "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj" (2) on node 1 (default targets).
    2020-11-10T14:52:36.7175932Z D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj(46,3): error MSB4019: The imported project "D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    2020-11-10T14:52:36.7227404Z Done Building Project "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj" (default targets) -- FAILED.
    2020-11-10T14:52:36.7549140Z Done Building Project "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1.sln" (default targets) -- FAILED.
    2020-11-10T14:52:36.7773784Z 
    2020-11-10T14:52:36.7774966Z Build FAILED.
    2020-11-10T14:52:36.7807701Z 
    2020-11-10T14:52:36.7827185Z "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1.sln" (default target) (1) ->
    2020-11-10T14:52:36.7828683Z "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj" (default target) (2) ->
    2020-11-10T14:52:36.7830178Z   D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj(46,3): error MSB4019: The imported project "D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    2020-11-10T14:52:36.7831336Z 
    2020-11-10T14:52:36.7831771Z     0 Warning(s)
    2020-11-10T14:52:36.7832193Z     1 Error(s)
    2020-11-10T14:52:36.7845504Z 
    2020-11-10T14:52:36.7845747Z Time Elapsed 00:00:18.24
    2020-11-10T14:52:36.8898792Z ##[error]Process 'msbuild.exe' exited with code '1'.
    2020-11-10T14:52:36.9280752Z ##[section]Finishing: Build solution **\*.sln

    I have been able to find 1-2 references to this kind of error, but no solution.
    One is saying that it is an entry in the .rnrproj file
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Steen,

    Where did you find these versions? At least for 10.0.14 in PEAP project, there are only next versions

    
      
      
      
    

  • Suggested answer
    Luke Sha Profile Picture
    on at

    looks like the Nuget path is incorrect. If you copy value from sample Json file, please make sure you replace "\\" with "\".

  • steen.rabol Profile Picture
    134 on at

    From LCS: on the main page, 'Shared asset Library'->Nuget packages - first 3

    Screenshot-2020_2D00_11_2D00_11-at-07.25.02.png

    after download:

    Screenshot-2020_2D00_11_2D00_11-at-07.32.54.png

    The project is running v10.0.14, so I assumed that I needed the latest versions

  • steen.rabol Profile Picture
    134 on at

    Not really sure what you mean - sorry.

    in the Build task I have this:

    /p:BuildTasksDirectory="$(NugetsPath)\$(ToolsPackage)\DevAlm" /p:MetadataDirectory="$(MetadataPath)" /p:FrameworkDirectory="$(NuGetsPath)\$(ToolsPackage)" /p:ReferenceFolder="$(NuGetsPath)\$(PlatPackage)\ref\net40;$(NuGetsPath)\$(AppPackage)\ref\net40;$(MetadataPath);$(Build.BinariesDirectory)" /p:ReferencePath="$(NuGetsPath)\$(ToolsPackage)" /p:OutputDirectory="$(Build.BinariesDirectory)"

    There was a \\ in the 'Create deployable package' task, but that task does not 'fail' - does not generate any output as the build task fail so there is nothing to create

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Steen,

    Could you, please, share who your install NuGet step is set up? I now remember that I have a similar issue when I missed the argument "-ExcludeVersion" for NuGet install step.

  • steen.rabol Profile Picture
    134 on at

    Nuget install looks like this:

    7802.Screenshot-2020_2D00_11_2D00_11-at-10.21.08.png

    Here is my nuget.config

    
      
        
        
        
        
        
        
        
      
    

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Steen,

    Could you, please, also share raw logs from Nuget install step?

  • steen.rabol Profile Picture
    134 on at

    hmm... you might be on to something

    2020-11-11T11:29:32.2128212Z ==============================================================================
    2020-11-11T11:29:32.2128658Z Task         : NuGet Installer
    2020-11-11T11:29:32.2129150Z Description  : Installs or restores missing NuGet packages. Use NuGetAuthenticate@0 task for latest capabilities.
    2020-11-11T11:29:32.2129671Z Version      : 0.175.0
    2020-11-11T11:29:32.2130023Z Author       : Microsoft Corporation
    2020-11-11T11:29:32.2130345Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/package/nuget
    2020-11-11T11:29:32.2130709Z ==============================================================================
    2020-11-11T11:29:32.9770693Z SYSTEMVSSCONNECTION exists true
    2020-11-11T11:29:33.2057513Z SYSTEMVSSCONNECTION exists true
    2020-11-11T11:29:33.2717994Z [command]C:\windows\system32\chcp.com 65001
    2020-11-11T11:29:33.2808680Z Active code page: 65001
    2020-11-11T11:29:33.2898049Z Caching tool: NuGet 4.0.0 x64
    2020-11-11T11:29:33.3215560Z Found tool in cache: NuGet 4.0.0 x64
    2020-11-11T11:29:33.3293554Z ##[warning]Can\'t find loc string for key: Info_ResolvedToolFromCache
    2020-11-11T11:29:33.3304923Z Info_ResolvedToolFromCache 4.0.0
    2020-11-11T11:29:33.3305729Z ##[warning]Can\'t find loc string for key: Info_UsingVersion
    2020-11-11T11:29:33.3306971Z Info_UsingVersion 4.0.0
    2020-11-11T11:29:33.3308220Z Found tool in cache: NuGet 4.0.0 x64
    2020-11-11T11:29:33.3433049Z Detected NuGet version 4.0.0.2283 / 4.0.0
    2020-11-11T11:29:33.3460255Z SYSTEMVSSCONNECTION exists true
    2020-11-11T11:29:33.3544456Z [command]C:\hostedtoolcache\windows\NuGet\4.0.0\x64\nuget.exe install -NonInteractive D:\a\8\s\Metadata\packages.config -ConfigFile D:\a\8\s\Metadata\nuget.config -Verbosity Detailed -ExcludeVersion -OutputDirectory D:\a\8\NuGets
    2020-11-11T11:29:34.7927921Z NuGet Version: 4.0.0.2283
    2020-11-11T11:29:34.9500197Z Feeds used:
    2020-11-11T11:29:34.9500648Z   https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json
    2020-11-11T11:29:34.9501114Z   https://pkgs.dev.azure.com/xxxxxxxxxxxxx/D365-Build-Pipeline/_packaging/LCS_D365_Build_Artifacts/nuget/v3/index.json
    2020-11-11T11:29:34.9501491Z   https://api.nuget.org/v3/index.json
    2020-11-11T11:29:34.9502513Z 
    2020-11-11T11:29:34.9846622Z Restoring NuGet package Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp.7.0.5778.35626.
    2020-11-11T11:29:34.9847044Z Restoring NuGet package Microsoft.Dynamics.AX.Application.DevALM.BuildXpp.10.0.605.10014.
    2020-11-11T11:29:35.2026297Z Restoring NuGet package Microsoft.Dynamics.AX.Platform.CompilerPackage.7.0.5778.35626.
    2020-11-11T11:29:35.4749521Z CredentialProvider.TeamBuild: "D:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.175.0\CredentialProvider\CredentialProvider.TeamBuild.exe" -uri https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json -nonInteractive -verbosity detailed
    2020-11-11T11:29:35.4752129Z CredentialProvider.TeamBuild: URI Prefixes:
    2020-11-11T11:29:35.4753056Z CredentialProvider.TeamBuild:     https://dev.azure.com/xxxxxxxxxxxxx/
    2020-11-11T11:29:35.4753442Z CredentialProvider.TeamBuild:     https://pkgs.dev.azure.com/xxxxxxxxxxxxx/
    2020-11-11T11:29:35.4754317Z CredentialProvider.TeamBuild:     https://pkgsprodcus1.pkgs.visualstudio.com/
    2020-11-11T11:29:35.4754799Z CredentialProvider.TeamBuild:     https://pkgs.dev.azure.com/xxxxxxxxxxxxx/
    2020-11-11T11:29:35.4755171Z CredentialProvider.TeamBuild:     https://xxxxxxxxxxxxx.pkgs.visualstudio.com/
    2020-11-11T11:29:35.4756079Z CredentialProvider.TeamBuild:     https://pkgs.dev.azure.com/xxxxxxxxxxxxx/
    2020-11-11T11:29:35.4756615Z CredentialProvider.TeamBuild: URI: https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json
    2020-11-11T11:29:35.4757527Z CredentialProvider.TeamBuild: Is retry: False
    2020-11-11T11:29:35.4757823Z CredentialProvider.TeamBuild: Matched prefix: 
    2020-11-11T11:29:35.6532499Z CredentialProvider.TeamBuild: This provider only handles URIs from the build's Team Project Collection
    2020-11-11T11:29:36.4347216Z   GET https://api.nuget.org/v3-flatcontainer/microsoft.dynamics.ax.platform.devalm.buildxpp/7.0.5778.35626/microsoft.dynamics.ax.platform.devalm.buildxpp.7.0.5778.35626.nupkg
    2020-11-11T11:29:36.5395583Z   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.dynamics.ax.platform.devalm.buildxpp/7.0.5778.35626/microsoft.dynamics.ax.platform.devalm.buildxpp.7.0.5778.35626.nupkg 105ms
    2020-11-11T11:29:36.5490250Z WARNING: Unable to find version '7.0.5778.35626' of package 'Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp'.
    2020-11-11T11:29:36.5491074Z   https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json: Unable to load the service index for source https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json.
    2020-11-11T11:29:36.5491725Z   Response status code does not indicate success: 401 (Unauthorized).
    2020-11-11T11:29:36.5492382Z   https://pkgs.dev.azure.com/xxxxxxxxxxxxx/D365-Build-Pipeline/_packaging/LCS_D365_Build_Artifacts/nuget/v3/index.json: Unable to load the service index for source https://pkgs.dev.azure.com/xxxxxxxxxxxxx/D365-Build-Pipeline/_packaging/LCS_D365_Build_Artifacts/nuget/v3/index.json.
    2020-11-11T11:29:36.5493095Z   Response status code does not indicate s2020-11-11T11:29:32.1972844Z ##[section]Starting: NuGet install Packages
    uccess: 401 (Unauthorized).
    2020-11-11T11:29:36.5493613Z   https://api.nuget.org/v3/index.json: Package 'Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp.7.0.5778.35626' is not found on source 'https://api.nuget.org/v3/index.json'.
    2020-11-11T11:29:36.5494024Z 
    2020-11-11T11:29:36.5709564Z   GET https://api.nuget.org/v3-flatcontainer/microsoft.dynamics.ax.platform.compilerpackage/7.0.5778.35626/microsoft.dynamics.ax.platform.compilerpackage.7.0.5778.35626.nupkg
    2020-11-11T11:29:36.5960379Z   GET https://api.nuget.org/v3-flatcontainer/microsoft.dynamics.ax.application.devalm.buildxpp/10.0.605.10014/microsoft.dynamics.ax.application.devalm.buildxpp.10.0.605.10014.nupkg
    2020-11-11T11:29:36.6878474Z   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.dynamics.ax.platform.compilerpackage/7.0.5778.35626/microsoft.dynamics.ax.platform.compilerpackage.7.0.5778.35626.nupkg 116ms
    2020-11-11T11:29:36.6879348Z WARNING: Unable to find version '7.0.5778.35626' of package 'Microsoft.Dynamics.AX.Platform.CompilerPackage'.
    2020-11-11T11:29:36.6880327Z   https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json: Unable to load the service index for source https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json.
    2020-11-11T11:29:36.6880976Z   Response status code does not indicate success: 401 (Unauthorized).
    2020-11-11T11:29:36.6881674Z   https://pkgs.dev.azure.com/xxxxxxxxxxxxx/D365-Build-Pipeline/_packaging/LCS_D365_Build_Artifacts/nuget/v3/index.json: Unable to load the service index for source https://pkgs.dev.azure.com/xxxxxxxxxxxxx/D365-Build-Pipeline/_packaging/LCS_D365_Build_Artifacts/nuget/v3/index.json.
    2020-11-11T11:29:36.6882395Z   Response status code does not indicate success: 401 (Unauthorized).
    2020-11-11T11:29:36.6882960Z   https://api.nuget.org/v3/index.json: Package 'Microsoft.Dynamics.AX.Platform.CompilerPackage.7.0.5778.35626' is not found on source 'https://api.nuget.org/v3/index.json'.
    2020-11-11T11:29:36.6883415Z 
    2020-11-11T11:29:36.7408238Z   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.dynamics.ax.application.devalm.buildxpp/10.0.605.10014/microsoft.dynamics.ax.application.devalm.buildxpp.10.0.605.10014.nupkg 144ms
    2020-11-11T11:29:36.7410628Z WARNING: Unable to find version '10.0.605.10014' of package 'Microsoft.Dynamics.AX.Application.DevALM.BuildXpp'.
    2020-11-11T11:29:36.7411524Z   https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json: Unable to load the service index for source https://pkgs.dev.azure.com/microsoftLearnModule/_packaging/FabrikamFiber/nuget/v3/index.json.
    2020-11-11T11:29:36.7412150Z   Response status code does not indicate success: 401 (Unauthorized).
    2020-11-11T11:29:36.7413582Z   https://pkgs.dev.azure.com/xxxxxxxxxxxxx/D365-Build-Pipeline/_packaging/LCS_D365_Build_Artifacts/nuget/v3/index.json: Unable to load the service index for source https://pkgs.dev.azure.com/xxxxxxxxxxxxx/D365-Build-Pipeline/_packaging/LCS_D365_Build_Artifacts/nuget/v3/index.json.
    2020-11-11T11:29:36.7414275Z   Response status code does not indicate success: 401 (Unauthorized).
    2020-11-11T11:29:36.7414868Z   https://api.nuget.org/v3/index.json: Package 'Microsoft.Dynamics.AX.Application.DevALM.BuildXpp.10.0.605.10014' is not found on source 'https://api.nuget.org/v3/index.json'.
    2020-11-11T11:29:36.7415300Z 
    2020-11-11T11:29:36.7912772Z ##[section]Finishing: NuGet install Packages

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 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans