Skip to content

Conversation

@bhatnagarsid
Copy link
Contributor

@bhatnagarsid bhatnagarsid commented Nov 28, 2024

Creating a workaround for UWP native build based on issue reported some years ago in this issue and similar pull request addressing this issue in SharpGenTools/SharpGenTools#210

When building Blank UWP application with Silk.NET pulled from nuget on x64 release build, seeing the following error:

Error MCG0037: MCG0037:InvalidCSharpIdentifierName Struct 'Silk.NET.Core.Bool32' in assembly 'Assembly(Name=Silk.NET.Core, Version=2.22.0.0, Culture=neutral, PublicKeyToken=null, Location=<>\obj\x64\Release\ilc\in\Silk.NET.Core.dll)' has a field with name '<Value>k__BackingField' that is invalid. This could be because the name is obfuscated or the field is auto-implemented by the compiler. Please make sure the field name follows C# identifier conventions.

Signature follows what is being reported in this issue

This fix adds an explicit backing field for Bool32 class

Siddhant Bhatnagar added 2 commits November 27, 2024 18:06
Add explicit backing field avoiding use of auto-implemented properties
due to issues with UWP native toolchain.
@bhatnagarsid bhatnagarsid marked this pull request as ready for review November 28, 2024 02:51
@bhatnagarsid bhatnagarsid requested a review from a team as a code owner November 28, 2024 02:51
Copy link
Member

@Perksey Perksey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍I suspect this won't be the only issue you'll hit so please keep the PRs coming! :)

@Perksey Perksey enabled auto-merge (squash) November 28, 2024 13:51
@Perksey Perksey merged commit 735a5f7 into dotnet:main Nov 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants