As that file doesn’t exist in our net publish folder (it’s a razor file so its getting compiled into an assembly), Umbraco Forms can’t find it on disc so it isn’t being applied/used.
How are people working around this? My first thought was to have our theme views in a different folder from Views and then copy them into views folder as part of our publishing process (CICD). Is there a better/preferred way?
Do you have this on your csproj file of your web project
<PropertyGroup>
<!-- Razor files are needed for the backoffice to work correctly -->
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
</PropertyGroup>
We also compile our razor views, but are not facing the issue you are describing.
.net core razor compilation and umbraco forms themes
Hi – as part of our devops process and Umbraco runtime mode configuration for production https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/runtime-modes , we have razor compilation turned on (RazorCompileOnPublish). (this is in umbraco 10 / net core)
However, we also use Umbraco Forms themes https://docs.umbraco.com/umbraco-forms/developer/themes/ and have a custom view file in “Views\Partials\Forms\Themes\our-theme-name\Fieldtypes”.
As that file doesn’t exist in our net publish folder (it’s a razor file so its getting compiled into an assembly), Umbraco Forms can’t find it on disc so it isn’t being applied/used.
How are people working around this? My first thought was to have our theme views in a different folder from Views and then copy them into views folder as part of our publishing process (CICD). Is there a better/preferred way?
Thanks
Hi Andrew,
Do you have this on your csproj file of your web project
We also compile our razor views, but are not facing the issue you are describing.
Dave
thanks Dave! that looks like the setting im after and will try it out today. right there on the page i linked to too. my bad #facepalm
is working on a reply...