Skip to content

.NET Core DbContext defunct in unit tests #5

Closed
@toniarnold

Description

@toniarnold

Since a forced upgrade to .NET 5 (for Blazor .NET 6), DbContext Core requires DI Logging, thus unit tests requiring DbContext fail in the VS Test Explorer.

As soon as asplib.blazor gets referenced in test.core, we get a MissingMethodException at LoggerFactory.Create(). If the reference is only removed, the DbTest tests using DBContext pass. Problem is the reference to Microsoft.AspNetCore.Components.Web.

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