0

When I try to install nuget packages on one of my projects, the installation fails and throws the below error.

enter image description here

When I try to open the packgae manager console, I can see the console throws the folowing error.

enter image description here

I have no idea what this error means and where to look at to find the issue.

I tried all the suggestions on this thread but nothing seem to work. I think the error in package manager console might be causign the issue in the first place.

Can't install nuget package because of "Failed to initialize the PowerShell host"

The wierd thing is I only see this error in one specific visual studio solution. If open up another project in different solution, it seems to work fine.

Any help is appreciated.

Thank you

chamara
  • 12,649
  • 32
  • 134
  • 210

1 Answers1

0

Ok. figured it out. It was due to having a space in the project folder path. I moved the project to a folder that has no spaces in the name and it worked.

chamara
  • 12,649
  • 32
  • 134
  • 210
  • Hi Chamara, since you have found the solution of this issue, could you please [mark yourself's answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work/5235#5235), this will be beneficial to others who meet the similar issue and searching for the solution. :) – Bowman Zhu-MSFT Aug 15 '23 at 08:57