Search code examples
visual-studio-2015biztalkazure-pipelinesazure-pipelines-build-taskbiztalk-2016

The imported project "C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkC.targets" was not found


I've got Biz Talk project in VSTS and I'm trying to build the project. Here is the error i face

Error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\BizTalk\BizTalkC.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk

Please find my Build definition attachedenter image description here

I find the stated targets file exists in my Local [C:\Program Files (x86)\MSBuild\Microsoft\BizTalk] Build Arguments:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"

Please help/suggest


Solution

  • If you're using the hosted agent, it looks like the hosted agent can't build BizTalk applications because it's missing the required build targets. There's no way around that; you'll have to set up your own build agent.

    If this is on a build agent you control, it looks like you need to install the appropriate BizTalk references on your build agent.