Framework and platform breaking changes
Breaking changes related to .NET version requirements, NuGet packaging, dependency injection, serialization, and framework-level APIs in CMS 13.
This article covers framework and platform-level breaking changes in CMS 13, including runtime requirements, NuGet packaging, dependency injection, serialization, and foundational API changes.
.NET 10 requirement
CMS 13 requires .NET 10.0. You must update your project target framework from net8.0 to net10.0 in your .csproj file. This also affects Docker base images and CI/CD pipeline configurations.
NuGet packaging
- NuGet packages were updated to represent single assemblies.
- The
EPiServer.CMS.Corepackage works as an umbrella package with dependencies on packages whose assemblies were previously included in the package. - The
EPiServer.Frameworkpackage contains only theEPiServer.Frameworkassembly. Add a dependency to the individual assembly that you require. - The
EPiServer.Cms.HealthCheckpackage was removed, and the SQL health check consolidated intoEPiServer.Data. - The
EPiServer.Data.Cachelibrary has been integrated into the mainEPiServer.Dataassembly and removed as a separate package. Cache services are now registered in the mainAddCmsDatamethod.
Cross-cutting changes
- Service registration methods were moved from the namespace
Microsoft.Extensions.DependencyInjectiontoEPiServer.DependencyInjection. - Serialization constructors were made obsolete in .NET 8 and removed:
protected SomeClass(SerializationInfo info, StreamingContext context). - Argument validation for strings follows the .NET convention and throws an
ArgumentExceptionif empty rather than anArgumentNullException. - Argument validation for properties of argument objects follows the .NET convention and throws an
ArgumentExceptionif null rather than anArgumentNullException. - Argument validation for
ContentReferencearguments follows the .NET convention and throws anArgumentExceptionif empty rather than anArgumentNullException. - CMS no longer has a dependency on
Castle.Windsor. Any use of it requires an explicit dependency on that package. - Parameter names have been adjusted in places where the previous name was inconsistent with the overridden declaration or with other method overloads. Such changes have not been noted individually.
Newtonsoft.Json replaced with System.Text.Json
CMS 13 migrated from Newtonsoft.Json to System.Text.Json throughout the framework. If your project has code that depends on Newtonsoft.Json (especially after removing packages like Episerver.Find), you must add an explicit package reference.
EPiServer.Framework.Serialization.Json.Internal.JsonObjectSerializerwas removed. UseSystemTextJsonObjectSerializerinstead.EPiServer.Framework.Serialization.Json.NotANumberConverterrewritten to useSystem.Text.Json.JsonSerializer.EPiServer.Framework.Serialization.Json.NameValueCollectionConverterrewritten to useSystem.Text.Json.JsonSerializer.EPiServer.Framework.Serialization.Json.DateTimeConverterrewritten to useSystem.Text.Json.JsonSerializer.EPiServer.Shell.Json– ClassesJsonIdentityConverter,TypeArrayConverter, andTypeConverterwere removed.
Removed Newtonsoft formatters
NewtonsoftJsonSerializerSettingsOptionsremoved.- Extension method
UseNewtonsoftJsonremoved. FormatterTypeenum removed.ExtendedNewtonsoftJsonOutputFormatterremoved.NewtonsoftFormatterExtensionsextensions removed.
Nullable reference type annotations
Some libraries enable nullable reference type annotations. This may produce compile-time nullability warnings in consuming code. Affected libraries/namespaces:
EPiServer.ImageLibraryEPiServer.Data.CacheEPiServer.HostingEPiServer.LoggingEPiServer.PersonalizationEPiServer.HtmlParsingEPiServer.Events
To suppress these warnings, add #nullable enable to affected files, or enable nullable reference types project-wide and address the warnings.
Spelling corrections in public API
The following spelling errors are corrected in the public API. These are binary breaking changes that may require code updates if you reference the old names:
| Type/Member | Old Name | New Name |
|---|---|---|
IContentLanguageSettingsHandler.GetFallbackLanguages | conentLink | contentLink |
IContentRepository.GetReferencesToContent | includeDecendents | includeDescendants |
ContentProvider.GetReferencesToLocalContent | includeDecendents | includeDescendants |
IPropertyDefinitionRepository.List | pageTypeID | contentTypeID |
PropertyDefinitionRepository.List | pageTypeID | contentTypeID |
PlugInSummaryAttribute constructor | moreInfourl | moreInfoUrl |
SearchWordCriterionOptions.SearchStringRegexpression | SearchStringRegexpression | SearchStringRegex |
LanguageBranch.ValidateLanguageEdititingAccessRights | ValidateLanguageEdititingAccessRights | ValidateLanguageEditingAccessRights |
VisitorGroupOptions.StatisticsPersistanceInterval | StatisticsPersistanceInterval | StatisticsPersistenceInterval |
VirutalPathResolverExtensions | VirutalPathResolverExtensions | VirtualPathResolverExtensions |
ContentScannerExtension.AssignAvailableTypes | contentypeModel | contentTypeModel |
IFileTransferObject.CheckIn | commment | comment |
PropertyLinkCollection.PrincipalAcccessor | PrincipalAcccessor | PrincipalAccessor |
DefaultContentTypeAvailablilityService | Availablility | Availability |
EPiServer.Framework
-
EPiServer.Framework.FrameworkInitialization– No longer implementsIConfigurableModule. Services are now registered using theAddCmsFramework()service registration method. -
EPiServer.Framework.EnvironmentOptions– Obsolete propertyBasePathwas removed. -
EPiServer.Framework.Initialization.AssemblyList– Obsolete classAssemblyListwas removed. -
EPiServer.Framework.Initialization.HostType–LegacyMirroringAppDomainwas removed because mirroring is no longer supported. -
EPiServer.Framework.Initialization.IInitializationEngine– This interface was removed as it was not used in practice. -
EPiServer.Framework.Initialization.InitializationEngine–- The
Assembliesproperty was removed. UseAppDomain.CurrentDomain.GetAssemblies()instead, and filter out dynamic assemblies. Setmethod was removed fromModulesproperty.Setmethod was removed fromLocateproperty. Usecontext.Servicesinstead.- The
ScanAssembliesmethod was removed. - The
BuildTypeScannermethod was removed. - The
GetDependencySortedModulesmethod was removed. - The
ConfigureModulesmethod was removed. CallConfigure(complete: false)instead. - Calling
Configure()orConfigure(complete: true)multiple times now throws anInvalidOperationException. CallConfigure(complete: false)instead if you do not intend to transition the initialization state.
- The
-
EPiServer.Framework.Blobs– The generic Blob functionality has been moved to a separateEPiServer.Blobspackage. Reference package and add services using theAddCmsBlobs()service registration method if needed. -
EPiServer.Framework.Blobs.FileBlobProvider– Default constructor and constructors with internalIPhysicalPathResolverparameter were removed. TheInitialize(string, NameValueCollection)method was also removed. Use the constructor withFileBlobProviderOptionsparameter instead. -
EPiServer.Framework.Blobs.Blob– The class is now abstract. The following methods changed from virtual (throwingNotImplementedException) to abstract:OpenRead(),OpenWrite(),Write(Stream),AsFileInfoAsync(). New abstract methods added:Exists(),ExistsAsync(),OpenReadAsync(),OpenWriteAsync(),WriteAsync(). -
EPiServer.Framework.Blobs.BlobNotFoundException– New exception type. Thrown byBlob.OpenRead()andBlob.OpenReadAsync()when the blob does not exist. -
EPiServer.Framework.Cache– Cache abstractions and memory implementations moved to a separateEPiServer.Cachepackage. Reference and add services usingAddCmsCache(). -
EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache–SynchronizationFailedStrategysetting is no longer applied to the cache. -
EPiServer.Framework.Timers.ITimer– TheITimerabstraction is no longer used by CMS and is obsolete. No implementation is registered by the Framework. -
EPiServer.Framework.ProviderActivationException– No longer thrown when provider activation fails. As providers now require service registration, anInvalidOperationExceptionis thrown instead. -
EPiServer.Framework.Security.ISiteSecretManager– Made obsolete. You can still read existing secrets but not create new secrets. This API supported the event system.
EPiServer.ServiceLocation
-
The following obsolete classes were removed:
IInterceptorRegisterIRegisteredServiceIServiceConfigurationProviderIServiceLocatorServiceDesriptorServiceLocationHelperServiceLocatorExtensionsServiceLocatorImplBase
-
EPiServer.ServiceLocation.AutoDiscovery– Obsolete classes removed:IServiceLocatorFactory,ServiceLocatorFactoryAttribute. -
EPiServer.ServiceLocation.ServiceCollectionExtensions–IServiceCollectionextension methods with an equivalent method inMicrosoft.Extensions.DependencyInjectionwere removed.
Package namespace moves
Several namespaces have been extracted into separate packages. If you use functionality from these namespaces, add an explicit package reference:
| Namespace | New Package | Registration Method |
|---|---|---|
EPiServer.Logging | EPiServer.Logging | N/A |
EPiServer.HtmlParsing | EPiServer.HtmlParsing | N/A |
EPiServer.Personalization (Geolocation) | EPiServer.Geolocation | AddCmsGeolocation() |
EPiServer.Events.ChangeNotification | EPiServer.Events.ChangeNotification | AddCmsChangeNotification() |
EPiServer.Framework.Blobs | EPiServer.Blobs | AddCmsBlobs() |
EPiServer.Framework.Cache | EPiServer.Cache | AddCmsCache() |
EPiServer.Framework.AspNetCore
-
EPiServer.Framework.FileSystem– Obsolete classesIDirectory,IFile,IFileSystemWatcher,PhysicalDirectory, andPhysicalFilewere removed. -
EPiServer.Framework.Web.Resources.ClientResources– Obsolete methodsRenderandRenderRequiredResourceswere removed. -
EPiServer.Framework.Security.ValidateAntiForgeryReleaseToken– Removed internal attribute. Replace withMicrosoft.AspNetCore.Mvc.ValidateAntiForgeryTokenAttribute. -
AspNetAntiforgeryandAspNetAntiforgeryOptionswere removed.
EPiServer.Web hosting
-
EPiServer.Web.IWebHostingEnvironment– Obsolete.WebRootPathcan be retrieved fromMicrosoft.AspNetCore.Hosting.IWebHostEnvironment.WebRootVirtualPathis no longer needed because support for virtual application paths was dropped with CMS 12. -
EPiServer.Web.WebHostingEnvironment– Obsolete. -
EPiServer.Web.VirtualPathResolver– Obsolete.
EPiServer.Data
-
EPiServer.Data.DataInitialization– No longer implementsIConfigurableModule. Services are registered using theAddCmsData()service collection extension method. -
EPiServer.Data.Dynamic.EPiServerDataStoreAttribute– TheSeamlessUpgradeproperty has a default value oftrue. Dynamic Data Stores defined usingEPiServerDataStoreAttributehave seamless upgrade mode by default. -
EPiServer.Data.Dynamic.Providers.DataMove– TheFromPropertyandToPropertyfields were changed to properties. -
EPiServer.Data.IDatabaseExecutorExtensions– Extension methodsGetParameterValueandSetParameterValuewere moved toEPiServer.Data.DbCommandExtensions. -
EPiServer.Data.Cache.CacheChangedEventHandler– Delegate was not used and was removed. -
EPiServer.Data.Cache.DefaultCacheProvider– Made internal.
EPiServer.DataAccessBase
The helper base class is obsolete and is no longer supported. Use IDatabaseExecutor/IAsyncDatabaseExecutor directly instead.
EPiServer.HtmlParsing
EPiServer.HtmlParsing.StringSource–Pushbackmethod throwsInvalidOperationExceptioninstead ofIndexOutOfRangeExceptionif currently reading on the first position.
EPiServer.Licensing
EPiServer.Licensing.LicenseCheck– The protectedSyncLockfield was removed.
Validation
-
EPiServer.Validation.IValidate– Services implementingIValidateor derived interfaces are no longer automatically registered as validators. Validation services must now be explicitly registered using theAddCmsValidator<T>()service collection extension method. -
EPiServer.Validation.DataAnnotationsValidator– The default constructor was obsoleted and throws an exception if used. Use the constructor that provides required service dependencies. -
EPiServer.Security.SecurityEntityProvider– Obsolete methodsGetRolesForUser,FindUsersInRole, andSearchwere removed. The extension methods inSecurityEntityProviderExtensions(SearchRoles,SearchUsersByName,SearchUsersByEmail,GetUsersInRole,FindUsersInRole) were also removed. Use their async equivalents (SearchRolesAsync,SearchUsersByNameAsync,SearchUsersByEmailAsync,GetUsersInRoleAsync,FindUsersInRoleAsync). -
EPiServer.Framework.InitializableModuleAttribute– PropertyUninitializeOnShutdownremoved. Uninitialize is always called on shutdown. -
EPiServer.Framework.SmtpOptions– PropertiesSenderEmailAddressandSenderDisplayNameremoved. These settings were never used; seeNotificationOptionsfor notification sender configuration. -
EPiServer.ServiceLocation.ServiceCollectionExtensions– Non-genericAddServiceAccessormethod removed. UseAddServiceAccessor<T>()instead.
Updated 9 days ago
