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

How to access SolutionDir from post build event in bamboo?

Does anyone know how to access Solution Variables such as "$SolutionDir" from VS in bamboo? You cannot define a custom variable in bamboo = to SolutionDir so I am stuck. Any ideas please.

2 answers

The variable itself cannot be used in bamboo, but you can hardcode the solutiondir by using the workspace directory and the relative file of you sln. Or you can define a bamboo variable and use that as a environment variabe. VS allows you to use environment variables with the $() syntax.

But please explain why you need that. Maybe there is another way of achieving the same.

What I am attempting is to get the value to $(SolutionDir) from the post build event that is defined in the .csproj file. What happens is that when the post build steps goes to run in bamboo the $(SolutionDir) is not defined so when bamboo tries to use that variable it has no value so it actually substitutes an extra ../ to the path and the .file that is trying to be copied is not found.

Since Bamboo only allows alphanumeric variables I cannot predefine $(SolutionDir) in bamboo which should be changed in my opinion. As a result the build fails and reports an unsuccessful status. I know I can modify the .csproj file but that defeats the purpose of the $(SolutionDir).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

653 views 1 6
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