Developers debugging existing WinForms applications (targeting .NET 4.0 or older) or upgrading those applications to target .NET 4.5 (or newer) may notice changes in the Height and Width of some Forms.
Example of original behavior:
Example of new behavior:
In order to take advantage of new Windows operating system features, a decision was made to change all Visual Studio processes to use Windows subsystem version 6.00. Also, new applications targeting .NET 4.5 (or newer) will target Windows subsystem version 6.00 (or greater) by default.
Developers who are impacted by incorrect Form Height and Width when executing under the Visual Studio debugger may work around the issue by turning off the Visual Studio Debugger Hosting Process (vshost). This may be accomplished by doing one of the following:
Unchecking "Enable the Visual Studio hosting process" in their project's properties (Project Properties... Debug tab)
Setting the environment variable UseVSHostingProcess=false before starting Visual Studio
Developers who change their application to target .NET 4.5 (or newer) may need to either:
Change their source code to account for the differences in Form Height and Width.
Specify subsystem version 4.00 by adding <SubsystemVersion>4.00</SubsystemVersion> to their project file or by using the /subystemversion:4.00 compiler switch.
Disabling the Visual Studio hosting process may have a negative impact on the debugger startup performance.
WinForms Form Height Width different incorrect changes Visual Studio vshost debugger .NET 4.5