Deploying the same project to use Windows Server App Fabric and Azure App Fabric RRS feed

  • Question

  • I have an ASP.net application to which I have added an Azure deployment project.  This app has been running on Windows Server 2008 using Windows Server App Fabric.  I would like to be able to deploy the same application without modification to Azure and use Azure App Fabric, specifically the Caching.

    In my project I have references to App Fabric DLL's similar to:


    However when I try to access the Cache in Azure I get the following exception

    Could not load file or assembly 'Microsoft.ApplicationServer.Caching.Client, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified

    I presume I need to replace my AppFabric references with those from the Azure App Fabric.

    Is there any way to be able to use the same references to use AppFabric caching on both Azure and Windows Server deployments without having to change references?

    Friday, February 17, 2012 9:12 AM


All replies

  • Hi Keith,

    The error you're seeing here is probably because the assembly is not included in the package. Change the reference to "Copy Local = True" to make sure it gets deployed to your webrole.

    As for using the same assembly locally and in Windows Azure I'm not 100% sure if you can do this. The version of the assembly you're using is version, but the version provided by the Azure SDK is v101.0.0.0 meaning there will probably be a difference between two assemblies (and their functionalities).


    Friday, February 17, 2012 9:43 AM
  • Even when I copy the DLL's local it doesn't work as you mentioned because of the different version numbers.

    Do Microsoft have a strategy on how to manage applications that are intended to be deployed to both Windows Server and Azure platforms that use AppFabric, do you basically need to have 2 different solutions, one that references Azure the other that references Windows Server?

    Friday, February 17, 2012 12:04 PM
  • Hi,

    As pointed out by Sandrino, currently we cannot use Windows Server AppFabric assemblies to work with Windows Azure cache. Please use the Windows Azure assembly. If you want them to unify, I would like to suggest you to submit a feature request on http://www.mygreatwindowsazureidea.com/forums/40626-windows-azure-appfabric-feature-voting.

    Best Regards,

    Ming Xu.

    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    • Marked as answer by Arwind - MSFT Friday, February 24, 2012 3:18 AM
    Monday, February 20, 2012 5:32 AM