You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Affects version 2.0.0. Not sure why it's different, since it's the same SDK (.NET 6), similar OS (Windows 10 vs Server 2022), and codebase. The build command should be the same (dotnet publish). The Windows Forms demo is not affected.
This was caused by a logical error in the implicit SetCurrentProcessTheme behavior introduced in 2.0.0. When invoked implicitly, it was never calling SetPreferredAppMode or AllowDarkModeForApp, even when it was being called for the first time and should have called at least one of those Win32 API methods. The root cause was marking this first-time call as having been finished too early, then checking it again before actually running it for the first time, and erroneously skipping it because it was marked as having already run, even though it hadn't.
I am not sure why the published app generated by Visual Studio and MSBuild did not reproduce this error, as the code flow was the same as the binary generated by dotnet publish.
In any case, fixing the first-run check makes it work for both compilers.
Affects version 2.0.0. Not sure why it's different, since it's the same SDK (.NET 6), similar OS (Windows 10 vs Server 2022), and codebase. The build command should be the same (
dotnet publish
). The Windows Forms demo is not affected.Working and non-working artifacts
The text was updated successfully, but these errors were encountered: