When writing code to leverage the Windows Server AppFabric caching capabilities you will need to set a reference to the caching client classes, which are located in Microsoft.ApplicationServer.Caching.Client.dll.  Within Visual Studio 2010 this process is a bit different than how you normally approach adding a .NET Framework library reference. Usually you click the project and select to add a reference.  However, due to the AppFabric installation process, the procedure for adding the caching client reference differs.

To add a reference to Microsoft.ApplicationServer.Caching.Client

  1. Right-click your project and select Add Reference.
  2. Click the Browse tab.
  3. Enter the following in the file name and then click Enter.
    • 64bit Windows: %windir%\Sysnative\AppFabric
    • 32bit Windows: %windir%\System32\AppFabric
  4. Locate and select both Microsoft.ApplicationServer.Caching.Client and Microsoft.ApplicationServer.Caching.Core
For more information see the official documentation in Preparing the Development Environment for Cache Client Development