Skip to content

DNAA0001 warning when Application has primary constructor #10425

@Dreamescaper

Description

@Dreamescaper

Android framework version

net10.0-android (Preview)

Affected platform version

VS2022

Description

My Application type looks like this:

[Application]
public class MainApplication(IntPtr handle, JniHandleOwnership ownership) : MauiApplication(handle, ownership)
{
    protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

However, it triggers DNA0001 warning - Application class 'MainApplication' does not have an Activation Constructor 'MainApplication(IntPtr handle, JniHandleOwnership transfer)'.

Did you find any workaround?

Replace with a regular contructor.

Metadata

Metadata

Assignees

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions