Skip to content

Stop running powershell script by default in VS #15141

Open

Description

@zivkan

Feature spec: https://github.com/NuGet/Home/blob/dev/accepted/2026/control-powershell-script-execution.md

TL;DR is that running package init.ps1 in Visual Studio's Package Manager Console will require you to run Import-PackageInitScript. This means if you use Entity Framework, PMC will no longer get EF's powershell cmdlets until you run this command.

If you have projects using packages.config, it will fail install by default when you try to install or upgrade a package with with an install.ps1, and upgrade and uninstall will fail if an existing package has an uninstall.ps1. You will be presented with options to either ignore the ps1 files, or to run them.

At the time the code changes are being merged into NuGet's source code, they will be behind a feature flag and therefore will not affect product behavior. Keep an eye out on Visual Studio's What's New announcements for when we enable the change.

Activity

  1. self-assigned this
    on Nov 11, 2026
  2. added
    Priority:2
    Type:DCR
    Functionality:VisualStudioUI
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Functionality:VisualStudioUIPriority:2Product:VS.ClientProduct:VS.PMConsoleType:DCR

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions