Incorrect designer generation for VB when last property of a component is of string type
See original GitHub issueEnvironment
Visual Studio 2022 version 17.5.0
.NET version
6.0
Did this work in a previous version of Visual Studio and/or previous .NET release?
Visual Studio 2022 version 17.4.5
Issue description
When last property of a component is of a String type, then it not insert new line character and the comment of next section get on the same line, for example, look the single quote of Form1 comment right after “Label1”:
Private Sub InitializeComponent()
Label1 = New Label()
SuspendLayout()
'
' Label1
'
Label1.AutoSize = True
Label1.Location = New Point(413, 91)
Label1.Name = "Label1"
Label1.Size = New Size(41, 15)
Label1.TabIndex = 0
Label1.Text = "Label1"'
' Form1
'
AutoScaleDimensions = New SizeF(7F, 15F)
AutoScaleMode = AutoScaleMode.Font
ClientSize = New Size(800, 450)
Controls.Add(Label1)
Name = "Form1"
Text = "Form1"
ResumeLayout(False)
PerformLayout()
End Sub
Steps to reproduce
- Create new Windows Forms application with Visual Basic
- Place a Label componente on the Form
- Save
Diagnostics
No response
Issue Analytics
- State:
- Created 7 months ago
- Reactions:1
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Incorrect designer generation for VB when last property of ...
Incorrect designer generation for VB when last property of a component is of string type #5872. Sign in to view logs · Sign...
Read more >Visual studio shows endless messages "Code generation ...
When in design view in Visual Studio; a control instance is created to render it on the visual editor, but if the control...
Read more >Design-time errors - Windows Forms .NET
This error is a problem with a third-party component. Contact the component vendor. Cannot access the Visual Studio Toolbox at this time. Visual ......
Read more >Work with Variables and Types
Here are the different types of variables available in Visual Builder: Primitive variables such as String, Number, Boolean, even a wildcard-type Any. Structured ......
Read more >The 10 Most Common Mistakes in C# Programming
Many (but not all) value types have an IsEmpty property which you can check to ... Common C# Programming Mistake #3: Using improper...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Tested with 17.5.3 and now is working as expected. Thanks!
We have fixed this already in a later version of VS. We’re currently thinking about servicing a couple of issues around VB, including this one, to 17.5.
Leaving this open for visibility, until we finally decide. @merriemcgaw FYI.
Thanks for your engagement!