When using the Dynamics CRM toolkit, you get an easy way to develop and deploy plugins or workflows. While I was doing some development today for CRM online, I received the following error when trying to deploy my plugin:
Error 1 Error registering plugins and/or workflows. Action failed for assembly ‘CrmSolution.Workflow, Version=126.96.36.199, Culture=neutral, PublicKeyToken=7a15878c13b08394’: Assembly must be registered in isolation. C:Program Files (x86)MSBuildMicrosoftCRMMicrosoft.CrmDeveloperTools.CrmClient.targets 176 4 CrmPackage
After doing some digging without success, I finally ended up looking into what’s in the RegisterFile.crmregister file. This file actually lists the items that are to be deployed to CRM. And it all became clear.
In there, I noticed this:
<Solution Assembly=”CrmSolution.Workflow.dll” Id=”086f7c4c-a2bf-e111-9066-3c4a92dbc837″ IsolationMode=”None” SourceType=”Database” />
While for my plugins there was this:
<Solution Assembly=”CrmSolution.Plugins.dll” Id=”885253ac-91bf-e111-9066-3c4a92dbc837″ IsolationMode=”Sandbox” SourceType=”Database”>
Obviously, you can’t hope to deploy online a workflow outside the sandbox… So I simply replaced the IsolationMode of the workflow part from “None” to “Sandbox”, and that was it!
Remember that to deploy plugins in full trust (on premise), you need to be a deployment administrator (done in the deployment manager). This is not the case for deploying a plugin in sandbox mode, being a system administrator is enough.