Winforms DPI scaling messed up with Windows 10 anniversary update and Visual Studio 2015 Update 4
<p>I'm running my Winforms app using the Windows 10 anniversary update.</p>

<p>When running under the Visual Studio 2015 Update 4 debugger, the UI layout is completely messed up. Some controls are much smaller, others much larger, mouse hit detection is off, and so on.</p>

<p>When I run the exe by itself, without the debugger, it displays correctly.</p>

<p>Also, when running in the previous Windows 10 build 1511 and Visual Studio 2015 Update 3, the app displays fine as well. </p>

<p>So the problem is either with the anniversary build or with Visual Studio 2015 update 4. (I was unable to try the anniversary build with Visual Studio 2015 update 3 as the latter build is no longer available.)</p>

<p>What can account for this?</p>

<p>I've verified that the <code>app.vshost.exe.config</code> has the same content as the <code>app.exe.config</code>, and there are no DPI-aware properties in either.</p>

<p><strong>Edit</strong>: I ran the app using "Start without debugging" and <em>then</em> attached the debugger. Attaching causes the UI to resize to a high-DPI unscaled view, i.e. everything is in native screen resolution - very small pixels across the entire UI. This is different from either of the two previous scenarios, and even more puzzling.</p>

<p><strong>Edit 2</strong> : After signing out and logging back in, the app displays fine. So at least there is a workaround. Obviously, the app cannot ship like this, so still looking for a way to avoid the problem in the first place.</p>