Skip to content

Conversation

@xtqqczze
Copy link
Contributor

Also removed use of GC.AllocateUninitializedArray since this API is not supported in .NET Standard.

Related: #61990

cc:@elinor-fung

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Aug 23, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-eventlog
See info in area-owners.md if you want to be subscribed.

Also removed use of `GC.AllocateUninitializedArray` since this API is not supported in .NET Standard.

Related: dotnet#61990

cc:@elinor-fung
@jkotas
Copy link
Member

jkotas commented Aug 24, 2025

Also removed use of GC.AllocateUninitializedArray since this API is not supported in .NET Standard.

There is no problem with this API. It is used in a file that does not build in .NET Standard. .NET Standard variant of this library are PNSE throwing stubs.

Related: #61990

This PR is changing the same code as the other PR. You can fold this into the other PR.

@jkotas jkotas closed this Aug 24, 2025
@xtqqczze
Copy link
Contributor Author

There is no problem with this API. It is used in a file that does not build in .NET Standard. .NET Standard variant of this library are PNSE throwing stubs.

The API is not available in .NET Framework either. And take a look at this build condition:

<IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' != 'windows'">SR.PlatformNotSupported_EventLog</GeneratePlatformNotSupportedAssemblyMessage>

@jkotas
Copy link
Member

jkotas commented Aug 24, 2025

These conditions say that we build a forwarder for .NET Framework and PNSE stub for .NET Standard.

If the code called an API that's not available in the given build configuration, we would see a build error.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Diagnostics.EventLog community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants