Creates a .csproj by scanning folders for files and injecting XML into a previously created .csproj template. Uses a configuration file to control behavior.
This tool is designed to help with management of .csproj files used by Visual Studio. This was originally created by me (Eric Cosky of Bounding Box Games, LLC) for internal use but I decided to share this here in case other people find it useful.
The basic purpose is to read a configuration file which will specify a project template file, an output directory, and a collection of directories to include each file discovered using recursive pattern matching into the project. The generated .csproj data
can use linked files to simplify the task of sharing source code in common libraries without duplication.
This tool has been essential for keeping projects synchronized between platforms and configurations that do not play nicely together in a single solution. A side effect of using this tool is that a carefully tuned .csproj template file will never have settings
changed by accident during normal development since it is generally configured once and left alone after that.
Adopting GenProj will incur one significant workflow change: adding files to projects within Visual Studio can interfere with the process. It can work, but it might not work as expected. It is generally recommended to add new files to the folder in Windows
Explorer, and run genproj to get the files incorporated into the .csproj.
If you do need to make changes to the .csproj settings, it is recommended that these changes are migrated to the template.csproj using a tool such as WinMerge to carefully integrate the changes so they are not blown away the next time GenProj is run. Should
this happen by accident, GenProj does retain backups of the current .csproj files each time they are rebuilt in a subdirectory under the project.
Like the project? Please consider
making a donation or
buy our latest game, Thunder Moon. Thanks!