0

What I want

I need to find out the project folder paths in a solution (.sln) during TFS 2010 build.

Why I want this

I need to search for files with extension ‘.mc’. These files are present in project folders.

Why not use solution path variable in TFS 2010 build

I cannot use solution path variable. The reason for this is that my solution path contains 100 folders, each containing files with ‘.mc’ extension. The solution (.sln) only contains 10 visual studio projects, each in its own folder. I want to search for files in these project folders.

Is there a simple solution that you know of? Thanks in advance.

ansariwn
  • 501
  • 4
  • 13

2 Answers2

0

I don't think something out-of-the-box exists for something like that.

I would go for a custom build activity (see here for a classic resource on that), that works along the lines of crawling the SLN in order to retrieve the file paths.

A possibly useful resource on that could be this post, but, since you are also using TFS as source control, it might be a good idea to search for SccProjectUniqueName: each line of the SLN containing this - has a path to a project.

Community
  • 1
  • 1
pantelif
  • 8,524
  • 2
  • 33
  • 48
0

Use the InvokeProcess activity, combined with the FIND command line utility on your solution file

Ewald Hofman
  • 12,688
  • 3
  • 39
  • 44
  • I ended up using Powershell (+ a .NET utility) in InvokeProcess to achieve the desired result. FIND command line utility would have equally worked. Thanks – ansariwn Jan 12 '12 at 09:58