Wednesday, October 26, 2011

CRM Developer Toolkit is Now Officially v1.0

Along with the latest version of CRM SDK (v5.0.7) released today, Microsoft Dynamics CRM team has released the first official version of CRM Developer Toolkit.

After a rough 10 minutes play, I haven't noticed much difference from the beta version that was released about 3 months ago. But one nice thing is now we can use integrated authentication when connecting to CRM server.
[UPDATE - Nov 2, 2011] According to CRM SDK team,one significant change from the beta developer toolkit is the XAML workflow activity project type.
CRM Developer Toolkit - Connection
The toolkit is accompanied by a readme file, which you should check out. It described some common issues when working with the toolkit. Here are some of the issues that you may encounter and the workarounds that are currently available (Some typos were fixed from the original file).
Visual Basic .NET is not supported (131574)
The Developer Toolkit does not support VB.NET.

No upgrade path for projects created with the Microsoft Dynamics CRM 4.0 Developers Toolkit (121629)
The Microsoft Dynamics CRM Developer’s Toolkit for CRM 4.0, which provided a sample project and integration with Visual Studio, was released in April 2009 on MSDN Code Gallery.
The Developer Toolkit for CRM 2011 has been completely re-written to support native Visual Studio development practices and project templates, to be less dependent on MSBuild, and to improve deployment support for new Microsoft Dynamics CRM development paradigms, including Microsoft Dynamics CRM Solutions and Web Resources.

Sporadic "Object Reference not set to an instance of an object" errors when using the CRM Explorer (138780)
Issue: When using the CRM Explorer "Object Reference not set to an instance of an object" errors occur sporadically.
Workaround: If you encounter this error while performing an operation, refresh the organization tree and try the operation again.

Invalid Project templates for CRM WorkflowLibrary (138374)
Issue: After installing the CRM Developer Toolkit, when you create a new project, below the Installed Templates for Visual C# you will see a CRM Workflow Library group containing a number of CRM Workflow Library project templates.

Workaround: Do not use these project templates.

When an error occurs while deploying a solution, other solution components will not be deployed. (126277)
Any solution components deployed before the error occurs will succeed and will not be rolled back after the error occurs. Any solution components that were not deployed before the error will not be deployed.

Solution components are added to default solution, if specified unmanaged solution is deleted. (126536)
If you configure your Visual Studio solution to connect to a specific unmanaged solution and that solution is later deleted, the solution components will still be deployed to the default solution.

The RegisterFile.crmregister must be manually edited after a generated class is deleted (139890)
Issue: If you attempt to deploy a solution after deleting a class generated for a plugin or workflow you will see the following error:
Error registering plugins and/or workflows. Plug-in assembly does not contain the required types or assembly content cannot be updated. 
Workaround: Open the RegisterFile.crmregister file to remove the <Plugin>,<WorkflowType>, or <XamlWorkflowType> node where the TypeName attribute specifies the fully qualified name of the class that was deleted.

Invalid error message following any other error when adding a web resource (135124)
When a validation error occurs due to a problem adding a web resource the following error message will follow it:
The selected file is not a valid type of web resource 
For example, when adding a web resource with the same name as an existing web resource you will get the expected error "A file with this name already exists. Please give it a unique name." but after clicking OK to close that error you will also get the invalid error incorrectly indicating that the file is not a valid type of web resource.

RegisterSchema.xsd uses enumeration values for specifying the stage of a plug-in step that are inconsistent or misleading. (136101)
Issue: For the <Step> elements within the RegisterFile.crmregister the enumeration defining valid values used by the Stage attribute do not match those used by the Plugin Registration Tool. The following table shows how the equivilent values used in the Plugin Registration tool:

RegisterFile.crmregister values Plugin Registration Tool values
PreOutsideTransaction PreValidation
PreInsideTransaction PreOperation
PostOutsideTransaction PostOperation

The enumeration value PostOutsideTransaction is misleading. PostInsideTransaction would be a more accurate because this represents Stage 40. See Event Execution Pipeline : Pipeline Stages for more information.

Duplicate file extensions added when existing web resources are added to project(138384)
Issue: When adding web resources from another solution to the current project in the Developer Toolkit using the Add to Packaging Project command in the CRM Explorer, the web resource files are added to the packaging project and a corresponding file extension is added to the name of the file. For example, an existing web resource named filename.js will be filename.js.js. This has no effect on the behavior of the web resource because the unique name used by the web resource is not necessarily the same as the file name.

Workaround: You can re-name the file used in the packaging project to remove the duplicate file extension.

Error building solution that includes XAML Workflow projects (139788)
Issue: By default the reference to System.Runtime.Serialization is not included in XAML Workflow projects. If you do not add this reference an error will occur when you attempt to build the project.

Workaround: Add a reference to System.Runtime.Serialization to any XAML Workflow projects you add.

Solutions drop-down displays managed solutions (136003)
Issue: When you connect to the Microsoft CRM Server and select and organization you have the option to select a solution. The solutions listed may include managed solutions. If you choose a managed solution when you later try to deploy your solution the following error may occur:

Error registering plugins and/or workflows. The PluginAssembly entity or component has attempted to transition from an invalid state: ComponentStateName: None; ComponentOperation: Create; ComponentSolutionType: Solution; SolutionOperationContext: None; IsProtected: True; IsBeingPublished: True.

Workaround: When you choose a solution be sure to choose an unmanaged solution.
It should be noted that the help file is now part of the entire SDK .chm file.

I have previously blogged about some typical development scenarios using the toolkit, you may want to check out if you are interested.

Hope this helps.


  1. Just started to use developer Toolkit. Seems like partially helper partially new issues bringer. Anyway I have found solution of my issue here.

    Thank you Daniel!

  2. Thanks a lot for such good blog which very useful in deployment through Developer Toolkit.