Category Archives: Visual Studio 2017

Failed to install Microsoft.VisualStudio.Component.Debugger.JustInTime (VS2017)

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

ramontebar_blog_Just-In-Time debugger dependencies

Since the Windows Workflow Foundation module couldn’t be installed, I couldn’t open workflow libraries to develop Custom Workflow Activities for Dynamics 365.

SOLUTION:

The solution was as simple as updating the System Variable __PSLockDownPolicy value to 1:

ramontebar_blog___PSLockDownPolicy

This is related to the PowerShell Constrained Language Mode, see the following article for more details:

https://blogs.technet.microsoft.com/kfalde/2017/01/20/pslockdownpolicy-and-powershell-constrained-language-mode/

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:

https://developercommunity.visualstudio.com/content/problem/27352/install-stucks-applying-debuggerjustintime.html

https://developercommunity.visualstudio.com/content/problem/24407/failed-to-install-microsoftvisualstudiocomponentde.html

https://developercommunity.visualstudio.com/content/problem/15718/incomplete-workload-net-desktop-development.html

https://developercommunity.visualstudio.com/content/problem/27400/unable-to-install-officesharepoint-workload-on-vis.html