In Visual Studio 2015, I am unable to create a plugin by right clicking and selecting “plugin” as shown below.
This problem is dynamics 365 V9 specific and does not occur with older versions of Dynamics 365.
This is caused by the following error that occurs “An error occurred while trying to load components from the Plug-in Registration Tool” shown below
If I open and connect the plugin registration tool to my dynamics 365 environment manually it works fine.
My Visual Studio Dynamics Config is shown below. It is properly referencing the needed locations in the Developer Guide that house the dll files and related components.
I am using the V9 version of the SDK which is very different than the 8.x SDK and is now called the Developer Guide.
It does not produce a /bin directory. It has only the following four directories:
ConfigurationMigration
CoreTools
PackageDeployment
PluginRegistration
It is downloaded using the following powershell code per the instructions at https://community.dynamics.com/crm/b/crmtipsfromadeveloper/archive/2018/01/11/know-how-d365-v9-crm-sdk-sdk-is-reborn-as-developer-guide-how-to-use-it
$sourceNugetExe = "dist.nuget.org/.../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 ## ##Download CoreTools ## ./nuget install Microsoft.CrmSdk.CoreTools -O .\Tools md .\Tools\CoreTools $coreToolsFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.CoreTools.'} move .\Tools\$coreToolsFolder\content\bin\coretools\*.* .\Tools\CoreTools Remove-Item .\Tools\$coreToolsFolder -Force -Recurse ## ##Download Configuration Migration ## ./nuget install Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf -O .\Tools md .\Tools\ConfigurationMigration $configMigFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf.'} move .\Tools\$configMigFolder\tools\*.* .\Tools\ConfigurationMigration Remove-Item .\Tools\$configMigFolder -Force -Recurse ## ##Download Package Deployer ## ./nuget install Microsoft.CrmSdk.XrmTooling.PackageDeployment.WPF -O .\Tools md .\Tools\PackageDeployment $pdFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PackageDeployment.Wpf.'} move .\Tools\$pdFolder\tools\*.* .\Tools\PackageDeployment Remove-Item .\Tools\$pdFolder -Force -Recurse ## ##Remove NuGet.exe ## Remove-Item nuget.exe
Also -- All my DLL versions match up as shown below between what’s in Visual Studio and what’s in the CoreTools folder in the Developer Guide.
How can I fix the error mentioned at the top of this post so I can create a plugin as I have always done in the past prior to Dynamics 365 V9?