Something changed on my system, and I’m not sure what. I have been able to create new projects left and right in VS2013 for a long, long time. Then, today, while creating a One ASP.NET project that included WebForms, MVC, and WebAPI (it’s for a demo app that I am creating), I got the following Package Installation Error:
Image: Package Installation Error Could not add all required packages to the project.
This is due to a security policy in place that restricts how packages get installed. For more information on the different execution policy settings, see the help topic at http://go.microsoft.com/fwlink/?LinkID=135170.
Damn the Torpedoes! Full Speed Ahead!
If you want to change the policy to prevent this error in Visual Studio, you can set the execution policy to unrestricted by following the steps outlined below. Note: You need to make sure you understand the security implications of making this change, as bad things can happen if you do this!
- Open up a PowerShell console as administrator
- Type the following command: Set-ExecutionPolicy Unrestricted
- You will be duly warned about changing the policy. If you have read and understand the implications of making this change, then enter a Y and press enter.
As noted in the documentation, this change does the following:
- Unsigned scripts can run. (This risks running malicious scripts.)
- Warns the user before running srcipts and configuration files that are downloaded from the Internet.
So, again, make sure you understand the implications of making this change. You are solely responsible for any potential side effects!
About the author
Philip Japikse
| A Principal Consultant/Architect with Strategic Data Systems (http://www.sds-consulting.com), international speaker, Microsoft MVP, ASPInsider, MCSD, CSM, and CSP, and a passionate member of the developer community, Phil Japikse has been working with .NET since the first betas, developing software for over 30 years, and heavily involved in the agile community since 2005. Phil is the Lead Director for the Cincinnati .NET User’s Group (www.cinnug.org) and the Cincinnati Software Architect Group, co-hosts the Hallway Conversations podcast (www.hallwayconversations.com), founded the Cincinnati Day of Agile (www.dayofagile.org), and volunteers for the National Ski Patrol. Phil enjoys to continuously learn new tech and is always striving to improving his craft. You can follow Phil on twitter via www.twitter.com/skimedic and read his blog at www.skimedic.com/blog, and see all of his connections at http://www.about.me/skimedic |
9515d6a4-fa83-4061-9635-0b33c6103640|0|.0|27604f05-86ad-47ef-9e05-950bb762570c