Template not created in physical folder

I create a document with template and I see the template in the Templates folder, but when I look in the Views folder the file isn’t there. The folder has the permissions set to modify for the IIS AppPool of the website.
I published from Visual Studio.
My csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">
	<PropertyGroup>
		<TargetFramework>net10.0</TargetFramework>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>
		<CompressionEnabled>false</CompressionEnabled>
	</PropertyGroup>

<ItemGroup>
	<PackageReference Include="Umbraco.Cms" Version="17.2.0" />
	<PackageReference Include="Umbraco.Cms.DevelopmentMode.Backoffice" Version="17.2.0" />
</ItemGroup>

<ItemGroup>
	<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
	<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
</ItemGroup>

<PropertyGroup>
	<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
</PropertyGroup>

</Project>

What am I missing or not doing?

Hey Mike

Can you share your Umbraco log file from around the time you created the template? It will be at:

wwwroot/umbraco/Logs/UmbracoTraceLog.YYYY-MM-DD.txt


you , have CopyRazorGenerateFilesToPublishDirectory set to true but no explicit Runtime Mode set and no RazorCompileOnBuild/RazorCompileOnPublish set to false. This means:

The .NET SDK may be compiling Razor views into the DLL at publish time

i would check settings, or try creating manually (workaround), also worth reading

I added the two missing properties to my csproj. Not sure where to put the Runtime Mode except in the appsettings. Here is the log after I added the properties, published and created a new document with template (still no physical file in the Views folder).

{“@t”:“2026-02-23T18:12:05.9826295Z”,“@mt”:“Registering distributed background jobs”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0033723Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“OpenIddictCleanupJob”,“Period”:“01:00:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0034479Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“WebhookFiring”,“Period”:“00:00:10”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0034669Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“ContentVersionCleanupJob”,“Period”:“01:00:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0034780Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“HealthCheckNotifierJob”,“Period”:“1.00:00:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0034919Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“LogScrubberJob”,“Period”:“04:00:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0035027Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“ScheduledPublishingJob”,“Period”:“00:01:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0035432Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“TemporaryFileCleanupJob”,“Period”:“00:05:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0035538Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“WebhookLoggingCleanup”,“Period”:“1.00:00:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0036607Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“CacheInstructionsPruningJob”,“Period”:“00:01:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0037187Z”,“@mt”:“Registered distributed background job {JobName}, running every {Period}”,“JobName”:“LongRunningOperationsCleanupJob”,“Period”:“00:02:00”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.0051765Z”,“@mt”:“Completed registering distributed background jobs”,“SourceContext”:“Umbraco.Cms.Infrastructure.Services.Implement.DistributedJobService”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:21,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:“INFO “}
{”@t”:“2026-02-23T18:12:06.2597227Z”,“@mt”:“The Delivery API is not enabled, no indexing will performed for the Delivery API content index.”,“SourceContext”:“Umbraco.Cms.Infrastructure.Examine.DeliveryApiContentIndexPopulator”,“ProcessId”:31036,“ProcessName”:“w3wp”,“ThreadId”:20,“ApplicationId”:“b2a475044767683fe3d822bf64ec4eab4feae418”,“MachineName”:“TUSKER-DESKTOP”,“Log4NetLevel”:"INFO "}

I have the following in the appsettings.Development.json:

“Umbraco”: {
“CMS”: {
“Global”: {
“UseHttps”: false
},
“Content”: {
“MacroErrors”: “Throw”
},
“Runtime”: {
“Mode”: “Development”
},
“ModelsBuilder”: {
“ModelsMode”: “SourceCodeAuto”
},
“Hosting”: {
“Debug”: true
}
}
}

This is the production version:

“Umbraco”: {
“CMS”: {
“Global”: {
“Id”: “1f161500-77b3-40b8-bb39-8d7af735fdc3”,
“UseHttps”: true,
“SanitizeTinyMce”: true
},
“Content”: {
“AllowEditInvariantFromNonDefault”: true,
“ContentVersionCleanupPolicy”: {
“EnableCleanup”: true
}
},
“Unattended”: {
“UpgradeUnattended”: true
},
“Runtime”: {
“Mode”: “Production”
},
“ModelsBuilder”: {
“ModelsMode”: “Nothing”
},
“Security”: {
“AllowConcurrentLogins”: false
},
“WebRouting”: {
“UmbracoApplicationUrl”: “``https://UmbracoVS.org/”
}
}
}

The log is clean. your appsettings.json has Runtime.Mode: Production, so Umbraco intentionally won’t write templates to disk.

Fix: In IIS, add an environment variable ASPNETCORE_ENVIRONMENT = Development to your site so it picks up your appsettings.Development.json.

But if this is a real production server, don’t do that instead create templates locally, commit the .cshtml files, and deploy them through your publish pipeline

edit: you have UmbracoApplicationUrl pointing to a live domain so this looks like a real production server. In that case don’t set ASPNETCORE_ENVIRONMENT=Development on it.

First, thanks for all the help.

I have a local IIS running on my workstation, so it is not a production site. I added 127,0,0,1 UmbracoVS.org to my hosts file. I wanted to be able to run Umbraco just as if it was live. If that is not possible then I will run it in localhost via dotnet run.