0
votes

We are configuring a build pipeline for BizTalk. When we run the pipeline the use NuGet task is getting successful and the next task i.e. 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.

1
How about the issue? Does the answer below resolved your question, If yes, you could Accept it as an Answer , so it could help other community members who get the same issues and we could archive this thread, thanks.Leo Liu-MSFT

1 Answers

0
votes

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.

enter image description here