Task to enumerate through projects within a solution


what best way enumerate through projects within solution file? have program expects csproj file input , need run projects within particular solution. there public api reads solution files? i'd rather not create brittle solution reads solution file directly, when change in next version.


jason camp, mcse, mcsd, mcdba, mcpd: web, mcad, mcsa, cissp, scsa

hi jason
 

i think easiest approach create item group holds project files. , process each project file in custom task.

 

for example, if override aftercompileconfiuration this:

<target name="aftercompileconfiguration">  
<itemgroup> 
<myprojects include="$(solutionroot)\solutionname\**\*.csproj" /> 
</itemgroup> 
<message text="myprojects=%(myprojects.identity)" /> 
</target> 
 

 

then in build log, should able see paths of .csproj within solutionname. can replace message task here call application , pass in path of .csproj file.


please mark replies answers if , unmark them if provide no help.


Archived Forums V  >  Team Foundation Server - Build and release management



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........