.NET Client API Prerequisites
In order to practically utilize the powerful features of .NET client-side NCache, make sure to implement the prerequisites discussed below.
.NET Client Prerequisites
- Install either of the following NuGet packages in your .NET client application:
- Enterprise: Alachisoft.NCache.SDK
- Community: Alachisoft.NCache.Community.SDK
- Include the following namespaces in your application:
- The cache must be running.
- Make sure that the data being added is serializable.
- To ensure the operation is fail-safe, it is recommended to handle any potential exceptions within your application, as explained in Handling Failures.
- To handle any unseen exceptions, refer to the Troubleshooting section.
.NET Versions Compatibility
The NCache Client SDK supports different .NET versions for maximum compatibility across both modern and legacy applications. Ensure your development environment aligns with one of the following:
- .NET: Compatible with .NET 6.0 and above, including .NET 7 and .NET 8.
- .NET Framework: Fully supported on 4.7, 4.7.1, 4.7.2, 4.8, and 4.8.1.
- Legacy Support: For applications built on .NET Framework 4.0 or .NET 4.0 Client Profile, you must use NCache 5.3.4 SDK. While these legacy applications can use the latest version of NCache on the server-side, the client-side must specifically use the 5.3.4 SDK, as newer SDK versions do not support these legacy frameworks. The NCache 5.3.4 SDK ensures backward compatibility with these older frameworks while remaining fully compatible with the latest NCache versions.
Note
If you must use .NET Framework 4.6.2 and encounter any issues, please refer to the troubleshooting section.
Feature Specific NuGet Packages
Aside from the NuGet Packages employed in most features, you should add the following packages based on the feature you intend to use with your .NET client application.
Note
Any feature not mentioned in the list below either does not work with the specified feature or only requires the general NuGet Packages that we've previously discussed.
- For CLR Procedures: [Deprecated]
- Enterprise: CLRStoredProcedure.NCache
- For LINQ Queries:
- Enterprise: Linq.NCache
Feature Specific Namespaces
Aside from the namespaces employed in most features, you should add the following namespaces/packages/classes based on the feature/API you intend to use and whether or not they require them.
Note
Any feature not mentioned in the list below either does not work with the specified feature or only requires the general namespaces/packages/classes.
- For Tags, Named Tags, Locking, and Expirations:
- For Cache Data Dependencies, e.g., KeyDependency, FileDependency, and Database Dependencies: [Deprecated]
- For JSON Data: [Deprecated]
- For Data Structures:
- For SQL Queries:
- For LINQ Queries:
- For Event Notifications
- For Continuous Query: [Deprecated]
- For Pub/Sub: