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

error when create uwp app release package #14

Closed
iloxmn opened this issue Sep 8, 2021 · 5 comments
Closed

error when create uwp app release package #14

iloxmn opened this issue Sep 8, 2021 · 5 comments

Comments

@iloxmn
Copy link

iloxmn commented Sep 8, 2021

InvalidCSharpIdentifierName

Severity Code Description Project File Line Suppression State
Error MCG0037: MCG0037:InvalidCSharpIdentifierName Struct 'DirectN.HRESULT' in assembly 'Assembly(Name=DirectN, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, Location=*\obj\x64\Release\ilc\in\DirectN.dll)' has a field with name '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.

it's working in debug mode, but not release
also I can't find a method to dispose items created, how can I destroy them from memory

@smourier
Copy link
Owner

smourier commented Sep 8, 2021

This is an issue only with .NET Native toolchain, specific to UWP, like here microsoft/dotnet#807 because DirectN source code uses auto properties with is standard C# code.

.NET Native has lots of issues, I won't change DirectN because of this, as it isn't meant for UWP but for regular .NET projects. Still, DirectN is open source, so you can pick only the files you need and tweak them the way you want.

As for Dispose, it depends, some objects have, some don't, by design. Not sure what you are talking about.

@iloxmn
Copy link
Author

iloxmn commented Sep 8, 2021

Ok, but I can't find anything related to backingfield, so what do I need to do to make it work.

Win2d provide a method to dispose font face, but I can't find it on other directwrite wrapper
https://microsoft.github.io/Win2D/WinUI2/html/M_Microsoft_Graphics_Canvas_Text_CanvasFontFace_Dispose.htm

@smourier
Copy link
Owner

smourier commented Sep 9, 2021

Don't use .NET native toolchain

@pjmlp
Copy link

pjmlp commented Sep 9, 2021

@iloxmn Win2D is mostly written in C++.

@smourier
Copy link
Owner

closed due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants