NuGet Errors in Package Manager Console in MVC 3 File, New Project

So, I installed a new MVC3 tools update and tried to create a new MVC3 web application. The project report is created successfully, but if I open the package manager console, I see the following ...

An 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 due to the following verification 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 could not be loaded. 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 be executed on the system. See "Get-help about_signing" for details ... There were errors loading the data file in the format: 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: skipped file due to 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 could not be loaded . 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 be executed on the system. See "Get-help about_signing" for details.

So, it seems that there are two errors: one when trying to load an extended data file and one when loading a format data file.

I installed powershell 2.0. Does anyone have any ideas? I don’t care if the project was created successfully (I think)?

+4
source share
6 answers

How did you install NuGet?

I just struggled with a similar error caused by the fact that I removed the Powershell module without first pressing "Unlock" in the properties of the zip file before extraction. This meant that all files were marked as incoming from the Internet, and RemoteSigned did not allow the launch of unsigned deleted files.

Go to the folder containing the specified files and open the Properties dialog box for them and see if there is a message “This file came from the Internet” using the “Unblock” button. If so, click on it for each file, and then try again.

+3
source

For some reason, I often run into a similar problem. All NuGet files are unlocked, and just restarting VS (by opening the sln file) does not fix it. Opens Visual Studio on its own without loading the solution, then opening the package manager console and then opening the solution.

+2
source

This error for me was caused by .Net Reflector (free version). Used Addin Manager to disable it, and I'm fine.

0
source

I had the same error! My solution was very simple. Just right-click Visual Studio and select "Run as administrator" when trying to open the solution.

0
source

I believe that you should run Visual Studio as an administrator.

In the package manager console, you can check the Powershell execution policy. Enter "get-executionpolicy". By default, it will be a value of type "RemoteSigned". MvcScaffolding is signed, so it will work under this policy.

Here is the URL with additional information: http://technet.microsoft.com/en-us/library/dd347649.aspx

and various execution policies are described here: http://technet.microsoft.com/en-us/library/dd347628.aspx

Here is an excerpt from the torm of the first link: If you try to run the loaded script, Windows PowerShell will display the following error message:

The file <file-name> cannot be loaded. The file <file-name> is not digitally signed. The script will not execute on the system. Please see "Get-Help about_signing" for more details. Before you run the script, review the code to be sure that you trust it. Scripts have the same effect as any executable program. To run an unsigned script: 1. Save the script file on your computer. 2. Click Start, click My Computer, and locate the saved script file. 3. Right-click the script file, and then click Properties. 4. Click Unblock. If a script that was downloaded from the Internet is digitally signed, but you have not yet chosen to trust its publisher, Windows PowerShell displays the following message: Do you want to run software from this untrusted publisher? The file <file-name> is published by CN=<publisher-name>. This publisher is not trusted on your system. Only run scripts from trusted publishers. [V] Never run [D] Do not run [R] Run once [A] Always run [?] Help (default is "D"): If you trust the publisher, select "Run once" or "Always run." If you do not trust the publisher, select either "Never run" or "Do not run." If you select "Never run" or "Always run," Windows PowerShell will not prompt you again for this publisher. 

Hope this helps.

0
source

You can simply change the Powershell execution policy to unlimited. See This Microsoft Article KB 2411920 .

0
source

All Articles