Warm tip: This article is reproduced from stackoverflow.com, please click
.net .net-core c# npgsql visual-studio-code

Failed to install Npgsql (Visual Studio Code)

发布于 2020-03-29 20:58:42

I'm having trouble with installing Npgsql in Visual Studio Code (.Net Core 3.1.1).

I create a clean project and try install package. dotnet new console dotnet add package Npgsql --version 4.1.2

The package fails to install and I receive a message:

The Npgsql package is not compatible with all architectures in the project.. I found a similar problem here, but it was solved by updating NuGet. Which probably won't be my case. What am I doing wrong and how to install the package?

Questioner
Clyde
Viewed
82
Clyde 2020-01-31 21:20

Problem solved. Installing a package using the dotnet add package package-name command does not work for me. But if I install the NuGet Gallery extension (in the VS code) and add a package using this tool, then the library will install properly.