Loading...

Dynamics 365 SDK Tool with PowerShell

Dynamics 365 SDK Tool with PowerShell
Dynamics 365 SDK Tool with PowerShell Lloyd Sebag Tue, 05/17/2022 - 15:22
Body

Dynamics 365 SDK Tool with PowerShell:

Hey All, 

I share with you a nice trick that could help. 

For the ancients Dynamics 365 workers like me, you remember that we had the possibility to download the CRM SDK locally in which was the dev tools offered by Microsoft, such as the Plugin Registration Tool.

However, for quite a few years now, it is no longer possible to download the SDK. But where are the tools?
Some will answer in XrmToolBox, and some will say in packaged Nuget. Both answers are correct (almost), but they do not allow us to know how we can find these tools, locally on our laptop, without depending on XrmToolBox or a Visual Studio project.

Indeed, one solution would be to simply create an empty VS project and reference the nugget package there. So it would upload to the project's Packages directory and all good. But if we don't want to depend on Visual Studio, what can we do?

Microsoft offers us a great trick, based on a small PowerShell script. Here is the original post: Download tools from NuGet

Just follow these steps:

  • Create an empty directory on your Laptop where you want to have your tools.
  • Create a file: UpdateNugetPackages.ps1

You will get something like this. 

Dynamics 365 SDK Tool with PowerShell

  • Add the following code.
[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

##
##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
  • And that's it. Then you just have to double click on the file to launch the PowerShell script which will itself download the latest versions of the SDK tools, locally, in your folder!

fff

Dynamics 365 SDK Tool with PowerShell

Published on:

Learn more
Featured Articles | Dynamics Chronicles
Featured Articles | Dynamics Chronicles

Welcome to our blog, the content is entirely dedicated to Microsoft Dynamics 365, CRM, Power Platform, Common Data Service (CDS) but also Azure. Follow us !

Share post:

Related posts

Why Plugin Depth Matters in Dynamics CRM

Plugin development in Dynamics CRM is one of the most advanced and intricate components, requiring deep expertise in the platform's event pipe...

9 days ago

Debunking: Dynamics CRM Destination – How Text Lookup Works

When we want to push data to Dataverse/Dynamics CRM using SSIS – KingswaySoft, usually there are relationships (lookup) that we need to ...

1 month ago

Understanding Activity Party Types in Dynamics 365 CE

Dynamics 365 Customer Engagement features 11 unique activity party types, identified by specific integer values in the ActivityParty.Participa...

1 month ago

Debunking: KingswaySoft Dynamics CRM Source- Output Timezone

Hi! I’m back after so a long hiatus (probably I’ll write the reason for this later 🤣). As [lazy] Developers, we’re most lik...

1 month ago

How to configure donotreply email using Shared mailboxes in Dynamics 365 CE?

This article explains how to create and configure a Shared Mailbox in Microsoft 365 for sending emails to users in Dynamics 365 CE. It details...

1 month ago

Enhancing Knowledge Retrieval with Microsoft Copilot Agents in Dynamics CRM and SharePoint

Studies show that 70% of employees spend unnecessary time searching for information across multiple systems, leading to productivity losses an...

4 months ago

{How to} become MCT Microsoft Certified Trainer on Microsoft Dynamics 365 Customer Engagement step by step instructions

Hello Everyone,Today i am going to share guidelines on becoming Microsoft Certified Trainer on Microsoft Dynamics 365 Customer Engagement or P...

5 months ago

Default Value vs. Current Value in Dynamics 365 CE: Key Differences

In Dynamics 365 CE (Customer Engagement), environment variables are used to manage configuration settings for solutions. When dealing with env...

5 months ago

How to Write and Understand a Dynamics CRM Plugin

 Here’s a sample plugin code in Dynamics CRM written in C#, along with a detailed explanation of each line. This plugin will update the "...

6 months ago

Dynamics 365 CE Solution Import Failed in Azure DevOps Pipelines

Got the below error while importing Dynamics CRM Solution via Azure DevOps Pipeline. 2024-12-18T23:14:20.4630775Z ]2024-12-18T23:14:20.74...

6 months ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy