Power-Maverick / PCF-CustomControlBuilder

XrmToolBox Plugin for building and deploying custom control using PCF
MIT License
40 stars 6 forks source link

PowerShell Execution Policy - Restricted #32

Closed Power-Maverick closed 3 years ago

Power-Maverick commented 3 years ago

Describe the bug On some machines where PS execution policy is not set to unrestricted we are getting an error.

To Reproduce Steps to reproduce the behavior:

  1. Set execution policy to default/restricted
  2. Click on Build solution
  3. ERROR

Expected behavior Error should not occur when building the solution

power-maverick-bot[bot] commented 3 years ago

I am Groot!! Thanks for raising an issue. Please make sure you have given us as much context as possible.

resc-ambit commented 3 years ago

I ran into the same problem even the execution policy was manually changed to unrestricted. After some time I realized that the field 'MS Build path' in Settings was filled with the output text of the first run while the execution policy was still restricted. This error text contained the message text that msbuild.ps1 cannot be executed due to exectution policy. This error text then was used as MS Build Path in all subsequent calls what caused the user to still see the same text, looking like it was a new error message. So the console text was misleading to an improper execution policy. The solution was to clear the content of 'MS Build path' or to manually enter the correct path.

power-maverick-bot[bot] commented 3 years ago

I am Groot!! Please be respectful of other users while commenting. cc/ @Power-Maverick

Power-Maverick commented 3 years ago

The issue is fixed but if you were already getting error then as @resc-ambit suggested clear the MS Build Path from the Settings.

power-maverick-bot[bot] commented 3 years ago

I am Groot!! I detected a negative sentiment. Please be respectful of other users while commenting. cc/ @Power-Maverick