2

I am simply trying to add a view for a Action in MVC 5.2 Application by right clicking in the Action method clicking on Add view Adding the view name press ok

I see a visual studio dialogue which says Scaffolding...

However after 30 seconds or so I get this error message.

Error:

There was an error running the selected code generator: 'Failed to initialize Powershell host. if your Powershell execution policy setting is set to AllSigned, open the Package Manager console to initialize the host first.'

Note: Adding a View from the view folder fails with the same error too..

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116
hussian
  • 399
  • 6
  • 19

1 Answers1

1

The issues explained at https://github.com/NuGet/Home/issues/1638 are related to the same problem. I was experiencing this issue and solved it by installing VS 2015 update 1 found at: https://www.visualstudio.com/en-us/news/vs2015-update1-vs.aspx

Robb Sadler
  • 705
  • 10
  • 22