Power Platform Tools for Visual Studio:
Following the retirement of Microsoft Regional Discovery Service in January 2021, our beloved extension for visual studio, Dynamics 365 Developer Toolkit became obsolete. Being unable to connect to online power platform environment means that we cannot use Dynamics 365 Developer Toolkit to register or deploy assemblies and web resources from visual studio project to online environment. Thankfully, Microsoft has planned for this and release a new extension to fill the void that Dynamics 365 Developer Toolkit left (RIP).
Introducing Power Platform Tools
Using the new service which enable connection from visual studio to power platform environment called Global Discovery Service, Power Platform Tools set out to be a convincing replacement for Dynamics 365 Developer Toolkit with many more utilities features offered to developers than its’ predecessor.
At the time of this article, the latest version of this extension is 220.127.116.11. This version supports connecting to power platform as well as creating, debugging and deploying plugins. Many more features are still in preview including development/deployment of custom workflow activities, web resources, integration technologies like Azure Service endpoints, webhooks, etc.
Create/Develop/Deploy Power Platform plugins
Just like what Dynamics 365 Developer Toolkit has provided us. Power Platform Tools augments Visual Studio with interfaces, features to interact with online environment.
- Create/Update/Delete plugins.
- Sign and deploy plugin assemblies.
- Modify plugin steps and images.
- Choose which component to deploy.
New plugin created by Power Platform Tools is different from Dynamics 365 Developer Toolkit. This is because the class PluginBase, which your custom plugin classes inherit from, is different between the 2 extension. Because of this, certain features of Power Platform Tools are not available for plugin project generated after Dynamics 365 Developer Toolkit template.
Capability of profiling plugin execution inside Visual Studio.
This feature is a game changer when it comes to plugin development for online environment. Traditionally, debugging a plugin on a dynamics 365 online environment is quite cumbersome. Mostly because of performing this task requires another piece of software. Plugin Registration Tool. I personally hate it having to open another application just to debug my code.
Now, with Power Platform Tools, I can comfortably profile and run debug execution all inside my code editor.
- Profile plugin execution step
- Debug plugin code with just 2 clicks. With Power Platform Tools, developers no longer need to manually attach the debugger to Plugin Registration process to debug plugin code for power platform environment.
All this plugins utilities eliminate the need to use Plugin Registration Tools to interact with the environment.
Generate early bound classes
Yes, you read it right. Power Platform Tools provides us with the ability to generate entity classes from the connected organization inside Visual Studio.
- This feature allows us to generate entity classes separately or in batch
- Pick list for entities to generate
- Parameters for generated file
Although this feature should satisfy common use cases of your project. There are some advanced outcomes which help you to better organize your code like field name constants, option set enums, etc. For these you need other method to generate entity class which you can find in this article.
Custom workflow activities
Create or deploying a custom workflow activity remains pretty much the same as Dynamics 365 Developer Toolkit. The workflow project template of Power Platform Tools also has an updated base class. Dynamics 365 Developer Toolkit workflow activity code will need review and updates in order to work with the new template.
Installing Power Platform Tools
As of now, Power Platform Tools only works with Visual Studio 2019. To install Power Platform Tools onto your Visual Studio 2019, you can either download the .vsix file from the official market page or follow this guide to install it through Visual Studio Extension Manager.
Can we migrate/convert projects from Dynamics 365 Developer Toolkit template to Power Platform Tools template?
The team behind Power Platform Tools makes it clear that this extension does not intend to support compatibility with Dynamics 365 Developer Toolkit. This information is in the overview of this extension on visual studio market place.
Of course we always can create a new power platform solution then manually move the code. During this process of moving your code to the new solution, you will have to update a good portion of your code because of the different between the base class of each template. The detail of these changes deserve an article of its' own. After the move, you should delete the old plugin assemblies from your power platform environment then deploy the newly updated one.
For example, the new PluginBase class
vs the old PluginBase class
The main different of the new plugin base vs the old one is that how the services are served. The class LocalPluginContext has been refined. Property names of this class now precisely tell us what they are for. With this, we have to update our code to the new standard.
Some final words
Power Platform Tools is fairly new and changes are still coming. The information in this article could be outdated at the time you are reading this. I will try my best to update this article if any major changes of Power Platform Tools come out.
If I am wrong, please correct me in the comment. Your opinions are much appriciated.