question

sshary19 avatar image
1 Vote"
sshary19 asked libinmohanan-7703 commented

UWP C# button control not working/freezes on release mode

I am using a 3rd party button control from the NuGet package. It works fine on debug mode but when I change it to release mode and run the app, the button control is like frozen or disabled. It didn't perform or trigger the function given in its click handler. Can anyone suggest a solution? Thanks :)

not-supported
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Would you mind providing more details about the control? What control is it? Any source code available? Thanks.

0 Votes 0 ·

This is the source code for the button control I'm using in my app. Actually, it's a flex button https://github.com/robinmanuelthiel/flexbutton

0 Votes 0 ·

1 Answer

yanxiaodi avatar image
2 Votes"
yanxiaodi answered libinmohanan-7703 commented

I'm guessing it might be caused by the Native .NET toolchain in release mode. I have met it several years ago. Just found this issue on its GitHub: https://github.com/robinmanuelthiel/flexbutton/issues/64
You could follow this post to add a piece of code or just disable the Native .NET tool chain for release mode. You can find this checkbox in Properties - Build page, then select your platform target and disable "compile with .NET Native tool chain".

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks a lot. Now this will help :)

1 Vote 1 ·

This saved me as well. MS should do a better job of figuring out automatic resolutions for stuff like this than developers bust their ass to get to links like this

0 Votes 0 ·