A command line utility to merge multiple C# file (*.cs) into one
- Scan a directory or give a list of files
- Multiple way to manage
using
- Merge
partial class
in one class - Ignore
*\obj\*
,*\Properties\*
and*\Merge.cs
By default the application search for *.cs files in the working directory of the application.
You can specify an other directory as first argument.
It can be an absolute path or a relative path from working directory.
CSharpFilesMerger [workingDirectory] [OPTIONS]
Option | Description |
---|---|
-h, --help |
Show this help text (is exclusive with others options except -w ) |
-v, --version |
Show the version of the application (is exclusive with others options except -w ) |
-r, --recursive |
Search for *.cs file recursively from working directory or specified directory. Do not work with -f, --files |
-f, --files |
To specify the list of files to merge. Only these files will be merged. Each file must be separate by a semicolon ";". Each file can be specify as absolute path or relative to working directory or specified directory. Example : -f "a.cs;..\b.cs;C:\myDirectory\c.cs" Remark : When this option is active files are merged in the order of the list. |
-o, --out |
To specify the fileName of the output file where *.cs files are merged. Can be specify as absolute path or relative to working directory or specified directory. Example : -o "MyOutputFile.cs" Example : -o "C:\myDirectory\MyOutputFile.cs" Default value is equivalent to : -o "Merged.cs" |
-u, --usings |
To specify where to put usings (globally vs in namespaces). Must be followed by one of these 3 options :
-u DoNotMove Remark : All usings are ordered and print only one time by usings location. |
-s, --start |
To open the result file at the end. By default try to open the file with the default program for *.cs files. An other program can be optionally specify with the path of the program Example : -s "C:\Program Files\MyEditor\MyEditor.exe" |
-w, --wait |
Ask the user to press a key to exit at the end. |