Skip to content

using assembly information is incorrect; the types aren't loaded at parse time #10828

@mklement0

Description

@mklement0

Type of issue

Other (describe below)

Feedback

The following statement is incorrect:

Loading an assembly preloads .NET types from that assembly into a script at parse time. This allows you to create new PowerShell classes that use types from the preloaded assembly.

While this was always the intent, it hasn't been implemented so far.

De facto, using assembly currently offers no advantage over Add-Type, and is actually less flexible, given that only literal paths may be passed.

For background information, see the following issue created by @SeeminglyScience:

Page URL

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_Using?view=powershell-7.4

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.4/Microsoft.PowerShell.Core/About/about_Using.md

Author

@sdwheeler

Document Id

7f477cc2-775f-aebe-9d5c-6fddd130b5ef

Metadata

Metadata

Assignees

Labels

review-shiproomWaiting - for Shiproom discussion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions