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

How do you fix this when using Elastic instances?

I'd also like an answer to this.

0 vote
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?

Cheers,
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.

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 https://support.atlassian.com, attach screenshots of your build configuration, and we will continue to investigate this case.

Cheers,
Armen

Any answer yet for that question?

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

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.

Cheers,
Armen

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.

Thanks

Masoud

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

Armen

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.

Cheers,
Boris

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

 

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 CC.net 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 Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,096 views 0 5
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot