Setting Up Development Environment
In order to begin development of applications using NCache features, you need to have Microsoft Visual Studio and NCache installed.
Note
The following section has been implemented using Visual Studio 2015 and NCache version 4.6.
- Open File-> New -> Project.
Select Console Application from range of generic templates.
Specify the Name for the Application.
Specify the appropriate Location to save a project.
Click OK button to create a new project.
Reference NCache Assemblies
To this solution, you need to add references to NCache APIs in order to utilize the caching features.
In Solution Explorer, right-click on the Application name and select Add.
Select Reference.
Reference Manager screen appears.
Select Browse from the left panel and click the Browse button to select the reference.
Select the files to reference screen appears.
Browse to
%INSTALL_DIR%\NCache\bin\assembly\4.0
Select the following references from the list of NCache assemblies:
Alachisoft.NCache.Runtime
Alachisoft.NCache.Web
Specify Namespaces
- You can now begin creating applications utilizing NCache's features, however, you need to specify the
following namespace to get started:
using Alachisoft.NCache.Web.Caching;
Troubleshooting
Add Reference issue of Visual Studio 2010
If your development environment is Visual Studio 2010, you may not be able to see the NCache .NET assemblies in the Add Reference dialog box under .NET tab.
Workaround
You can add reference to the NCache assemblies by using the Browse tab to browse to [INSTALL_DIR]/bin/assembly/
which contains all assembly files for NCache.