Title: Allow automatic variable Is* inside PowerShell module manifest file · Issue #9386 · PowerShell/PowerShell · GitHub
Open Graph Title: Allow automatic variable Is* inside PowerShell module manifest file · Issue #9386 · PowerShell/PowerShell
X Title: Allow automatic variable Is* inside PowerShell module manifest file · Issue #9386 · PowerShell/PowerShell
Description: NugetPackage have sometimes 2 distincts dll for Windows/Unix plateform. It's not possible to determine which OS is running from a PowerShell module manifest file. This issue should be resolved in early PS 7.0 cycle because Net.Core 3.0 w...
Open Graph Description: NugetPackage have sometimes 2 distincts dll for Windows/Unix plateform. It's not possible to determine which OS is running from a PowerShell module manifest file. This issue should be resolved in e...
X Description: NugetPackage have sometimes 2 distincts dll for Windows/Unix plateform. It's not possible to determine which OS is running from a PowerShell module manifest file. This issue should be resolved ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/9386
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow automatic variable Is* inside PowerShell module manifest file","articleBody":"NugetPackage have sometimes 2 distincts dll for Windows/Unix plateform.\r\nIt's not possible to determine which OS is running from a PowerShell module manifest file.\r\nThis issue should be resolved in early PS 7.0 cycle because Net.Core 3.0 will add more scenarios with cross plateforms.\r\n\r\n# Steps to reproduce\r\n\r\nAdd a condition with variable IsWindows into the property RequiredAssemblies inside a PowerShell module manifest file.\r\n\r\n```powershell\r\nRequiredAssemblies = @(\r\n if ( $IsWindows ) { \r\n '.\\bin\\LibName\\runtimes\\win\\lib\\netstandard2.0\\LibName.dll' \r\n }\r\n else { \r\n '.\\bin\\LibName\\runtimes\\unix\\lib\\netstandard2.0\\LibName.dll' \r\n }\r\n)\r\n```\r\n\r\n# Expected behavior\r\n\r\nPowerShell module manifest file is loaded.\r\n\r\n# Actual behavior\r\n\r\nPowerShell Error \r\n```none\r\nimport-module : The module manifest 'ModuleName.psd1' could not be processed because it is not a valid PowerShell module manifest file. Remove the elements that are not permitted: At ModuleName.psd1:50 char:10\r\n+ if ( $IsWindows ) {\r\n+ ~~~~~~~~~~\r\nA variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that can be referenced include the following: $PSCulture, $PSUICulture, $true, $false, $null, $PSScriptRoot, $PSEdition, $EnabledExperimentalFeatures.\r\n```\r\n\r\n# Environment data\r\n\r\n```none\r\nName Value\r\n---- -----\r\nPSVersion 6.2.0\r\nPSEdition Core\r\nGitCommitId 6.2.0\r\nOS Microsoft Windows 10.0.17134\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n","author":{"url":"https://github.com/fMichaleczek","@type":"Person","name":"fMichaleczek"},"datePublished":"2019-04-17T03:07:23Z","url":"https://github.com/PowerShell/PowerShell/issues/9386"}
| 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:c9fb7211-21a7-c9e1-f72a-a3bf37f88723 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C390:248A71:198788:23F61C:6AFD501E |
| html-safe-nonce | 9f418dc714c9d8bfeaca640b4a634aafba354efc29a1b183d676bac3bead7de2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzkwOjI0OEE3MToxOTg3ODg6MjNGNjFDOjZBRkQ1MDFFIiwidmlzaXRvcl9pZCI6IjQ2OTA2NzIwMDYzOTQxMDU4ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 96b689344bfd743bcea5fb3382a44cf315d1f084b962a7f830bac7d337b51e35 |
| hovercard-subject-tag | issue:434071405 |
| 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/9386/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d39f4d1c8b6e573ef415c921a4cabc6327e1e195217e4fd355f026cbb1b6231e/PowerShell/PowerShell/issues/9386 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d39f4d1c8b6e573ef415c921a4cabc6327e1e195217e4fd355f026cbb1b6231e/PowerShell/PowerShell/issues/9386 |
| og:image:alt | NugetPackage have sometimes 2 distincts dll for Windows/Unix plateform. It's not possible to determine which OS is running from a PowerShell module manifest file. This issue should be resolved in e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | fMichaleczek |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width