Skip to content

Conversation

@fMichaleczek
Copy link
Contributor

@fMichaleczek fMichaleczek commented Feb 3, 2025

PR Summary

Continue #14063

Applying CA1837 https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1837

PR Context

Improve Microsoft.PowerShell.SDK doesn't work in a AspNetCore Blazor WebAssembly project

Process.GetCurrentProcess().Id is not available on net9.0-Browser.

With Environment.ProcessId, the API doesn't throw anymore :

image

PR Checklist

@iSazonov

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@iSazonov

This comment was marked as outdated.

@iSazonov

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Feb 4, 2025
@iSazonov

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@iSazonov iSazonov self-assigned this Feb 4, 2025
@iSazonov iSazonov changed the title Continue Enable CA1837: Use 'Environment.ProcessId' Use Environment.ProcessId in SpecialVariables.PID Feb 4, 2025
@iSazonov iSazonov merged commit 141da81 into PowerShell:master Feb 4, 2025
39 of 41 checks passed
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-service bot commented Feb 4, 2025

📣 Hey @fMichaleczek, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants