Skip to content

Source Control Support

Simon Mourier edited this page Feb 19, 2020 · 1 revision

A CodeModeler project supports the configured Visual Studio Source Control Provider. Source Control will consider the Files folder and the Parts folder, both folders that contain physical files in a CodeModeler project.

Note: Design surface parts are also implicitly considered by Source Control as they also are physical files, stored by default in the project’s base directory.

Depending on your preferences, you may want to store generated files or not in source control. See this article for more on this: Should I store generated code in source control?

Reduce Merge Conflicts with Generated Files

By default, CodeModeler adds generation date and product version in the generated files text. This means each time you generate files, they are different from the previous version ones, even If you don’t change the model:

Reduce Merge Conflicts with Generated Files - Picture 116

If two or more developers check in generated files, they may get merge conflicts whereas only the generation date is different. To avoid this kind of issue, you can configure the project to remove that information from the generated files. This way, they will remain the same if the model does not change.

To do so, 1) show the CodeModeler project properties in Visual Studio, 2) go to the “Project” tab, 3) open the “Advanced Properties” tab of the property grid and 4) select “Remove Diffs” for the “DefaultProducerProductionFlags” attribute:

Reduce Merge Conflicts with Generated Files - Picture 117

Clone this wiki locally