Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Response File Loading

Response files allow specification of a list of files using a single input file (the response file). The response file contains a list of paths to the separate files delimited by new-line characters. The paths may be absolute paths or relative paths, relative to the current WorkingDir.


Example of response file content:

C:\dev\source\file1.bin
..\file2.txt
..\project\file9.cpp
E:\file11.jpg

Response files are loaded by stating the path to the response file in attributes which support this feature (SourceFile, OutputFiles and OutputFiles, all related to the Task element). The path should be prefixed with the '@' symbol. E.g.:

<TaskGroup Name="Project 7" DependsOn="Project 5" WorkingDir="C:\Dev\Project7">
  <Task Tool="MyTool" SourceFile="@FileList.txt" />
</TaskGroup>
Or:
<TaskGroup Name="Project 8" DependsOn="Project 7" WorkingDir="C:\Dev\Project8">
  <Task Tool="MyTool" SourceFile="File.cpp" InputFiles="@HeaderList.txt" />
</TaskGroup>

Creating Response files listing source files from an MS Visual Studio Project/Solution

IncrediBuild's BuildConsole.exe command line interface includes a built-in feature that can be used to create a response file listing all source files in an MS Visual Studio solution or project. This can simplify running a tool (e.g. code analysis tools) on all of your source files. To create a response file from a given .sln/.vcproj/.dsw/.dsp file, BuildConsole.exe should run using the /DumpSourceFiles switch:


BuildConsole <Solution/Workspace/Project File> /DumpSourceFiles=<Response File>
The generated response file contains the full paths to all source files, delimited by new-line characters.