Skip to content

Updated to .NET Core 2.2.0 and DB not found #1

@smillerk2

Description

@smillerk2

The code works perfectly - thank you. However, when upgrading to .NET Core 2.2.0 the SQLite DB cannot be found:

SqliteException: SQLite Error 14: 'unable to open database file'.
Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(int rc, sqlite3 db)

In addition to compiling I had to set some specific info in the *.csproj files in order to work around compile issues:

<RuntimeFrameworkVersion>2.2.0</RuntimeFrameworkVersion>
<PlatformTarget>AnyCPU</PlatformTarget>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>

I also deleted the migrations folder and run the following just to reset the database:

dotnet ef migrations add InitialCreate
dotnet ef database update

The unit tests work - as they are using the in memory DB, but the web site cannot find the players.db file - even though it was created by EF.

Any thoughts?

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