Umbraco Models builder – Generating models to the project source control

// .csproj add

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<CopyRefAssembliesToPublishDirectory>true</CopyRefAssembliesToPublishDirectory>
</PropertyGroup>


 

// appsettings add

"CMS": {
"ModelsBuilder": {
"ModelsMode": "SourceCodeAuto",
// additional optional fields
"ModelsNamespace": "Umbraco.Cms.Web.Common.PublishedModels",
"FlagOutOfDateModels": false,
// /a o f
"ModelsDirectory": "~/Models/ModelsBuilder/",
"AcceptUnsafeModelsDirectory": true,
"DebugLevel": 1
},

More on Linux Dotnet material

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-7.0&tabs=linux-ubuntu

Was this article helpful?

Leave A Comment?