4.2. Setting Up for Firebird in Visual Studio 2015

To prepare for working with Firebird, you will need to install the following:

  • FirebirdSql.Data.FirebirdClient.dll

  • EntityFramework.Firebird.dll

  • the Firebird DDEX Provider for Visual Studio

There is nothing difficult in installing the first two. They are currently distributed and installed into a project by means of the NuGet package manager. The DDEX Provider library, designed for operating Visual Studio wizards, is not so easy to install and may take more time and effort.

Efforts have been made to automate the installation process and include all components in a single installer package. However, you might need to install all of the components manually under some conditions. If so, you can download the following:

4.2.1. The Installation Process

Important!

Because the installation involves operations in protected directories, you will need administrator privileges to do it.

Steps

  1. Install FirebirdSql.Data.FirebirdClient-4.10.0.0.msi

  2. Unpack EntityFramework.Firebird-4.10.0.0-NET45.7z to the folder with the installed Firebird client. In my case, it is the folder C:\Program Files (x86)\FirebirdClient\.

  3. You need to install a Firebird build into the GAC. For your convenience, specify the path to the gacutil utility for .NET Framework 4.5 in the environment variable %PATH%. In my case, the path is C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\

  4. Run the command shell cmd.exe as administrator and go to the directory with the installed client, e.g.,

    1. chdir "c:\Program Files (x86)\FirebirdClient"
  5. Now make sure that FirebirdSql.Data.FirebirdClient is installed into the GAC by typing the following command:

    1. gacutil /l FirebirdSql.Data.FirebirdClient

    If FirebirdSql.Data.FirebirdClient has not been installed into the GAC, use the following command to do it now:

    1. gacutil /i FirebirdSql.Data.FirebirdClient.dll
  6. Now install EntityFramework.Firebird into the GAC

    1. gacutil /i EntityFramework.Firebird.dll
  7. Unpack DDEXProvider-3.0.2.0.7z to a directory convenient for you. Mine was unpacked to C:\Program Files (x86)\FirebirdDDEX\.

  8. Unpack the contents of the /reg_files/VS2015 subdirectory from the archive DDEXProvider-3.0.2.0-src.7z there as well.

    Author’s remark

    For some strange reason these files are absent from the archive with the compiled dll libraries, but they are present in the source code archive.

  9. Open the FirebirdDDEXProvider64.reg file in Notepad. Find the line that contains %path% and change it to the full path to the file FirebirdSql.VisualStudio.DataTools.dll, e.g.,

    1. "CodeBase"="C:\\Program Files (x86)\\FirebirdDDEX\\FirebirdSql.VisualStudio.DataTools.dll"
  10. Save this Registry file and run it. Click YES to the question about adding the information to the Registry.

  11. Now you need to edit the machine.config file. In my installation, the path is as follows:

    1. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config

    Open this file in Notepad. Find the following section:

    1. <system.data>
    2. <DbProviderFactories>

    Add the following lines to this section:

    1. <add name="FirebirdClient Data Provider"
    2. invariant="FirebirdSql.Data.FirebirdClient"
    3. description=".Net Framework Data Provider for Firebird"
    4. type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory,
    5. FirebirdSql.Data.FirebirdClient, Version=4.10.0.0, Culture=neutral,
    6. PublicKeyToken=3750abcc3150b00c" />
    The settings we have configured here are valid for version 4.10.0.

    Do the same for machine.config located at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\

This completes the installation.

Testing the Installation

To make sure that everything has been installed successfully, start Visual Studio 2015. Find the Server Explorer and try to connect to an existing Firebird database.

fbdevgd30 efw 001 en

Figure 11. Choose data source for testing installation

fbdevgd30 efw 002 en

Figure 12. Locate a database

fbdevgd30 efw 003 en

Figure 13. Test and confirm the connection