Could not load Microsoft.ApplicationServer.Caching.sql provider

Error

Use-CacheCluster :ErrorCode:SubStatus:Provider "System.Data.SqlClient" instantiation failed: Could not load file or assembly 'Microsoft.ApplicationServer.Caching.SqlProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find th e file specified. At line:1 char:62 + Import-Module DistributedCacheAdministration;Use-CacheCluster<<<< + CategoryInfo : NotSpecified: (:) [Use-CacheCluster], DataCacheException + FullyQualifiedErrorId :

ERRCMS0007,Microsoft.ApplicationServer.Caching.Commands.UseCacheClusterCommand

Resolution

The error is because there is a missing entry for the Required Assemblies section in the configuration file (C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules\DistributedCacheAdministration\DistributedCacheAdministration.psd1) of the DistributedCacheAdministrationPowershell module.

Simply added the missing DLL in the configuration file solve the issue:

@{ ModuleVersion = '1.0' GUID = 'e0f1ac07-c706-4b65-ac0b-63ac0ab31237' Author = 'Microsoft Corporation' CompanyName = 'Microsoft Corporation' Copyright = '(c) Microsoft Corporation. All rights reserved.' Description = 'Microsoft AppFabric Caching Administration module' PowerShellVersion = '2.0'RequiredAssemblies=

"..\..\Microsoft.ApplicationServer.Caching.SqlProvider.dll",

"..\..\Microsoft.ApplicationServer.Caching.Management.dll", "..\..\Microsoft.ApplicationServer.Caching.Server.dll", "..\..\Microsoft.ApplicationServer.Caching.Core.dll", "..\..\Microsoft.WindowsFabric.Common.dll", "..\..\Microsoft.WindowsFabric.Data.dll", "..\..\Microsoft.WindowsFabric.Data.Common.dll", "..\..\Microsoft.WindowsFabric.Federation.dll" TypesToProcess = @() FormatsToProcess = 'Microsoft.ApplicationServer.Caching.ManagementPS.format.ps1xml' NestedModules = 'Microsoft.ApplicationServer.Caching.ManagementPS' CmdletsToExport = '*'