问题
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...
- Download zip file from https://github.com/npgsql/npgsql
- Go into Visual Studio and start new project. C# Command (not sure which specific project I was supposed to create)
- Create a strong key name
- 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: ???????????"
回答1:
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/
回答2:
you can use installation project : https://github.com/npgsql/Npgsql/releases
download MSI package
Thanks
回答3:
Another way to obtain the npgsql.dll file is:
- Open Visual Studio and start a new project -- ASP.NET Core for instance.
- Use the NuGet Package Manager to install Postgres packages
- Open a command prompt and cd to your user directory: 'cd \users\
- 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.
来源:https://stackoverflow.com/questions/32643960/installing-npgsql-dll-for-postgresql