1

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.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
S N G
  • 25
  • 2
  • 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](https://learn.microsoft.com/en-us/azure/devops/pipelines/release/deployment-groups/howto-provision-deployment-group-agents?view=azure-devops) 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 Sep 18 '20 at 19:33
  • The issue comes cause biztalk is not [pre-installed component for hosted agent](https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md), so it's strongly recommended to use self-hosted agents like [this](https://learn.microsoft.com/en-us/biztalk/core/feature-pack-create-vsts-token#install-the-build-agent). 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 Sep 22 '20 at 08:53
  • 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 Sep 22 '20 at 08:55
  • @LoLance you linked the "current" version of the document and at least now, it contains "BizTalk Server Project Build Component 3.13.765.0" and I was able to build btproj projects using a standard devops agent. – fabsenet Nov 03 '21 at 15:50

1 Answers1

1

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

Hichamveo
  • 475
  • 3
  • 16
  • Thank you all for the feedback. We used the self hosted agents for using the BizTalk Builds. – S N G Oct 09 '20 at 08:36