DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 2877623 - Last Review: August 21, 2013 - Revision: 1.0

Symptoms

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:
Collapse this imageExpand this image
Running outside the Visual Studio debugger


Example of new behavior:
Collapse this imageExpand this image
Running under the Visual Studio debugger

Cause

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.

Resolution

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.


More information

Disabling the Visual Studio hosting process may have a negative impact on the debugger startup performance.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.

Applies to
  • Microsoft Visual Studio 2013 Preview
  • Microsoft Visual Studio Premium 2012
  • Microsoft Visual Studio Premium 2013 Preview
  • Microsoft Visual Studio Professional 2012
  • Microsoft Visual Studio Professional 2013 Preview
Keywords: 
KB2877623
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support