In my development environment, I have a machine with Windows 10 Creators Update operating system installed and a High Resolution monitor with a non default DPI (>96) setting applied. So, after I designed an application using this monitor, this application is downscaled when launched on a monitor with lower DPI settings. As a result, my application layout is completely broken. Is there a way to disable VisualStudio DPI awareness so my application targets default DPI (96) settings?
Yes, there is an undocumented way to make VisualStudio DPI unaware. So, it's up to you whether or not to use this solution.
The main idea of this approach is to mark VisualStudio as DPI unaware by adding a specific flag to the System registry.
In the attachment, you can find the MakeVisualStudioDPIUnaware reg file.
This file is intended to mark only VisualStudio as DPI unaware and doesn't affect applications hosted by VisualStudio. As a result, it allows you to debug your applications more efficiently, because if your project is marked as DPI aware, it still takes DPI settings applied into account when launched under the VisualStudio debugger.
The above mentioned solution works only on Windows 10 operating systems with the applied Creators Update (version 1703 and higher).
To check your operating system's version, open Settings and navigate to System > About. Here, you can see your operating system's edition (Home, Pro or Enterprise), version and build.
Starting with Visual Studio 2017 version 15.8 and later, Visual Studio provides a built-in way to disable DPI awareness. See the Disable DPI-awareness in Visual Studioarticle to learn more.