This week we were trying to install Visual Studio 2017 (15.3.2) but we were getting the following error:
Package ‘Microsoft.VisualStudio.Debugger.JustInTime,version=15.0.26621.2’ failed to install
Other Visual Studio components depend on this package:
- .NET desktop development
- .NET desktop development tools
- Windows Workflow Foundation
Since the Windows Workflow Foundation module couldn’t be installed, I couldn’t open workflow libraries to develop Custom Workflow Activities for Dynamics 365.
The solution was as simple as updating the System Variable __PSLockDownPolicy value to 1:
This is related to the PowerShell Constrained Language Mode, see the following article for more details:
Basically the Visual Studio installer was trying to run a command that was not allowed based on the PowerShell Constrained Language policy.
***Thanks to my colleague Emir for his help 😉
Looking at forums, there were other suggestions like stopping the anti-virus or run the following command:
Unblock-File -path “C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.VisualStudio.Debugger.JustInTime,version=15.0.26621.2\RegisterJustInTimeDebugger.ps1”
The following discussions were talking about the same: