Referencing an msbuild property using the contents of another property?

I don't believe that is possible. However, you could achieve a similar effect with ItemGroups.

Up vote 2 down vote favorite share g+ share fb share tw.

I want to be able to reference an msbuild (3) property using the contents of another property. For example: Test 1 2 In this scenario, I want the contents of TestVariable outputted (1). Is this possible?

Msbuild link|improve this question asked Oct 21 '10 at 18:00vicjugador996623 81% accept rate.

I don't believe that is possible. However, you could achieve a similar effect with ItemGroups: Test Test Full It's a little clunky tho...

Sure this is possible just do: Test 1 2 $(SelectVariable)Variable The result is shown in image below.

Doh! Slaps head. Shoulda seen that one!

– Peter McEvoy Oct 23 '10 at 10:38 I don't think that's what vicjugador wants. I think he wants some kind of reflexion. In your example he wants to output the value of TestVariable (1) and not the name (TestVariable).

And I don't think it's possible because it would need several passes to interpretate the file... – Benjamin Baumann Oct 25 '10 at 16:01 Benjamin is correct .. the output that I want is the contents of TestVariable (1) .. and not the name of TestVariable. – vicjugador Oct 25 '10 at 18:25.

You could use the task to achieve something similar, but (as Peter said) that's likely to be some distance from your desire to have something short and pithy. Perhaps psake is the answer - it has no such arbitrary and puny limits when nesting expressions and parentheses :P.

I think the Choose task is the answer here. – Benjamin Baumann Oct 25 '10 at 16:03.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions