I upgraded a site from 8.12.2 to 8.13.0. After the upgrade, Umbraco fails to boot with the message "ModelsMode "Dll" is not a valid mode.":
Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
-> Umbraco.Core.Exceptions.BootFailedException: Boot failed.
-> System.Configuration.ConfigurationErrorsException: ModelsMode "Dll" is not a valid mode. Note that modes are case-sensitive. Possible values are: Nothing, PureLive, AppData, LiveAppData
ved Umbraco.ModelsBuilder.Embedded.Configuration.ModelsBuilderConfig.<>c.<get_ModelsMode>b__16_0() i D:\a\1\s\src\Umbraco.ModelsBuilder.Embedded\Configuration\ModelsBuilderConfig.cs:linje 161
ved System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
ved Umbraco.ModelsBuilder.Embedded.Configuration.ModelsBuilderConfig.get_ModelsMode() i D:\a\1\s\src\Umbraco.ModelsBuilder.Embedded\Configuration\ModelsBuilderConfig.cs:linje 145
ved Umbraco.ModelsBuilder.Embedded.Compose.ModelsBuilderComposer.Compose(Composition composition) i D:\a\1\s\src\Umbraco.ModelsBuilder.Embedded\Compose\ModelsBuilderComposer.cs:linje 38
ved Umbraco.Core.Composing.Composers.Compose() i D:\a\1\s\src\Umbraco.Core\Composing\Composers.cs:linje 100
ved Umbraco.Core.Runtime.CoreRuntime.Boot(IRegister register, DisposableTimer timer) i D:\a\1\s\src\Umbraco.Core\Runtime\CoreRuntime.cs:linje 188
I'm using the Umbraco.ModelsBuilder package to get the full ModelsBuilder, not the scaled-back one in Core that doesn't support dll mode.
In 8.12.2 this package correctly replaces the embedded ModelsBuilder, but that no longer seems to be the case in 8.13.0, as the error is resulting from the Embedded ModelsBuilder trying to read and act on the configuration intended for the full ModelsBuilder.
Haha, thanks @arknu, you were 5 minutes slower than this one, so I'll close this and your PR in favor of the first one! 👍
The race is on for the next easy fix 😉🏁
I upgraded a site from 8.12.2 to 8.13.0. After the upgrade, Umbraco fails to boot with the message "ModelsMode "Dll" is not a valid mode.":
I'm using the Umbraco.ModelsBuilder package to get the full ModelsBuilder, not the scaled-back one in Core that doesn't support dll mode.
In 8.12.2 this package correctly replaces the embedded ModelsBuilder, but that no longer seems to be the case in 8.13.0, as the error is resulting from the Embedded ModelsBuilder trying to read and act on the configuration intended for the full ModelsBuilder.
Umbraco version
8.13.0
The probable cause seems to be a typo here: https://github.com/umbraco/Umbraco-CMS/blob/e7a3fd37ce9b00097a45825ed46da692023a94bc/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs#L50
The bug was introduced in this commit: https://github.com/umbraco/Umbraco-CMS/commit/5ee0f310c9184c819ba0e3c095784ab9c93c3631
I'll be adding a PR to address this shortly.