Thank you for reaching out.
There seems to be a conflict between .NET Framework guidance and Windows App Certification Kit (WACK) warnings for High-DPI support in WinForms apps.
- For .NET Framework 4.8 WinForms, DPI awareness should be declared in app.config using
<System.Windows.Forms.ApplicationConfigurationSection>withDpiAwareness="PerMonitorV2". This is the recommended approach because it integrates with WinForms DPI scaling. - WACK checks the manifest and API calls (e.g.,
SetProcessDpiAwarenessContext) at OS level. It does not parse app.config, so even if your app.config is correct, WACK may still warn.\ Solution: Add DPI awareness to the manifest for certification purposes. This won’t break WinForms behavior but satisfies WACK.
VB.NET Application Framework:\ If <EnableVisualStyles>true</EnableVisualStyles> is set in Application.myapp, the framework automatically calls:
Application``.EnableVisualStyles()
You don’t need Sub Main unless you want custom startup logic. If you do, disable “Enable application framework” in project settings and create your own Sub Main.
Sample app.config snippet:
<configuration>
<runtime>
<System.Windows.Forms.ApplicationConfigurationSection
DpiAwareness="PerMonitorV2" />
</runtime>
Sample manifest snippet for WACK compliance:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware>true/PM</dpiAware>
<dpiAwareness>PerMonitorV2</dpiAwareness>
</windowsSettings>
This way, you keep app.config for WinForms DPI handling and add manifest entries for WACK validation.
Please let us know if you require any further assistance, we’re happy to help.
If you found this information useful, kindly mark this as "Accept Answer".