Reputation: 31
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:
Upvotes: 2
Views: 2205
Reputation: 29
Getting Windows PowerShell access worked for me.
I was not able to install VS2019 and VS2022.
Upvotes: 0
Reputation: 1
Set powershell execution policy to unrestricted. Open privileged powershell console and type
Set-ExecutionPolicy Unrestricted
re-execute setup.
Upvotes: 0
Reputation: 21
Solution worked for me (nothing else helped)
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
Upvotes: 2
Reputation: 31
Activate the PowerShell privilege's, run gpupdate then restart the machine. then reinstall the setup again.
Upvotes: 0
Reputation: 12667
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://learn.microsoft.com/en-us/visualstudio/releases/2019/history
Similar issue has been reported here too: Revert Visual Studio 2019 Update
Upvotes: 1