Visual Studio 2019 is now available for developers and dynamics 365 CE version 9.x Software Development Kit (SDK) too. However Dynamics 365 Developer Toolkit only supports for Visual Studio 2012, 2013, 2015 and it uses Dynamics 365 CE SDK 8.x assemblies and tools.
This article to make Dynamics 365 Developer Toolkit workable for VS 2019 and to prevent some common issues when setting up Plugin Library project to work with Dynamics 365 CE version 9.x core assemblies.
Special thanks to Sucheet Chavan for sharing useful information to the article.
Setting up Developer Toolkit for VS2019
Although Dynamics 365 Developer Toolkit doesn’t support after Visual Studio 2015, developers perform few workarounds to use the extension with VS2017. Following article is still valid for VS2019 with one change to the extension.
Nowadays different software systems are connected with each other in different ways to exchange data and services among them. Also maintaining cloud spaces for hosting and using cloud services have become very popular in the industry. Dynamics CRM 2016 can be hosted as on premise and it’s available as Online as well and it supports exposing its execution context to Microsoft Azure Service Bus to easily communicate with the other applications, services or devices connecting from anywhere. Dynamics CRM plugin registration tool can make Azure aware the executions in CRM.
Assume that there’s a need to update some other system on a change of data in an entity in CRM. One approach is to bring changed data in to an online location and the other system to read those data and update its data stores accordingly. Azure service bus is a cloud service that maintains queues and topics to act as intermediate location between two systems. Specialty is that; Dynamics CRM can automatically send data with its context in an event available in Dynamics CRM such as Create, Update, Delete etc…
Azure Service Bus
Azure service Bus is a generic, cloud based messaging system for connecting services, applications and devices from anywhere. It supports two types of communication models such as Queues and Topics.
Understand Azure Service Bus using following resources; Continue reading
Maintaining a Version Control System is an additional overhead for a software development team and its further difficult when the team members are connecting from different regions of the world from different networks. Some development teams use different tools with different programming languages and maintaining different types of source controls will be a challenge. Most of the time project managers track development progress from some other system and team members should log in to that system at the end of the day and log whatever the things they have done.
Microsoft provides Team Foundation Service for Source Controlling facilities as well as project management capabilities with Scrum templates.
Team Foundation Service can be accessible from anywhere with IDEs like visual studio and eclipse. Development teams can be start working on their solution without thinking of managing infrastructure setup and maintainance in the their premises. It mainly provides following areas of services;
Not like in most of the other developments, in Plugins developers have to debug the CRM plugin code at the time of running the application. Developers writing the plugin code inside the plugin and some times the logic can be write in a seperate assembly and from the plugin code it can be invoked. When writing the whole logic inside the plugin is little complex to test the plugin logic by debugging the plugin as it executes from the application itself in a given event such as create an entity, update or delete.
There are two ways of debugging a CRM plugin as follows,
 Attaching the debugger to the w3p.exe process
 Forcing the add-in to call the debugger
A plugin has written targeting Account entities as follows and a step has registered to be fired on Account entity’s Create step.
Convert DateTime to a string with a relevent format
var usCultureInfo = new CultureInfo ("en-US", false);
var date = new DateTime (2012, 3, 22, 15, 6, 0);
date.ToString ("MM/dd/yy", usCultureInfo);
Binding data from a Dictionary is not so challenging as “Key” and “Value” pairs can be used for the drop down list properties. Following code samples show the results after assigning data source to the drop down list.
Dictionary genderDictionary = new Dictionary();
this.ddlGender.DataSource = genderDictionary;
GACUTIL is the tool available to register assemblies to the GAC.
Eg.g gacutil.exe /i C:\MyAssemblies\test1.dll
But if there are more than one assemblies to be registered, use following in the command prompt
FOR %a IN (C:\MyAssemblies\*.dll) DO GACUTIL /i %a