Deployment to Azure Cloud Services from VS using SDK 2.5

   —   
This article describes a workaround for errors you may run into during deployment to Azure from Visual Studio
If you are trying to deploy Kentico Azure 8.2 project from Visual Studio using SDK 2.5, you might run into the following error during the process:

The "CSPack" task failed unexpectedly.
System.Runtime.Remoting.RemotingException: Object '/698c176b_2504_49ad_8a43_65c8da43e9a4/8vfhq6supfrpaogzr0y0yqdn_36.rem' has been disconnected or does not exist at the server.

 
Unfortunately it is a bug in the current version of Azure SDK and should be fixed in the next version release.
 
A temporary workaround is to create the deployment package using CSPack tool via Powershell, a sample example of the command is following:

& $cspackPath "$tempPath\CMSAzure\ServiceDefinition.csdef" /role:"CMSApp;$releaseCMSAppPath" /sitePhysicalDirectories:"CMSApp;Web;$releaseCMSAppPath" /out:"$packageFilePath"
$releaseCMSAppPath = "$SLNPath\CMSAzure\obj\Release\CMSApp"
 - directory for the role binaries which are used when the application is run locally
$packageFilePath = "$tempPath\CMSAzure\bin\Release\CMSAzure.cspkg" - location for the role binaries
 
Please note if you want to utilize Smart Search module, you need to include Smart Search worker role as well.
 
Some more examples of usage with the description of all parameters can be found in the official MS documentation - CSPack Command-Line Tool.
 
 
 
Share this article on   LinkedIn

Filip Ligač

Hi, I work as a Cloud Support Specialist here at Kentico. I write about Microsoft Azure and and am trying to extend knowledge about the best practices for deployment.