Skip to content
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

Update how-to-determine-which-versions-are-installed.md #43947

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

stamminator
Copy link
Contributor

@stamminator stamminator commented Dec 11, 2024

If you're checking for old versions of .NET Framework, there's a good chance the machine is old enough to be stuck on PowerShell 2. This makes the .NET Framework version detection script compatible with PowerShell 2 and above.


Internal previews

📄 File 🔗 Preview link
docs/framework/migration-guide/how-to-determine-which-versions-are-installed.md docs/framework/migration-guide/how-to-determine-which-versions-are-installed

Make script to detect old .NET Framework versions compatible with PowerShell 2
@stamminator stamminator requested review from gewarren and a team as code owners December 11, 2024 22:15
@dotnetrepoman dotnetrepoman bot added this to the December 2024 milestone Dec 11, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates PR is created by someone from the .NET community. label Dec 11, 2024
@gewarren
Copy link
Contributor

@sdwheeler Could you take a look at this change?

@sdwheeler
Copy link

@gewarren I am assuming this works in PowerShell v2, but I don't have a way to test it. We don't support PowerShell v2 anymore and haven't for some time.

However, the code changes are valid, and it works on the supported versions. I would say that it is safe to accept the change.

@gewarren gewarren merged commit 8e1909d into dotnet:main Dec 12, 2024
12 checks passed
@gewarren
Copy link
Contributor

gewarren commented Dec 12, 2024

Thank you @sdwheeler @stamminator

@stamminator
Copy link
Contributor Author

@sdwheeler If you have the Windows Powershell 2.0 option enabled in Windows Features, you can enter the v2 shell with powershell -version 2 and test from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-compat/subsvc community-contribution Indicates PR is created by someone from the .NET community. dotnet-framework/svc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants