微软动态CRM专家罗勇 ,回复312或者20190311可方便获取本文,同时可以在第一间得到我发布的最新博文信息,follow me!我的网站是 www.luoyong.me 。
从Dynamics 365 Customer Engagement (V9.0)开始,不再像以前一样提供SDK (Software Development Kit)下载了,应该学习在线文档 Developer Guide for Dynamics 365 for Customer Engagement apps 。今天先讲一下如何下载工具,主要是根据在线文章 Download tools from NuGet 。
本文提到下载的工具包括如下:
Tool | NuGet Package |
---|---|
Code generation tool CrmSvcUtil.exe | Microsoft.CrmSdk.CoreTools |
Configuration Migration tool DataMigrationUtility.exe | Microsoft.CrmSdk.XrmTooling.ConfigurationMigration.Wpf |
Package Deployer PackageDeployer.exe | Microsoft.CrmSdk.XrmTooling.PackageDeployment.WPF |
Plug-in Registration Tool PluginRegistration.exe | Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool |
SolutionPackager tool SolutionPackager.exe | Microsoft.CrmSdk.CoreTools |
步骤如下:
1. 打开 Windows PowerShell,最好是以管理员身份打开。
2.切换到你要下载工具的目录,比如我这里是要将工具下载到 D:\DynamicsDevTools ,就是用PowerShell命令 cd D:\DynamicsDevTools.
3. 执行如下的命令:
$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 ## ##Download Package Deployer PowerShell module ## ./nuget install Microsoft.CrmSdk.XrmTooling.PackageDeployment.PowerShell -O .\Tools $pdPoshFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PackageDeployment.PowerShell.'} move .\Tools\$pdPoshFolder\tools\*.* .\Tools\PackageDeployment.PowerShell Remove-Item .\Tools\$pdPoshFolder -Force -Recurse ## ##Remove NuGet.exe ## Remove-Item nuget.exe
执行完毕后记得回车。
然后就可以看到前面提到的工具都下载好了,一共是5个。如果要获取最新版本的工具,重复执行前面的步骤即可。