Just as with developing custom solutions, the implementation of your deployment package may also contain errors. You should also consider the following when deploying Microsoft Dynamics CRM solutions:
Missing prerequisites
Resetting IIS
Customizations management
Your solution’s installation procedure needs to check for any prerequisites. You should never assume that a customer’s environment possesses anything beyond the minimum prerequisites required by Microsoft Dynamics CRM itself.
The most common missing prerequisite when installing a solution is the .NET Framework. Three versions of the framework are typically encountered in customer Microsoft Dynamics CRM 4.0 environments: 3.0, 3.5, and 3.5 SP1. If you use Visual Studio 2008 or Visual Studio 2005 to create your MSI, you can specify a .NET Framework Launch Condition. Figure 9-12 shows how you can select a .NET Framework Launch Condition from your setup project, and Figure 9-13 shows how you select the version you want to enforce.
The following are additional prerequisites checks you may want to consider for your solutions:
Operating system version
RAM
CPU
Local disk space
Database space
Network latency
Network bandwidth
Languages spoken by end users
Other Microsoft Dynamics CRM solutions produced by third-parties that are already installed
In most cases you may want to warn customers about your prerequisites using documentation (much like the Microsoft Dynamics CRM Implementation Guide). In other cases your installer should perform any dependency checking and provide the user with the opportunity to correct missing dependencies prior to continuing.
When attempting to update plug-ins and workflow assemblies, you may need to reset IIS because Microsoft Dynamics CRM caches instances of these assemblies in memory. You can choose to have customers do this manually or have your installer and configuration applications do this automatically. The best way to restart IIS using .NET is to use the Process.Start method. For more information regarding the Process.Start command, please review http://msdn.microsoft.com/en-us/library/h6ak8zt5.aspx.
You generally use the native import/export customizations functionality of Microsoft Dynamics CRM when deploying customizations between environments. However, this process can also be found to cause deployment errors. In order to help minimize errors, always make customizations changes to a master Microsoft Dynamics CRM deployment and then import those changes to new environments.
Sometimes a large number of customizations create a server timeout, which will fail the import. You can attempt to import a few entities at a time or try some of the registry changes listed in the following Microsoft Knowledge Base article: http://support.microsoft.com/kb/918609.
Finally, you can use the MetadataService Web service to create attributes and relationships or automate the import and export process with the CrmService Web service.