0

I'm trying in my program to install the following install-package. I'm working with this program together with someone else. I installed this via a github link on my microsoft visual studio 2019.

What I want is to create a local database ( on my harddisk ).

The package I'm trying to install are: Install-Package Microsoft.EntityFrameworkCore.Sqlite

This is the error that comes with the installing-package. The weird thing is that the computer we programmed this is working but not on mine. Even after uninstall Microsoft Visual studio 2019 / updating it. Can anybody help me what am I doing wrong?

***Install-Package : Project 'Default' is not found. At line:1 char:1

  • Install-Package Microsoft.EntityFrameworkCore.Sqlite
  •   + CategoryInfo          : ObjectNotFound: (Default:String) [Install-Package], ItemNotFoundException
      + FullyQualifiedErrorId : NuGetProjectNotFound,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand***
    
    

1 Answers1

0

Try with NuGet :

  • Right clic in your project, Manage NuGet packages
  • Left tab (browse), search and install :

SQLite

System.Data.SQLite.Core

Example of using :

sqlite_connexion = new SQLiteConnection("Data Source=" + dbFile + ";Version=3;");
sqlite_connexion.Open();

if (sqlite_connexion.State != ConnectionState.Open)
   {
        MessageBox.Show("Error database : " + Environment.NewLine + "Statut : " + sqlite_connexion.State);
        this.Close();
   }
UserNam3
  • 655
  • 4
  • 11
  • Thank you for the answer! I'm just looking on every file in my solution explorer but none of them has the option when I right click them to manage nugets. – ApexLegends Aug 27 '20 at 18:45
  • https://i.ibb.co/7n7q5ns/nuget1.jpg and https://i.ibb.co/0VKXjQP/nuget2.jpg – UserNam3 Aug 28 '20 at 05:30
  • Thanks again but right click on any of my projects or maps in my solution won't show nuget is this something I need to install then? – ApexLegends Aug 29 '20 at 15:17
  • Maybe you don't have the package. - Open **Visual Studio Installer** - Choose **Modify** -Go to **Individual Components** -Select **NuGet package manager** -**Apply.** – UserNam3 Aug 29 '20 at 18:36
  • https://i.ibb.co/RpqqZrq/1-visualstudioinstaller.jpg and https://i.ibb.co/3msFsRM/2-packages.jpg – UserNam3 Aug 29 '20 at 18:37