Skip to content

Blazor template with auth=individual fails on Linux #63602

@mikekistler

Description

@mikekistler

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When dotnet blazor project template with "--auth individual" is used on a Linux system, the identity data base is created in the "Data" folder in a file called "app.db". But the appsettings.json use the Windows "" to describe this path:

    "DefaultConnection": "DataSource=Data\\app.db;Cache=Shared"

As a result, when the database is initialized with "dotnet ef database update" it creates a new file "Data\app.db" rather that updating the existing "Data/app.db".

Expected Behavior

The app should use the app.db in the Data folder.

Steps To Reproduce

On a linux system:

dotnet new blazor --auth individual
# after this step there will be an "app.db" file in the "Data" directory.
dotnet ef database update
# after this step, the "app.db" file in the "Data" directory is unchanged and instead
# there is a file named "Data\app.db" with the initialized database.

Exceptions (if any)

No response

.NET Version

10.0.100-preview.7.25380.108

Anything else?

I think that simply changing the "\" to "/" in appsettings.json is all that is needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions