Powershell – NuGet errors in Package Manager Console on MVC 3 File, New Project

asp.net-mvc-3nugetnuget-packagepowershellvisual studio 2010

So I installed the new MVC3 tooling update and attempted to create a new MVC3 web app. The project reports as being successfully created but if I bring up the Package Manager Console, I see the following…

The following error occurred while loading the extended type data file: , D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Types.ps1xml : File skipped because of the following validation exception: File D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Types.ps1xml cannot be loaded. The file D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Types.ps1xml is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details…
There were errors in loading the format data file: D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Format.ps1xml, , D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Format.ps1xml : File skipped because of the following validation exception: File D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Format.ps1xml cannot be loaded. The file D:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Format.ps1xml is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details…

So it appears that there are two errors occurring here, one while trying to load the extended data file and one while loading a format data file.

I have installed powershell 2.0. Anyone have any ideas? Should I care if the project got created successfully (I think)?

Best Answer

How did you install NuGet?

I was just wrestling with a similar error that was caused because I extracted a Powershell module without first clicking "Unblock" in the properties of the zip file before extracting. This meant all the files were flagged as coming from the internet, and RemoteSigned won't allow unsigned remote files to be run.

Navigate to the folder that contains the files mentioned, and open the Properties dialog for them, and see if there's a message saying "This file came from the internet" with an "Unblock" button. If so, click it for each file, and then try again.