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.

2 answers

1 accepted

You just have to play with it at the command line. If you can get it working there you will have the "command" required to work from any CI server. That’s about the best I can offer, that’s what I had to do.

It will be specialized according to your individual project and environment. Not the sort of thing you can get from “book learning”. run the build, examine the errorlog, reconfigure accordingly, and repeat until it's error free.




Used to see errors like this often.

First, is the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets file located in that path on the bamboo server where the build is executing? Is it located on D: or E: instead? (lots of server dudes want to reserve C: for the OS and make you install your build stuff on a different drive which is a really good idea for performance and update management).

Is the path properly quoted (spaces = bad in pathnames, just sayin...)

In general in bamboo, MSBuild fails on good code for one of these reasons:

Look for things like: you haven't saved your targets file to the repository (though it exists in your local copy)

You haven't added the targets file to one of the build files (and therefore it gets excluded even though it exists in the repository).

Another variation is that you have it pointing one place in visual studio but that location doesn't exist in the repository.

My experience with msbuild is that it behaves very differently from the IDE. There are a lot of things that the IDE does for you. Yes, in case you didn't know, Microsoft thinks it's your mother. "Oh here honey, I know what you meant to do. Let me tidy that up for you".

Which is convenient until such time as you try to do a command line build. Don't assume the command line build will work the same way. People will tell you that it will, and they will mostly be wrong.

If you haven't done it already you'll probably have to configure your build files for bamboo and have your local settings different. This can make things confusing but your developer laptop and the bamboo server (assuming you have one) probably aren't cut from the same disk image. And once you do that, don't mess it up by checking in your local settings on top of the bamboo configuration in the repository.

Hello Gretchen.

First I am new at Bamboo, I do not know how to configure it to work with servers Bamboo.

I do not know how to access the server (did not even know this was possible.)

Could you recommend me some materials to study? Something for beginners

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
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,561 views 0 6
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