1
votes

Repos: Git
Agent: Microsoft Hosted Agent

In Azure Pipeline I am using Visual Studio Build Task to Build BizTalk Solution. But facing below error.

I am using Microsoft Hosted Agent, is there any solution to resolve this except for using Self Hosted Agent?

Error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\BizTalk\BizTalkC.targets" was not found. Also, tried to find "Microsoft\BizTalk\BizTalkC.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\2017\Enterprise\MSBuild\15.0\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
Ms BizTalk is a enterprise scale application and requires installations for solutions to be built. The solution could endup copying entire installation folder with dependencies which is cumbersome. One option is to explore Deployment groups where your BizTalk server will act as agent by itself and AzDevOps agent. Then the MSI installation of the solution on same server/pool can be performed - koushik
The issue comes cause biztalk is not pre-installed component for hosted agent, so it's strongly recommended to use self-hosted agents like this. We can't use hosted agent to do the build unless we can add one PS task before the VS Build task to install all the missing biztalk components, and as I know there're no simple commands that can do this job. - LoLance
So agree with Hichamveo that you have to use self-hosted agents in this scenario. Please check if answer below resolves this issue and feel free to let me know if you have any further concern. - LoLance

1 Answers

1
votes

This is not possy with hosted agents, Biztalk build targets non installed on them. You have to install a self hosted agent on your Biztalk environment. Then you can use Build pipeline targeting your private agent