Skip to content

Commit f3340d6

Browse files
committed
Added details of additional models builder configuration settings.
1 parent 99ed788 commit f3340d6

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

13/umbraco-cms/reference/configuration/modelsbuildersettings.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ This section allows you to configure the Umbraco models builder, a complete sect
1515
"FlagOutOfDateModels": false,
1616
"ModelsDirectory": "~/umbraco/models",
1717
"AcceptUnsafeModelsDirectory": false,
18-
"DebugLevel": 0
18+
"DebugLevel": 0,
19+
"IncludeVersionNumberInGeneratedModels": true
1920
}
2021
}
2122
}
@@ -61,3 +62,9 @@ By setting this to true, you specify that the models directory is allowed to be
6162
## Debug level
6263

6364
This setting specifies the logging level for the models builder. By default this is set to 0, which means minimal logging. Anything higher that 0 means increased logging. Be aware that this setting should only be set to something higher than 0 for development use, not on live sites.
65+
66+
## Include version number in generated models
67+
68+
When source code options are used, the Umbraco version number written to the generated code for each property of the model. This can be useful for debugging purposes but isn't essential. It causes the generated code to change every time Umbraco is upgraded and models are regenerated. In turn, this leads unnecessary code file changes that need to be checked into source control.
69+
70+
If you prefer to exclude this version number from being written to the generated code, set this value to `false`.

15/umbraco-cms/reference/configuration/modelsbuildersettings.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ This section allows you to configure the Umbraco models builder, a complete sect
1515
"FlagOutOfDateModels": false,
1616
"ModelsDirectory": "~/umbraco/models",
1717
"AcceptUnsafeModelsDirectory": false,
18-
"DebugLevel": 0
18+
"DebugLevel": 0,
19+
"IncludeVersionNumberInGeneratedModels": true
1920
}
2021
}
2122
}
@@ -34,7 +35,7 @@ Specifies how the models builder will generate models and when to generate them.
3435

3536
{% hint style="info" %}
3637
When using Models Builder it is best practice to use the "Nothing" setting for all `appsettings.json` files. If needed, the models mode can then be set to "SourceCodeManual" or "SourceCodeAuto" In the `appsettings.json` file used on the local environment.
37-
{% endhint %}
38+
{% endhint %}
3839

3940
## Models namespace
4041

@@ -65,3 +66,9 @@ By setting this to true, you specify that the models directory is allowed to be
6566
## Debug level
6667

6768
This setting specifies the logging level for the models builder. By default this is set to 0, which means minimal logging. Anything higher that 0 means increased logging. Be aware that this setting should only be set to something higher than 0 for development use, not on live sites.
69+
70+
## Include version number in generated models
71+
72+
When source code options are used, the Umbraco version number written to the generated code for each property of the model. This can be useful for debugging purposes but isn't essential. It causes the generated code to change every time Umbraco is upgraded and models are regenerated. In turn, this leads unnecessary code file changes that need to be checked into source control.
73+
74+
If you prefer to exclude this version number from being written to the generated code, set this value to `false`.

0 commit comments

Comments
 (0)