Share via

Issue to setup Sql Lite for the project

Scott Huang 3,511 Reputation points
2026-05-06T09:03:44.4866667+00:00

Hi,

To the way below, which is the exact project directory? Not bin path right?

User's image

Developer technologies | ASP.NET Core | ASP.NET API

Answer accepted by question author

  1. Q&A Assist
    2026-05-06T09:03:55.82+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The project directory is the folder that contains the .csproj (or .fsproj) file for the ASP.NET/ASP.NET API project, not the bin folder.

    Run the dotnet add package sqlite-net-pcl (or Microsoft.Data.Sqlite) command from the same folder where the project file lives, for example:

    MySolution/
      MyApiProject/
        MyApiProject.csproj   <-- run dotnet commands here
        Program.cs
        appsettings.json
        bin/
        obj/
    

    So:

    1. Open a terminal/PowerShell.
    2. cd into the folder that contains YourProject.csproj.
    3. Run the dotnet add package ... command there.

    Do not run it inside bin, obj, or any other build output folder.


    References:

    Was this answer helpful?

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 18,145 Reputation points Microsoft External Staff Moderator
    2026-05-07T03:26:42.9+00:00

    Hi @Scott Huang ,

    Thanks for reaching out.

    The correct directory is the project folder that contains your .csproj file, not the bin folder.

    The bin folder only contains the compiled output of your application, so NuGet packages should not be added from there. You’ll want to open PowerShell or the terminal in the folder where your project file is located, for example the same folder that contains something like YourProjectName.csproj.

    Once you are in that folder, run:

    dotnet add package sqlite-net-pcl
    

    If you are currently in the solution folder instead, you can also point directly to the project file like this:

    dotnet add .\YourProjectName\YourProjectName.csproj package sqlite-net-pcl
    

    After that, restore/build the project again, and the package reference should be added correctly to the project.

    Hope this helps! If my explanation and the information I provided were also helpful to you, I would greatly appreciate it if you could follow the instructions here so others with the same problem can benefit as well.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.