Announcements
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
This seems to be a problem with a spesific project created on an older platform. The "old" project was spesified in the errormessage also in front of the errormessage. Just remove the old project form version control to avoid it from build
I had a slightly different erreor:
Error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Dynamics\AX\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" was not found.
To fix this error: Open the development box and in Visual studio: Delete the "old" project and solution. Create a new project and solution. Check in and run the new Microsoft hosted agent buildpipeline
So the solution was to only have the Devops projects artifacts as package source, and then of course have the correct information in the repo
Thanks a lot Sergei
I have changed my nuget.config to only have the artifacts of the project as package source, now the packages get installed.
Now I get another error
2020-11-11T11:51:47.2851215Z ##[section]Starting: Build solution **\*.sln 2020-11-11T11:51:47.3002455Z ============================================================================== 2020-11-11T11:51:47.3002757Z Task : Visual Studio build 2020-11-11T11:51:47.3003018Z Description : Build with MSBuild and set the Visual Studio version property 2020-11-11T11:51:47.3003310Z Version : 1.166.2 2020-11-11T11:51:47.3003502Z Author : Microsoft Corporation 2020-11-11T11:51:47.3003954Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/visual-studio-build 2020-11-11T11:51:47.3004270Z ============================================================================== 2020-11-11T11:51:49.3179484Z ##[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-11T11:51:51.0378607Z ##[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=25951e5d-ca12-4396-b679-d104760133f3|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-11T11:51:52.6260929Z Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. 2020-11-11T11:51:53.6126584Z Build started 11/11/2020 11:51:53 AM. 2020-11-11T11:51:55.6406114Z Project "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1.sln" on node 1 (default targets). 2020-11-11T11:51:55.6434401Z ValidateSolutionConfiguration: 2020-11-11T11:51:55.6435348Z Building solution configuration "Debug|Any CPU". 2020-11-11T11:52:03.4171294Z 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-11T11:52:03.4172172Z ResolveModels: 2020-11-11T11:52:03.4172748Z SolutionFileParser Execute method 2020-11-11T11:52:03.4173256Z SolutionFileDirectory D:\a\8\s\Projects\FinanceOperations1 2020-11-11T11:52:03.4196356Z Found projects in Solution file with matche count - 1 2020-11-11T11:52:03.4783337Z ##[error]D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets(19,5): Error : No descriptors could be found for model 'BuildPipelineTest' in metadata directory 'D:\a\8\s\Metadata' 2020-11-11T11:52:03.4786553Z D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets(19,5): error : No descriptors could be found for model 'BuildPipelineTest' in metadata directory 'D:\a\8\s\Metadata' [D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj] 2020-11-11T11:52:03.4902750Z Done Building Project "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj" (default targets) -- FAILED. 2020-11-11T11:52:03.5278662Z Done Building Project "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1.sln" (default targets) -- FAILED. 2020-11-11T11:52:03.5534034Z 2020-11-11T11:52:03.5535276Z Build FAILED. 2020-11-11T11:52:03.5569623Z 2020-11-11T11:52:03.5587820Z "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1.sln" (default target) (1) -> 2020-11-11T11:52:03.5588403Z "D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj" (default target) (2) -> 2020-11-11T11:52:03.5589074Z (ResolveModels target) -> 2020-11-11T11:52:03.5590065Z D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets(19,5): error : No descriptors could be found for model 'BuildPipelineTest' in metadata directory 'D:\a\8\s\Metadata' [D:\a\8\s\Projects\FinanceOperations1\FinanceOperations1\FinanceOperations1.rnrproj] 2020-11-11T11:52:03.5591046Z 2020-11-11T11:52:03.5601814Z 0 Warning(s) 2020-11-11T11:52:03.5602539Z 1 Error(s) 2020-11-11T11:52:03.5608962Z 2020-11-11T11:52:03.5609259Z Time Elapsed 00:00:09.97 2020-11-11T11:52:03.8138575Z ##[error]Process 'msbuild.exe' exited with code '1'. 2020-11-11T11:52:03.8511002Z ##[section]Finishing: Build solution **\*.sln
I think that is related to something different...
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
Hi Steen,
Could you, please, also share raw logs from Nuget install step?
Nuget install looks like this:
Here is my nuget.config
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.
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
From LCS: on the main page, 'Shared asset Library'->Nuget packages - first 3
after download:
The project is running v10.0.14, so I assumed that I needed the latest versions
André Arnaud de Cal...
294,135
Super User 2025 Season 1
Martin Dráb
232,871
Most Valuable Professional
nmaenpaa
101,158
Moderator