简体   繁体   中英

The NuGet Restore task is getting failed in azure devops build pipeline

We are configuring a build pipeline for BizTalk. When we run the pipeline the use NuGet task is getting successful and the next task ie NuGet restore is failing giving the below error:

##[error]The nuget command failed with exit code(1) and error(C:\agent_work\60\s.rptproj(22411): error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\BizTalk\BizTalk.targets" was not found. Also, tried to find "Microsoft\BizTalk\BizTalk.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild". These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\msbuild.exe.Config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths.

The NuGet Restore task is getting failed in azure devops build pipeline

It seems Biztalk build targets not installed on self agent server. You have to install BizTalk on your self hosted agent. Then you can use Build pipeline targeting your private agent.

Alternatively, you could try to use the hosted agent windows-2019 , which installed the BizTalk Server project build component:

Add BizTalk Server project build component to build agent machine.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM