Monday, August 23, 2010

Azure / CRM app won't deploy - Initializing, Busy, Stopping

I made a simple code change to an Azure WorkerRole service today. Before deploying the app, I noticed that the folder where my code lived on my machine didn't match up with source control so I did a little readjusting of folders. No big deal, I thought. The application compiled fine and ran on my local dev fabric.

After deploying the updated Azure service, the deployment screen showed Initializing, then Busy, followed by Stopping... and then went back to Initializing, Busy, etc. It was stuck in a loop. I read something about this in the past and knew that it related to invalid DLL references, invalid configuration or a number of other things.

After convincing myself that my code change was working and  had proper exception handling just in case, I put all the pieces of the application back in their previously known working locations. Voila! The application deployed to Azure fine.

What happened is that Visual Studio started referencing 32-bit versions of the CRM SDK assemblies (microsoft.crm.sdk.dll and microsoft.crm.sdktypeproxy.dll) when I moved the application to different folders -- it could no longer find the 64-bit files I referenced previously. So when I deployed the application the 32-bit CRM assemblies went along up to Azure... but Azure only runs with 64-bit assemblies!

I was punished once again by good intentions. But at least I can add this troubleshooting lesson to my list for future reference.

No comments:

Post a Comment