Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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.

3 answers

1 accepted

0 votes
Answer 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.

For me, this was because MSBuild doesn't correctly set the environment variables it requires to find the project imports.

When you open a visual studio command prompt, the PATH etc. gets set up for the subsequent MSBuild call. 

In Bamboo I avoid using MSBuild and use a script such as;

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"

msbuild /p:Configuration=Debug /p:Platform="x86" myproject.vcxproj

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
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

171 views 0 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you