Home > front end >  Could not install microsoft.netcore.hostpath 2019
Could not install microsoft.netcore.hostpath 2019

Time:12-28

I am trying to install Visual Studio 2019 but unfortunately every time I get this error

could not install Microsoft.NetCore.HostPath

Here is an image of the same:

enter image description here

CodePudding user response:

If you have .Net 5 on your system and updating to 16.11.8 then you may face this issue. Till now only work around is to downgrade to 16.11.7. And you may have in uninstall and then reinstall VS 2019. You can get 16.11.7 or other older version of VS from following URL: https://docs.microsoft.com/en-us/visualstudio/releases/2019/history

Similar issue has been reported here too: Revert Visual Studio 2019 Update

CodePudding user response:

Activate the PowerShell privilege's, run gpupdate then restart the machine. then reinstall the setup again.

CodePudding user response:

Solution worked for me (nothing else helped)

  1. Install PowerShell v7 (https://aka.ms/pscore6)
  2. Backup original PowerShell v1 from C:\Windows\SysWOW64\WindowsPowerShell\v1.0
  3. Copy "C:\Program Files\PowerShell\7" to C:\Windows\SysWOW64\WindowsPowerShell\v1.0
  4. Rename pwsh.exe to powershell.exe
  5. Now VS installer is using PowerShell v7 thinking it is v1, works fine!

So, I believe it is kid of bug in old version of PowerShell

Probably there is better way to mimic version, I just did old school brutal magic after loosing a day for that

  • Related