Dynamics CRM: Create Plugin Project Easier + Faster!

Creating plugin projects in the past is not a simple task. You need to remember a lot of steps to make it. From what I remember the steps are: Create .csproj, set .NET Framework 4.6.2, Install Microsoft.CrmSdk.CoreAssemblies, etc. You can follow this link for the detailed steps for manual creation if you want.

Then I found a very easy way to create a plugin project when I look at PowerApps CLI, got a command to help us create the plugin project without any hassle. But before we go there, you need to install the PowerApps CLI from this link. If you already installed it, to make sure you use the latest PowerApps CLI, you need to run this command:

pac install latest

To create the project, you need to run open Developer Command Prompt for Visual Studio (automatically installed when you installed visual studio to your machine). The purpose of using this command prompt is because you need to sign the assembly using snk.exe.

Developer Command Prompt for Visual Studio

After you open this Developer Command Prompt, what you need to do is creating the folder to the directory that you want. Remember, the naming of the folder will be the project’s name. So make sure you follow the standard naming for it. For example, I give the folder: “D:\Code\Test.Demo.Plugins“.

In your Developer Command Prompt, you need to cd (Change Directory) to the above directory path, then run this command:

pac plugin init

Here is the result on the command prompt:

Result after you execute the above command

You can open the *.csproj and try to build it. Your plugin project is ready to be use!

The project is ready to be use

2 thoughts on “Dynamics CRM: Create Plugin Project Easier + Faster!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.