0

In CC project config file I have many MSBuild tasks. Each task is used to build one solution.

Problem is that this requires maintenance if this CC config file each time when new project is added to / deleted from repository.

My idea is to pass to the CC dynamic list of solutions that should be build and execute build one by one as it is done now with "static / old fashion" maintenance of config file.

Does anyone prepare already such configuration?

panako
  • 1,064
  • 10
  • 11
  • Is there a reason why you have lots of msbuild tasks in one ccnet project, rather than one per solution to be built? – Simon Laing Nov 12 '15 at 16:26
  • @SimonLaing: I have one solution per MSBuild and many solutions (DLLs) build in one ccnet project. Such structure we have in repository and I want to keep it also in ccnet. – panako Nov 13 '15 at 05:55

1 Answers1

0

Presuming you have something akin to the following:

On disk:

  • ./solution1.sln
  • ./solution2.sln
  • ./solutionN.sln

And a single ccnet project:

  • Msbuild task -> solution1.sln
  • Msbuild task -> solution1.sln
  • Msbuild task -> solutionN.sln

What you are asking for is ccnet to react to what is outside of its environment. This isn't possible, however it would be possible to get another tool to do so.

Possible options:

1. Custom Msbuild project Create a specific msbuild project which finds and invokes msbuild on all solution files it finds. Call msbuild on this project alone. It should be possible to do this with vanilla msbuild, see https://msdn.microsoft.com/en-us/library/z7f65y0d.aspx

2. Batch files Find all files, and for each file execute msbuild. Ensure the output is logged to an XML file (msbuild switch - I believe) and merge in the result in the publishers section. See How to do something to each file in a directory with a batch script

3. Single solution Create a single solution, which contains all the projects from all solutions (1 to N) and call msbuild on this once. This solution file would be need to be updated each time a new project comes along however.

Community
  • 1
  • 1
Simon Laing
  • 1,194
  • 7
  • 18