If you are using Umbraco ModelsBuilder in one of the SourceCode modes like me, chances are that you'll run into problems when upgrading to Umbraco 15.
Because of the new cache in Umbraco things have changed around how content is fed to the models, and with that, the IPublishedSnapshotAccessor interface has removed.
As all the ModelsBuilder models depend on that, they will fail to build, once you have upgraded the necessary NuGet packages to Umbraco.
I think the official advice is to uncomment all models and code that uses them. As a lazy dev, this is not what I want.
In stead, you can piggy back the interface back into Umbraco.
Simply, add the following snippet to one of your .generated.cs
model files, and your project can build again.
namespace Umbraco.Cms.Core.PublishedCache
{
public interface IPublishedSnapshotAccessor : IPublishedContentTypeCache { }
}
You then have to go into Umbraco, and rebuild your models. This will generate models that are compatible with Umbraco 15, and you are good to go.
If you use IPublishedSnapshotAccessor elsewhere, you would need to refactor that code too though.
Top comments (0)