Title: Binary module compiled with PowerShellStandard.Library 3.0.0-preview-01 fails to run in Windows PowerShell · Issue #4894 · PowerShell/PowerShell · GitHub
Open Graph Title: Binary module compiled with PowerShellStandard.Library 3.0.0-preview-01 fails to run in Windows PowerShell · Issue #4894 · PowerShell/PowerShell
X Title: Binary module compiled with PowerShellStandard.Library 3.0.0-preview-01 fails to run in Windows PowerShell · Issue #4894 · PowerShell/PowerShell
Description: Steps to reproduce Download and install the .NET Core 2.0 SDK. dotnet new classlib --name psmodule cd psmodule dotnet add package PowerShellStandard.Library --version 3.0.0-preview-01 Remove-Item .\Class1.cs @' using System.Management.Au...
Open Graph Description: Steps to reproduce Download and install the .NET Core 2.0 SDK. dotnet new classlib --name psmodule cd psmodule dotnet add package PowerShellStandard.Library --version 3.0.0-preview-01 Remove-Item ....
X Description: Steps to reproduce Download and install the .NET Core 2.0 SDK. dotnet new classlib --name psmodule cd psmodule dotnet add package PowerShellStandard.Library --version 3.0.0-preview-01 Remove-Item ....
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/4894
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Binary module compiled with PowerShellStandard.Library 3.0.0-preview-01 fails to run in Windows PowerShell","articleBody":"Steps to reproduce\r\n------------------\r\nDownload and install the .NET Core 2.0 SDK.\r\n```powershell\r\ndotnet new classlib --name psmodule\r\ncd psmodule\r\ndotnet add package PowerShellStandard.Library --version 3.0.0-preview-01\r\nRemove-Item .\\Class1.cs\r\n@'\r\nusing System.Management.Automation;\r\n\r\nnamespace PSCmdlet3\r\n{\r\n [Cmdlet(\"Get\", \"Foo\")]\r\n public class GetFooCommand : PSCmdlet\r\n {\r\n [Parameter]\r\n public string Name { get; set; } = string.Empty;\r\n\r\n protected override void EndProcessing()\r\n {\r\n this.WriteObject(\"Foo is \" + this.Name);\r\n base.EndProcessing();\r\n }\r\n }\r\n}\r\n'@ | Out-File GetFooCommand.cs -Encoding UTF8\r\ndotnet build\r\ncd .\\bin\\Debug\\netstandard2.0\\\r\nipmo .\\psmodule.dll\r\nget-foo\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\nThis should work in PowerShell Core *and* in Windows PowerShell 5.1.\r\n\r\nActual behavior\r\n---------------\r\nThe binary module loads into Windows PowerShell but fails when executed with this error:\r\n```none\r\nget-foo : Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral,\r\nPublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.\r\nAt line:1 char:1\r\n+ get-foo\r\n+ ~~~~~~~\r\n + CategoryInfo : NotSpecified: (:) [], FileNotFoundException\r\n + FullyQualifiedErrorId : System.IO.FileNotFoundException\r\n```\r\n\r\nI guess I missing a shim assembly. Could this be packaged with PSStandard.Lib? If not, we need to make sure we document any other **required** pkgs.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 5.1.15063.608\r\nPSEdition Desktop\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nBuildVersion 10.0.15063.608\r\nCLRVersion 4.0.30319.42000\r\nWSManStackVersion 3.0\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\n\r\nPSRemotingProtocolVersion 2.3\r\n```","author":{"url":"https://github.com/rkeithhill","@type":"Person","name":"rkeithhill"},"datePublished":"2017-09-22T02:50:44Z","url":"https://github.com/PowerShell/PowerShell/issues/4894"}
| 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:6318217b-e3f5-6c6e-9061-653fbf646e04 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6F2:30E9CC:5CE02F:85CE81:6AFD8AEB |
| html-safe-nonce | 7483687cbfb54791b0cba68c598a89d85862caea3b6e23951b0c2e5b76974cbe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkYyOjMwRTlDQzo1Q0UwMkY6ODVDRTgxOjZBRkQ4QUVCIiwidmlzaXRvcl9pZCI6IjU4MTIzNTI3NjQ5OTg0MjEyMjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 78bb9736bf0a1fe9846e6f9234dbd6e3376c8538164868116cb788e090c4cf96 |
| hovercard-subject-tag | issue:259688370 |
| 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/4894/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2a7c43a60368d7706ffaec5e9ad867f80f17f989e36dc6d63cb0e7c784fa5d45/PowerShell/PowerShell/issues/4894 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2a7c43a60368d7706ffaec5e9ad867f80f17f989e36dc6d63cb0e7c784fa5d45/PowerShell/PowerShell/issues/4894 |
| og:image:alt | Steps to reproduce Download and install the .NET Core 2.0 SDK. dotnet new classlib --name psmodule cd psmodule dotnet add package PowerShellStandard.Library --version 3.0.0-preview-01 Remove-Item .... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rkeithhill |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| 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 | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width