Skip to content

ImportPackageXmlMigration uses an obsolete constructor when using Umbraco 10 #12

Open
@LabObjects

Description

@LabObjects

When attempting to create my own starter kit I received a compiler warning:

ImportPackageXmlMigration.cs(25,13): warning CS0618: 'PackageMigration
Base.PackageMigrationBase(IPackagingService, IMediaService, MediaFileManager, MediaUrlGeneratorCollection, IShortString
Helper, IContentTypeBaseServiceProvider, IMigrationContext)' is obsolete: 'Use ctor with all params' [C:\code\SomeProject.csproj]

The missing parameter is:

IOptions packageMigrationsSettings

New constructor:

public ImportPackageXmlMigration(
IPackagingService packagingService,
IMediaService mediaService,
MediaFileManager mediaFileManager,
MediaUrlGeneratorCollection mediaUrlGenerators,
IShortStringHelper shortStringHelper,
IContentTypeBaseServiceProvider contentTypeBaseServiceProvider,
IMigrationContext context,
IOptions packageMigrationsSettings)
: base(packagingService,
mediaService,
mediaFileManager,
mediaUrlGenerators,
shortStringHelper,
contentTypeBaseServiceProvider,
context, packageMigrationsSettings)
{
}

reference: https://github.com/umbraco/Umbraco-CMS/blob/e626fca2432582f052cb13654eedd9e60ef8723f/src/Umbraco.Infrastructure/Packaging/PackageMigrationBase.cs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions