Skip to content

Microsoft.PowerShell.SDK doesn't work in a AspNetCore Blazor WebAssembly project #13755

@fMichaleczek

Description

@fMichaleczek

transferred from dotnet/aspnetcore#25844

When using the preview of AspNetCore Blazor WebAssembly and attempting to utilize the Microsoft.PowerShell.SDK package, Blazor WebAssembly is unable to load the System.Management.Automation.dll

Steps to reproduce

  • Create new Blazor WASM project. (net5-preview.7)
  • Update project file according to this guide.
  • Add Microsoft.PowerShell.SDK package reference
  • Do something with a PowerShell host Example repo

Expected behavior

it works

Actual behavior

Exceptions:

Could not load file or assembly 'System.Management.Automation, Version=7.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.

Environment data

  • PowerShell 7.0.3
  • AspNetCore Blazor WebAssembly 5.0 Preview 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Metaan issue used to track multiple issuesNeeds-TriageThe issue is new and needs to be triaged by a work group.Resolution-No ActivityIssue has had no activity for 6 months or moreWG-DevEx-SDKhosting PowerShell as a runtime, PowerShell's APIs, PowerShell Standard, or development of modules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions