-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make PowerShell 5.1 usage more prominent #7140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes the usage of Windows PowerShell for installing zero-code instrumentation on .NET more explicit by emphasizing that only the built-in PowerShell 5.1 is supported.
- Added a highlighted alert to warn users against using PowerShell 6.0+ (pwsh).
- Updated the inline comment and introduced the "#Requires -PSEdition Desktop" directive to fail early when an incorrect version is used.
Comments suppressed due to low confidence (2)
content/en/docs/zero-code/dotnet/_index.md:88
- Consider rephrasing the alert message to improve clarity, e.g., 'PowerShell v6.0+ (pwsh) is not supported. Only the built-in Windows PowerShell 5.1 is supported for installing .NET zero-code instrumentation.'
PowerShell v6.0+ (pwsh) is not supported in install .NET zero-code instrumentation - the built-in version of Windows PowerShell must be used.
content/en/docs/zero-code/dotnet/_index.md:94
- Ensure the inline comment aligns with the alert message for consistency, clearly indicating that only Windows PowerShell 5.1 (the built-in edition) should be used.
# PowerShell 5.1 is required
thanks @martincostello @open-telemetry/dotnet-instrumentation-approvers please take a look and review/approve |
I can't for the life of me work out what the lint warning is about. The CI logs don't say, and if I run it locally on my Windows laptop, then no edits are made when I use |
I see that... it's odd, don't worry about that, that's a maintainer issue. |
/fix:format |
✅ |
Make requirement to use Windows PowerShell to install zero-code instrumentation for .NET on Windows more prominent. See open-telemetry/opentelemetry-dotnet-instrumentation#2018.
Add pwsh to the spellings to ignore.
Fix lint warning (I assume) from line being too long.
Fix typo.
@@ -5,7 +5,7 @@ linkTitle: .NET | |||
aliases: [net] | |||
redirects: [{ from: /docs/languages/net/automatic/*, to: ':splat' }] | |||
weight: 30 | |||
cSpell:ignore: coreutils HKLM iisreset myapp | |||
cSpell:ignore: coreutils HKLM iisreset myapp pwsh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cSpell:ignore: coreutils HKLM iisreset myapp pwsh | |
cSpell:ignore: coreutils HKLM iisreset myapp |
{{% alert title="Note" color="warning" %}} PowerShell v6.0+ (pwsh) is not | ||
supported to install .NET zero-code instrumentation. The built-in version of | ||
Windows PowerShell must be used. {{% /alert %}} | ||
|
||
On Windows, use the PowerShell module as an Administrator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{% alert title="Note" color="warning" %}} PowerShell v6.0+ (pwsh) is not | |
supported to install .NET zero-code instrumentation. The built-in version of | |
Windows PowerShell must be used. {{% /alert %}} | |
On Windows, use the PowerShell module as an Administrator: | |
On Windows, use the PowerShell module as an Administrator. | |
{{% alert title="Version note" color="warning" %}} | |
PowerShell v5.1 is required. In particular, v6.0+ is not yet supported. | |
{{% /alert %}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some nuance here I think your suggested edit misses.
Windows PowerShell is basically v5 forever, there isn't a v6.
PowerShell (Core) (pwsh) started with v6 and is currently at v7.5.
The former is the Desktop
edition, the latter is the Core
edition.
That's why my original copy explicitly distinguishes between the two by saying Windows PowerShell and clarifying v6 is pwsh
.
On Windows, use the PowerShell module as an Administrator: | ||
|
||
```powershell | ||
# PowerShell 5.1 or higher is required | ||
# PowerShell 5.1 is required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# PowerShell 5.1 is required | |
#Requires -Version 5.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is needed or not. All I know is it definitely doesn't work on the Core edition. I just removed "or higher" because there is no higher version of the Desktop edition and I'm not sure there ever will be.
@open-telemetry/dotnet-approvers @open-telemetry/dotnet-instrumentation-approvers - can someone validate the version requirements? Thx! |
Make requirement to use Windows PowerShell to install zero-code instrumentation for .NET on Windows more prominent.
Also add directive to the script to fail if the wrong version of PowerShell is used.
See open-telemetry/opentelemetry-dotnet-instrumentation#2018.