WaelHamze / dyn365-ce-vsts-tasks

VSTS Extension for Dynamics 365 Customer Engagement
https://marketplace.visualstudio.com/items?itemName=WaelHamze.xrm-ci-framework-build-tasks
GNU General Public License v3.0
117 stars 56 forks source link

Error when running MSCRM Package Deployer for Azure Devops #94

Closed AdrianSayasane closed 4 years ago

AdrianSayasane commented 5 years ago

I'm currently getting the following error when running the task to run the 'MSCRM Package Deployer' task from Azure Devops.

[error]The term 'New-Guid' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I'm using Version 10.0.22 of the task and have tested the package deployment works when running the package deployer outside of Devops. I've also confirmed I'm running the 'Set MSCRM Tool Installer' before.

WaelHamze commented 5 years ago

@AdrianSayasane seems like an issue with PowerShell on the environment you are using

JadynWong commented 2 years ago

Hi @WaelHamze, Is it possible to use [guid]::NewGuid() instead of New-Guid to increase compatibility? Currently, I manually modify the task file that has been executed.

https://github.com/WaelHamze/dyn365-ce-vsts-tasks/blob/19a2b913d56e80c8a53b6999b82dbbe2cf372b2d/BuildTools/Xrm.CI.Framework.BuildTools/Tasks/MSCRMToolInstaller/MSCRMToolInstaller.ps1#L106

I used Windows 2012 R2 and upgrading Powershell to version 5.0 solved the same problem. https://social.technet.microsoft.com/Forums/ie/en-US/3b13b6a0-ecb2-429d-ad8d-533b7322c7ee/installation-of-powershell-50-on-windows-2012-r2