Title: Make using NuGet packages installed with Install-Package easier to use - make Add-Type support NuGet packages · Issue #6724 · PowerShell/PowerShell · GitHub
Open Graph Title: Make using NuGet packages installed with Install-Package easier to use - make Add-Type support NuGet packages · Issue #6724 · PowerShell/PowerShell
X Title: Make using NuGet packages installed with Install-Package easier to use - make Add-Type support NuGet packages · Issue #6724 · PowerShell/PowerShell
Description: #6679 (comment) shows how hard it is to use a NuGet package installed via Install-Package in Powershell, for two reasons: You must manually determine the platform-appropriate *.dll file in the package's folder subtree and pass its full p...
Open Graph Description: #6679 (comment) shows how hard it is to use a NuGet package installed via Install-Package in Powershell, for two reasons: You must manually determine the platform-appropriate *.dll file in the pack...
X Description: #6679 (comment) shows how hard it is to use a NuGet package installed via Install-Package in Powershell, for two reasons: You must manually determine the platform-appropriate *.dll file in the pack...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6724
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make using NuGet packages installed with Install-Package easier to use - make Add-Type support NuGet packages","articleBody":"https://github.com/PowerShell/PowerShell/issues/6679#issuecomment-384096971 shows how hard it is to _use_ a NuGet package installed via `Install-Package` in Powershell, for two reasons:\r\n\r\n* You must manually determine the platform-appropriate `*.dll` file in the package's folder subtree and pass its full path to `Add-Type -Path` (e.g., `runtimes/linux-x64/...` on a 64-bit Intel Linux system)\r\n\r\n* Even that by itself is not enough, if the package contains native helper libraries, because `Add-Type -Path` doesn't find them - see link above (whereas creating a C#-based .NET Core console application based on the same package installed with `dotnet add package` _does_).\r\n\r\nTherefore, it would be great if `Add-Type` had built-in support for resolving both issues above, say with the following syntax:\r\n\r\n```powershell\r\n## WISHFUL THINKING\r\n\r\n# Install a NuGet package from the NuGet Gallery and add its types to the session.\r\nInstall-Package -Provider nuget Mono.Posix.NETStandard | Add-Type\r\n\r\n# Add the types of an already installed NuGet package to the session.\r\n# Perhaps even download and install the package on demand.\r\nAdd-Type -Package Mono.Posix.NETStandard \r\n\r\n# Equivalent, via Get-Package.\r\nGet-Package Mono.Posix.NETStandard | Add-Type\r\n```\r\n\r\nThat is, when given a NuGet package [name], `Add-Type` would load the platform-appropriate assemblies and all their dependencies to make their types available to the current session.\r\n\r\n\r\nEnvironment data\r\n----------------\r\n\r\nWritten as of:\r\n\r\n```powershell\r\nPowerShell Core v6.0.2\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2018-04-24T23:45:08Z","url":"https://github.com/PowerShell/PowerShell/issues/6724"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9fcfca71-311c-864f-9f6f-826eef50ccda |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D578:139ADC:4BD9E:6CBB9:6AFD4879 |
| html-safe-nonce | f684cd28cc3772902e9dca18b50a62d250e95312a3e6eadfe70718062949b40f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTc4OjEzOUFEQzo0QkQ5RTo2Q0JCOTo2QUZENDg3OSIsInZpc2l0b3JfaWQiOiI4ODk2NTIyOTI3MTg1MTUyMTIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 172da0c317d7c561f87d0a439a325f0b541017c555b910ebde7e11d1df97f81d |
| hovercard-subject-tag | issue:317432854 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6724/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e2e6c921a6c62070f006c3723cd23191f926a94afa19fe762d858e297ce7b323/PowerShell/PowerShell/issues/6724 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e2e6c921a6c62070f006c3723cd23191f926a94afa19fe762d858e297ce7b323/PowerShell/PowerShell/issues/6724 |
| og:image:alt | #6679 (comment) shows how hard it is to use a NuGet package installed via Install-Package in Powershell, for two reasons: You must manually determine the platform-appropriate *.dll file in the pack... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width