We're migrating Azure application to on-premise data-centres. When deploying to Azure package to Cloud services we need to use Azure in Role Cache. When deploying to Windows Server on-premise we need to use Windows Server AppFabric Cache. How do you make it work in one solution?
Detailed explanation
We connect to Azure in Role Cache with Azure SDK v 2.2 client assemblies.
Microsoft.ApplicationServer.Caching.Client.dll, assembly version 1.0.0.0, file version 1.0.5137.0
Microsoft.ApplicationServer.Caching.Core, assembly version 1.0.0.0, file version 1.0.5137.0
We connect to Windows Server AppFabric Cache v 1.1 using client assemblies that came with instalation.
Microsoft.ApplicationServer.Caching.Client.dll, assembly version 1.0.0.0, file version 1.0.4632.0
Microsoft.ApplicationServer.Caching.Core, assembly version 1.0.0.0, file version 1.0.4632.0
Assemblies visioning issues are addressed in Windows Server AppFabricCache, Exception, Check the client version thread.
Issue is that our main web project ends up with references to all mentioned assemblies which have duplicate names and versions. We wouldn't like to hack our way thru it. Options from the worst to not so bad are to create custom assembly loading or to modify build process. What's the preferred way? Have we strayed from the path big time?