Skip to content

Commit eb56a05

Browse files
Clarify models builder fix
1 parent be6513d commit eb56a05

File tree

1 file changed

+18
-2
lines changed
  • 15/umbraco-cms/fundamentals/setup/upgrading/version-specific

1 file changed

+18
-2
lines changed

15/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,24 @@ Snapshots have been removed, meaning any code using `IPublishedSnapshot`, and by
2929

3030
Models generated by ModelsBuilder used the `IPublishedSnapshot` interface, which has been removed. This means that the models need to be rebuilt. The approach to this will differ depending on the mode chosen:
3131

32-
* InMemoryAuto - Remove the `umbraco\Data\TEMP\InMemoryAuto` folder to trigger a rebuild of the models.
33-
* SourceCodeAuto and SourceCodeManual - Remove the old models located in the `\umbraco\models` folder by default. Trigger a rebuild of the models from the ModelsBuilder dashboard in the backoffice.
32+
**InMemoryAuto**
33+
34+
Remove the `umbraco\Data\TEMP\InMemoryAuto` folder to trigger a rebuild of the models.
35+
36+
**SourceCodeAuto and SourceCodeManual**
37+
Remove the old models located in the `\umbraco\models` folder by default. This will cause your views to no longer be able to built due to missing types.
38+
To get around this you can disable precompiled view temporarily by adding the following to your csproj file:
39+
40+
```xml
41+
<PropertyGroup>
42+
<RazorCompileOnBuild>false</RazorCompileOnBuild>
43+
<RazorCompileOnPublish>false</RazorCompileOnPublish>
44+
</PropertyGroup>
45+
```
46+
This will allow your site to start up, but you will still see an error page trying to load a page. Disregard the error and enter the backoffice and rebuild the models from the ModelsBuilder dashboard. You can now re-enable precompiled views and rebuild your site.
47+
48+
If you have custom C# code that references the models this will also not build. You can either comment-out your custom code temporarily until the models has been rebuilt, or fix the models manually.
49+
To fix the models manually you need to find and replace `IPublishedSnapshotAccessor` with `IPublishedContentTypeCache`.
3450

3551
<summary>Umbraco 14</summary>
3652

0 commit comments

Comments
 (0)