Npgsql: The .NET Data Provider
Prerequisites
To create the Npgsql applications I describe in this chapter, you'll need a copy of Visual Studio .NET (preferably, Visual Studio 2003 or later) and you must install the Visual Basic component. You'll also need a copy of the Npgsql package (which you can find at gborg.postgresql.org or www.pgfoundry.org).
To install Npgsql, open the Npgsql-version.zip archive and extract all files into a permanent home. (I recommend saving the archive files in your Desktop folder so you can find them easilyyou'll need to refer to them often.)
Next, add the Npgsql.dll and Mono.Security.Protocol.Tls.dll files to the .NET global assembly cache. If you unpacked the Npgsql archive to your Desktop folder, you'll find these files in the DesktopNpgsqlinms directory. If you're comfortable with the Windows command line, you can execute the following commands to install the Npgsql assemblies:
C:...DesktopNpgsqlinms> gacutil /nologo -i Npgsql.dll Assembly successfully added to the cache. C:...DesktopNpgsqlinms > gacutil /nologo -i Mono.Security.Protocol.Tls.dll Assembly successfully added to the cache.
If you prefer the drag-and-drop approach, open two Windows Explorer sessions. In the first session, navigate to the assembly folder in the Windows directory (typically C: WINDOWSassembly). In the second session, open the directory that contains the Npgsql package and browse to the binms subdirectory. Drag the Npgsql.dll and Mono.Security.Protocol.Tls.dll files from the Npgsqlinms folder and drop them in the WINDOWSassembly folder.