MSBUILD: how to find out current folder of imported file

  • Thread starter Thread starter Sajjad Akhter
  • Start date Start date
S

Sajjad Akhter

Hi,

Issue at hand is that i want to have common build scripts, but people may be
multiple version (source trees) on single machine. How can i traverse parent
tree.

so what i thought is that i would put ..\env.Build file

when it reaches to root (where it knows location of common scripts).
then it will init variable to that folder.

problem is that how to find folder of imported build file.

or if i have a path string is there some string manuplution in msbuild that
would allow me to extract path info.
etc

Thanks,
Sajjad
 
Hello Sajjad,

MSBuild provides a set of reserved properties that store information about
the project fille and the MSBuild binaries. For example,
$(MSBuildProjectDirectory).

For deatils on this, you may refer to:

http://msdn2.microsoft.com/en-us/ms164309.aspx

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
No that doesnt work as it gives the path to root project file not the one
being imported.
 
Hello,

I didn't find a better answer than "NO" on find the path for import file.
Maybe you can post this question is our forum:

http://forums.microsoft.com/msdn/showforum.aspx?forumid=27&siteid=1

There may be someone who has same issue there, and they shed some light on
the issue.

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top