Search

VB.net inconsistent component designer behavior by Cédric BOUZYD

Active

1
0
Sign in
to vote
Type: Bug
ID: 780893
Opened: 3/7/2013 1:10:24 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
In VB.net, the code generated by the component designer differs depending on the 'Pretty listing (reformatting) of code' (Text Editor -> Basic -> VB Specific). When it is ticked, everything works fine, but when it's not, the most annoying issues are:
- Boolean values become lower case
- There are indentation differences
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce

1) The Pretty Listing option needs to be turned on;
1) Create a new Windows Forms Application using the template;
2) In the designer change the value of any boolean property and save;
3) Now turn Pretty Listing off;
4) Change something in the designer (a caption for instance) and save;
5) You should notice differences like in the attached diff file

Product Language

English

Operating System

Windows 7

Operating System Language

English (US)

Actual results

The component designer generates different code depending on the Pretty Listing option.

Expected results

The Pretty Listing option should not have any impact on the code generated.
File Attachments
File Name Submitted By Submitted On File Size  
bug.diff.txt 3/7/2013 1 KB
Sign in to post a comment.
Posted by Microsoft on 3/11/2013 at 1:17 PM
Hi,

I definitely appreciate your feedback on this issue. However, it is the job of the pretty-lister to ensure that VB code has the correct casing. If it is turned off, the guarantee that code generated by a designer will have the correct casing. It's not "incorrect" to have booleans lower-cased since the VB language is case insensitive.

Kind Regards,
Dustin Campbell
Visual Studio Managed Languages
Posted by Cédric BOUZYD on 3/11/2013 at 11:58 AM
I don't think generating lower case booleans in VB.net is a correct behavior. Besides, I am also using Visual Studio 2008, which has the correct behavior (from my point of view).
Posted by Microsoft on 3/11/2013 at 10:21 AM
Hi,

Thanks for contacting us about this issue. The behavior that you described is actually working as designed. When a property on the WinForms designer is modified, the entire InitializeComponent method is re-generated. So, all of the code is re-generated with the current pretty listing settings.

Kind Regards,
Dustin Campbell
Visual Studio Managed Languages
Posted by Microsoft on 3/11/2013 at 1:56 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 3/8/2013 at 10:52 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.