Showing posts with label Plugin Registration Tool. Show all posts
Showing posts with label Plugin Registration Tool. Show all posts

Monday, 28 September 2020

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.

Sunday, 27 September 2020

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\<UserName>\AppData\Roaming\Microsoft\PluginRegistration" and deleted all the contents and then Plugin Registration started working normally.

Hope this helps.

--
Happy 365'ing
Gopinath.

Thursday, 27 February 2020

Using the Plugin Registration tool with MFA-enabled accounts in Dynamics 365

Hi Everyone,

Today, I was working on some plugins and there is multi factor authentication enabled on the user account which I was using and I was not sure about the process that has to be followed to login. However, after search I did find the solution for the same. 

When you hit the Login button in Plugin Registration Tool with Username, Password and multi factor authentication enabled, the login fails shows the below message.


"You don't have permission to access any of the organizations in the Microsoft Common Data Service region that you specified. If you're not sure which region your organization resides in, choose "Don't know" for the CDS region and try again. Otherwise check with your CDS administrator."

To resolve the issue, you must not enter your username and password in the login window and when you click Login, you will taken to Microsoft Log-in screen as normal and asks you to enter username and password followed by MFA.

Hope this helps.

--
Happy 365'ing
Gopinath