I have Solution in vs 2010 with many projects that are build in .net 2.0, but now I want to add a project that will make Npgsqlconnection, the issue is that I don't know how to find Npgsql.dll for .net 2.0. Any suggestions please. I can't upgrade project to higher .net version.
-
2Thanks to Npgsql being open source you can download it, switch the target version to .NET 2.0, fix compile errors, run tests and fix their errorsMindSwipe– MindSwipe2020-06-22 07:40:49 +00:00Commented Jun 22, 2020 at 7:40
-
2The version 2.2.7 download on nuget has binaries for net20 and net35 (which uses the 2.0 runtime). Of course it's nearly five years old and may not work against modern versions of PostgreSQL.Rup– Rup2020-06-22 07:41:59 +00:00Commented Jun 22, 2020 at 7:41
-
I have downloaded the version 2.2.7 and now how do i include it in my project? Thanks a lot, i`m new in this and i know that maybe this may be silly question but i hope you can help .Beginner– Beginner2020-06-22 08:06:02 +00:00Commented Jun 22, 2020 at 8:06
Add a comment
|
1 Answer
By having a look at their repository you can see that the latest nuspec-file that contains a reference to .Net Framework 2.0 is tagged with version 2.2.7. So you should be able to use that version from Nuget. However, this is two major versions behind the current version (and the next major version is available as an alpha) so you might have some problems finding relevant API documentation for your version.
Also note that this release is from 2015, so it might not work properly or support all features found in PostgreSQL versions from after that.
6 Comments
Beginner
I have downloaded the version 2.2.7 and now how do i include it in my project? Thanks a lot, i`m new in this and i know that maybe this may be silly question but i hope you can help
Karl-Johan Sjögren
Look into how to add a nuget package as a reference to your project. It varies a bit depending on your version av Visual Studio.
Rup
Alternatively if you can't make nuget work you can unzip the nupkg file and take the DLLs from the lib\net20 folder. But I'd recommend using nuget if you can.
Beginner
Thanks a lot for the help, i`ll try and let you know.
Rup
Can you upgrade to the latest version of .NET 2 at least, so that you can then load this assembly? If not, I'd check out the v2.2.7 tag from Karl-Johan's GitHub link and build it yourself then.
|