After registering your plugin if you wish to change the code, you might get a build error when building the solution again in Visual Studio:
something like :
Unable to copy file "obj\debug\MyPlugin.dll" to "..\..\..\..\Program Files\Microsoft Dynamics CRM Server\Server\bin\assembly\MyPlugin.dll". the process can not access the file "..\..\..\..\Program Files\Microsoft Dynamics CRM Server\Server\bin\assembly\MyPlugin.dll". because it is being used by another process.
This occurs because Microsoft CRM has a lock on the DLL. In order to release the lock, you have to restart the service that has it locked.
For synchronous plug-ins, the CRM Application Pool within IIS can be recycled, or you can run IISReset.
For asynchronous plug-ins and custom workflow assemblies, you have to restart the Microsoft CRM Asynchronous Processing Service in the Services Control panel Applet.
To recycle the CRM Application Pool from the command line: Click Start, Run, type “cscript c:\windows\system32\iisapp.vbs /a CRMAppPool /r” and press enter.
For synchronous plug-ins, the CRM Application Pool within IIS can be recycled, or you can run IISReset.
For asynchronous plug-ins and custom workflow assemblies, you have to restart the Microsoft CRM Asynchronous Processing Service in the Services Control panel Applet.
To recycle the CRM Application Pool from the command line: Click Start, Run, type “cscript c:\windows\system32\iisapp.vbs /a CRMAppPool /r” and press enter.
To restart the Microsoft CRM Asynchronous Processing Service from the command line: Click Start, Run, type “net stop mscrmasyncservice” and press enter. Click start, Run, type “net start mscrmasyncservice” and press enter.
No comments:
Post a Comment