简体   繁体   中英

Installing Npgsql.dll for Postgresql

So I am having an issue installing npgsql.dll and mono.security.dll. I've been trying to figure this out for so long... please help. Here are the steps I've done...

  1. Download zip file from https://github.com/npgsql/npgsql
  2. Go into Visual Studio and start new project. C# Command (not sure which specific project I was supposed to create)
  3. Create a strong key name
  4. Then I try to install the .dll files using gacutil

In the zip file I've downloaded in step 1, I cannot find Npgsql.dll and Mono.Security.dll anywhere...

I've also tried downloading other zip files that have actually had those files, however, when I try to install them in command (gacutil /i C:...\\Npgsql.dll) I just keep getting the following error:

"Failure adding assembly to cache: ???????????"

In Visual Studio 2017, go to menu Tools-> NuGet Package Manager-> Package Manager Console. Run command:

Install-Package Npgsql -Version 3.2.7

To unstall version 3.2.7... and so on...

More versions are available here: https://www.nuget.org/packages/Npgsql/

you can use installation project : https://github.com/npgsql/Npgsql/releases

download MSI package

Thanks

Another way to obtain the npgsql.dll file is:

  1. Open Visual Studio and start a new project -- ASP.NET Core for instance.
  2. Use the NuGet Package Manager to install Postgres packages
  3. Open a command prompt and cd to your user directory: 'cd \\users\\
  4. Look for the dll: 'dir /s/p npgsql.dll'

The dll will be in your project directory. You will also find the dll in the .nuget package directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM