How can I fix this Bamboo build error: error MSB4019: The imported project...?

The build error contains text below:

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

11 answers

This widget could not be displayed.

How do you fix this when using Elastic instances?

I'd also like an answer to this.

This widget could not be displayed.
Boris Berenberg Community Champion Aug 18, 2012

Hey Segun,

Does the user that Bamboo runs as have access to this directory? Does the file exist?

Boris Berenberg
Atlassian Support - San Francisco
Enjoyed the support?! Tweet us! #atlassiansupport

Hi Boris,

The directory is located in the Amazon EC2 that Bamboo OnDemand uses for build, I dont have access to it, i cant confirm or copy the file needed into the Amazon EC2 instance.

This widget could not be displayed.

Hi Segun,

Thanks for your reply. Bamboo cannot find the file in the specified path. Can you please try to run the same project from the command line of your EC2 instance (from the same directory where Bamboo tries to run your project) using the same user that runs the elastic agent. If you get the same error running your project from command line (without Bamboo) then the problem is not really related to Bamboo. However, if it works fine from command line, then please open a ticekt on, attach screenshots of your build configuration, and we will continue to investigate this case.


This widget could not be displayed.

Any answer yet for that question?

This widget could not be displayed.

I have not gotten a working answer yet, will enter the answers when I do.

This widget could not be displayed.

Hi Masoud,

Do you have another agent (remote, local or elastic) that you can try to run the same build? Does it work on any other agent?

I need the Bamboo server logs, agent logs and a screenshot of your task configuraiton to be able to investigate the issue further. Feel free to open a support ticket and provide all the mentioned information.


This widget could not be displayed.

Hi Armen,

I have fixed it.

The problem was that the path did not exist as the error message stating.

So I just remotely connected to the virtual machine and added the file in that location, it is worked.



This widget could not be displayed.

It's great to hear that, Masoud. Thanks for sharing with the solution.


This widget could not be displayed.

The problem is this fix is temporary. I am setting up an instance that shuts down and restarts when needed. But when it restarts it is a new instance.... I cannot keep copying the file everytime a check in starts a build on a brand new instance... any other thoughts on how to solve this error, that does not include a Remote Desktop to the EC2 instnace, copy a folder, then run a build... there must be a better way.

Boris Berenberg Community Champion Mar 10, 2013

Hey Mickey,

It sounds like you need to modify the base AMI which you are using. If the AMI is built with the file missing, then this problem will reoccur every single time just as you mentioned.


This widget could not be displayed.

I had the same Problem with a local Buildserver

The solution was to switch to the 32 bit version of MSBuild
don't now whats the problem, because on my local machine I can use the 64bit version of MSBUild, but on the server its not working


This widget could not be displayed.

I have the same problem but only affecting my web service and web site projects.

Windows application projects are working without any issues.


I'm using bamboo elastic agents in the cloud - I was expecting the default AMI image for bamboo to have Visual Studio installed as so many arguments are stating bamboo supports .NET.

We're looking at moving from and TeamCity to Bamboo because of the integration with JIRA cloud (which we are already using)


Anyone has any ideas how this can be handled/workaround that does NOT involve setting up a custom EC2 image?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

135 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you