This project is read-only.

powershell policy in a new Win81+VS2013 box


I just installed a brand new box with:
  • win81 pro
  • VS2012
  • VS2013
I then created a new / mvc project and the wizard failed with the error:
"failed to initialize powershell host Visual Studio2013"

I opened powershell and the Get-ExecutionPolicy was set to "Restricted"
This is quite weird on a dev box, no?

Anyway I solved the problem by changing it with Set-ExecutionPolicy to "RemoteSigned"

I expect:
  • any wizard should work without any "hack"
  • VS2013 should always work in disconnected world because more than half of the so called civilized part of the planet works disconnected

file attachments


JeffHandley wrote Sep 13, 2013 at 5:02 PM

Thanks for filing this. Downloading should be out of the picture. Nothing gets downloaded during new project creation, or any other time unless you go install a new package/version or utilize package restore.

I believe this error is happening before any scripts are even attempted to be executed too, so the execution policy workaround might be misleadingly pointing the finger at scripts failing to execute. When you were setting the execution policy (or getting it), was that from a PowerShell command window in Windows, or the Package Manager Console in VS?

Without setting that, does the Package Manager Console in VS function at all?

raffaeler wrote Sep 13, 2013 at 5:38 PM

You're welcome.
I changed the policy via windows cmd and than restarted vs2013.

I did not try the PMC from VS

raffaeler wrote Sep 13, 2013 at 5:59 PM

This is the screenshot of the repro

raffaeler wrote Sep 13, 2013 at 6:02 PM

Re-sending the attachment

raffaeler wrote Sep 13, 2013 at 6:05 PM

I posted the image here:

raffaeler wrote Sep 13, 2013 at 6:06 PM

Final message from the wizard:

File C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\EW4SDVF0.I2C\Modules\NuGet\nuget.psm1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at

raffaeler wrote Sep 13, 2013 at 6:09 PM

The package manager console opens correctly (with the restricted policy set).
I tried before creating a projects (with no project loaded) and after the wizard gave me the errors

ericardezp wrote Mar 26, 2014 at 6:53 PM

I have the same error. Any solutions?

ericardezp wrote Mar 26, 2014 at 6:57 PM

Hi i found this TEXT

It works well and fixed error

ericardezp wrote Mar 26, 2014 at 7:00 PM


works well only the first time