Skip to content

Make Add-Type usable in application that hosts PowerShell - #10587

Merged
Aditya Patwardhan (adityapatwardhan) merged 6 commits into
PowerShell:masterfrom
daxian-dbw:addtype
Sep 25, 2019
Merged

Aditya Patwardhan (adityapatwardhan) merged 6 commits into
PowerShell:masterfrom
daxian-dbw:addtype

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Sep 20, 2019 •

Copy link
Copy Markdown
Member

PR Summary

Fix #9587

  • Make the NuGet package Microsoft.PowerShell.SDK ship the ref folder, which will be copied to the right place for dotnet build and dotnet publish.
  • Make change in Add-Type to look for the ref folder at the folder where EntryAssembly is located. In case of pwsh, it's the folder that contains pwsh.dll.
  • Add a hosting test to make sure Add-Type works for an application that hosts powershell.

PR Context

PR Checklist

Comment thread test/hosting/test_HostingBasic.cs Resolved
Comment thread test/hosting/test_HostingBasic.cs Resolved
Comment thread test/hosting/test_HostingBasic.cs Resolved
@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Sep 21, 2019
@iSazonov Ilya (iSazonov) added this to the 7.0.0-preview.5 milestone Sep 21, 2019
@daxian-dbw

Copy link
Copy Markdown
Member Author

/cc TylerLeonhardt

@TylerLeonhardt TylerLeonhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a small change for big impact 😊 LGTM

Comment thread test/hosting/test_HostingBasic.cs Resolved
@ghost

Copy link
Copy Markdown

🎉v7.0.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

@ghost

Copy link
Copy Markdown

🎉v6.2.4 has been released which incorporates this pull request.:tada:

Handy links:

@TylerLeonhardt

Copy link
Copy Markdown
Member

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Add-Type' doesn't work in applications that host powershell

7 participants