Download Plugin Registration Tool using PowerShell – Dynamics 365 CE

Hi Everyone,

Here are the steps to download Dynamics 365 CE Plugin Registration Tool via PowerShell.

1) Type Windows Powershell in windows start menu and open it.
2) Navigate to the folder where you would like download the tool.


3) Copy and paste the following PowerShell script into the PowerShell window and press Enter.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
$targetNugetExe = ".\nuget.exe"
Remove-Item .\Tools -Force -Recurse -ErrorAction Ignore
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
Set-Alias nuget $targetNugetExe -Scope Global -Verbose

##
##Download Plugin Registration Tool
##
./nuget install Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool -O .\Tools
md .\Tools\PluginRegistration
$prtFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool.'}
move .\Tools\$prtFolder\tools\*.* .\Tools\PluginRegistration
Remove-Item .\Tools\$prtFolder -Force -Recurse


4) You will see the Tool at the given path.

Hope this helps.


Happy 365’ing
Gopinath.

Object reference not set to an instance of an object – error in Dynamics 365 Plugin Registration Tool

Hi Everyone,

Today I was working on some plugin work and was On-Premise system and when I try click on Register new assembly via Plugin Registration Tool, I was getting “Object reference not set to an instance of an object” error.

If it was my machine, I could have downloaded XRMToolBox or latest Plugin Registration tool but I was working on the server and don’t have any permissions to download the required. I was completely stuck with it and don’t even know what to do.

After quick search, came to know that clearing contents in Appdata would solve the issue.

Navigated to “C:\Users\\AppData\Roaming\Microsoft\PluginRegistration” and deleted all the contents and then Plugin Registration started working normally.

Hope this helps.


Happy 365’ing
Gopinath.