tags:

views:

567

answers:

2

Could someone translate this, into a syntax that uses the built in variables?

\\myserver\builds\mybuild\Daily_20090525.1\Release\_PublishedWebsites\myWebsite

it should be something like:

$(DropLocation)\mybuild\$(?...)\Release\_PublishedWebsites\myWebsite
A: 

This may help you... http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/0fb8d97d-513e-4d37-8528-52973f65a034

or this one may help: http://en.csharp-online.net/MSBuild:_By_Example—Using_Environment_Variables_in_Your_Project

Two different ways of achieving what you are trying to do.

Prashast
No, that doesn't help. I do not want to create my own variables but use ones that already exist. Particularly the date stamped directory 'Daily_20090525.1'
simon831
+2  A: 

This might help: substitute "mybuild\$(?...)" with "$(BuildNumber)"

I had a similar problem where I was trying to copy from the drop location to a "Latest" folder. I found that to construct the final destination of the files (\MyServer\MyShare\builds\MyBuild\Daily_20090708.14\Mixed Platforms\Release) translated to the following using variables: $(DropLocation)\$(BuildNumber)\%(ConfigurationToBuild.PlatformToBuild)\%(ConfigurationToBuild.FlavorToBuild)

I also found it helpful to use the Message task for troubleshooting. The following task will tell you what the variable translate to. To see the output, look in BuildLog.txt.

PS: My tasks that used the properties and items mentioned above where located inside .

Martin Szabo