CacheInstaller.exe has stopped working

I got the following error today when trying to enable Windows Azure Role Based Caching on an existing Azure project.

CacheInstaller.exe error message

Unfortunately, there wasn’t much to go on when running my solution through VisualStudio so I thought I would try and run CacheInstaller.exe manually.

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: the role environment has not been initialized at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.get_IsEmulated()

This error occurs due to a conflict between the Windows Azure Caching Preview plug-in and the Windows Server App Fabric Caching installation.

To fix this, you need to uninstall the CachingServices and CacheClient runtime features and the Cache Administration Administration Tool in Windows Server AppFabric. You can access the Remove Features dialog through Start, All Programs, Windows Server AppFabric, and click Add or remove Features.

AppFabric setup wizard uninstallation instructions

The uninstillation process will take several minutes to complete. Once it is finished, restart your computer and try to run your project again with caching enabled.

Special thanks to David Romeo for helping me through this particular error.

Creative Commons License

What do you think?