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

Is Microsoft Dynamics CRM Affordable for Small Nonprofits?

Satish Reddy By Satish Reddy | Reading time 6 mins When considering a CRM solution, affordability is often a primary concern for small no...

2 months ago

How Microsoft Dynamics CRM Services Helps a Startup Nonprofit

Satish Reddy By Satish Reddy | Reading time 6 mins For startup nonprofits, the right Customer Relationship Management (CRM) system can be...

2 months ago

Easy Plugin Registration Tool Installation for Dynamics 365 CE Developers

Hi Folks, Are you a Power Platform or Dynamics 365 CE Developer, you would definitely need to work on Plugin Registration tool at any given po...

2 months ago

Web resource method does not exist in Dynamics 365 CE

Got the below error while working on Onload of Account record JavaScript in Microsoft Dynamics 365 CE. Script Error One of the scripts for thi...

3 months ago

How to get Environment Variable Value in Dynamics 365 CE using JavaScript?

We might have got a scenario to use the Environment Variable Value in the JavaScript in Dynamics 365 CE. In this article, will explain about r...

3 months ago

Enhancing Business Efficiency with Dynamics 365 CE/CRM AI Capabilities

Artificial intelligence (AI) is a vital catalyst for business transformations in this digital era. A leading player in this revolution

3 months ago

Interview Questions and Answers Dynamics 365 CE and Power Platform – Ultimate Guide

In today's business landscape, Dynamics 365 Customer Engagement (CE) and the Power Platform have emerged as game-changing tools that have tran...

4 months ago

Back to Basics # 72: Limit Special Characters Using a Webresource in Dynamics CRM

Recently we got a requirement to restrict user to enter special characters. Step 1 : Use the below method for restricting special characters S...

4 months ago

20 Most commonly used JavaScript Scenarios with Sample code Snippet in Form Script Dataverse/ Dynamics 365 CE

JavaScript is a powerful tool for developers working with Dataverse (formerly known as Common Data Service) and Dynamics 365 Customer Engageme...

5 months ago

New and Retired Microsoft Dynamics 365 Certifications

Microsoft has recently shared updates regarding new and retired certifications for Microsoft Dynamics 365. This post provides an overview of t...

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