Skip to content

Suggestion: Add #Requires -Assembly AssemblyName support #5022

Closed
@brianary

Description

@brianary

Currently, if I want to reference a .NET assembly like System.Configuration, I do something like this at the top of my scripts:

try{[void][Configuration.ConfigurationManager]}catch{Add-Type -AN System.Configuration}

it would be much more readable (and declarative) as something like:

#Requires -Assembly System.Configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions