Skip to content

Automatically resolve types in S.M.A, S.M.A.Language, and S.M.A.Runspaces namespaces when short names are used #8281

@KirkMunro

Description

@KirkMunro

Pulled out of the discussion in PR #8205:

What if PowerShell automatically worked as if you had invoked the equivalent of the snippet below at the top of every script/script module?

using namespace System.Management.Automation
using namespace System.Management.Automation.Language
using namespace System.Management.Automation.Runspaces

I think that, plus type acceleration for aliases/shorthand type names and outliers that are in namespaces from which you only care about a few types, would make working with the .NET side of PowerShell much easier. Is there a downside to automatically using some core namespaces that are among the most frequently used in PowerShell?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimeWG-Languageparser, language semantics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions