Product Documentation

c-treeACE V11.0 Update Guide

Previous Topic

Next Topic

Visual Studio .NET Development

To aid in developing stored procedures (SP), user-defined functions (UDF), and triggers, FairCom provides a "c-tree Stored Procedure" extension to the Visual Studio IDE.

Note: C# .NET stored procedures are available on Microsoft Windows platforms only. If you wish to use stored procedures on other platforms, Java can be used for the stored procedures. See Java Stored Procedures.

Note that the C# stored procedure tutorials that FairCom provides are not executables which can be launched from the command line, like most of the c-tree tutorials are. Instead, these tutorials must be installed into the database from within the Visual Studio IDE and then can be tested from within the Visual Studio IDE.

The .NET Framework 4.0, available from Microsoft, is required for writing SP, UDF, and triggers.

Prerequisite - Configure Microsoft Visual Studio properly

For Visual Studio 2017 and 2019 to be able to build the tutorials, the ".NET desktop development" workload needs to be installed as part of Visual Studio. In Visual Studio 2017 and 2019, click Tools > Get Tools and Features, which runs the Visual Studio installer. If the installer requires an update before it will run, allow that update. Find the ".NET desktop development" workload under the “Windows” group and make sure it is checked, as shown here:

If it isn’t checked, give it a check mark and then press the Modify button to install that workload. This ensures that all of the tools needed to build and run these tutorials are installed.

Note that Visual Studio 2015 does not have this prerequisite.

c-tree Stored Procedure Extension Installation

FairCom distributes VSIX package installers, which install the c-tree Stored Procedure extension into Microsoft Visual Studio. These installers have been updated to support the latest versions of Visual Studio: 2015, 2017, and 2019. Users with prior versions should uninstall their existing plug-in (following the instructions below) and install the new version for the latest compatibility. To install this extension, navigate to the <faircom>\drivers\csharp.sql.storedprocs folder with Windows Explorer, and then double-click the .vsix file that matches your version of Visual Studio. This will launch the VSIX Installer. Give it permission to run and make changes, and then click the Install button when you see a window like the following appear:

The install process might download and install one or more .NET Frameworks, so it’s important to be connected to the internet while running this installer. Note that the install process can take several minutes. When the installation is complete, you should see a window like this:

This window is asking you to close Visual Studio (if it’s open) and then restart it, in order for the changes to take effect. In other words, it is asking you to “reboot” Visual Studio.

Note that this extension must be installed into Visual Studio before you load the solution file that contains the c-tree Stored Procedure tutorials.

Note also that this extension should be installed when Visual Studio is not running.

Extension Removal

Should you need to remove this extension, launch Visual Studio and do the following:

  • VS 2015 and 2017 - Go to the Visual Studio Tools menu and select Extensions and Updates.
  • VS 2019 - Go to the Extensions menu and select Manage Extensions.

All versions of Visual Studio - Locate the “c-tree Stored Procedure” item template, and click Uninstall, as shown below. Note that the search tool is useful for finding the c-tree item.

Clicking the Uninstall button will schedule the extension for un-installation. To make the un-install actually happen, exit Visual Studio. This will cause the VSIX Installer to run. Give it permission to run and then click the Modify button when asked.

Note that the un-install process can take several minutes.

TOCIndex