dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.37k stars 966 forks source link

Setting GenerateMember to false is not removing class member #8505

Open kirsan31 opened 1 year ago

kirsan31 commented 1 year ago

Environment

Microsoft Visual Studio Community 2022 Version 17.4.4 VisualStudio.17.Release/17.4.4+33213.308 Microsoft .NET Framework Version 4.8.09032

.NET version

.Net7, .Net6. Others not tested.

Did this work in a previous version of Visual Studio and/or previous .NET release?

Yes in old .NET framework designer.

Issue description

GenerateMember = false must remove corresponding class member from *.Designer.cs. Actual behavior:

image

Steps to reproduce

Any winforms project. Open designer, select any existing control on the form, set GenerateMember to false. Project to quick test: GenerateMemberTest.zip

Diagnostics

No response

merriemcgaw commented 1 year ago

We are tracking this in our internal designer repo. Thanks for reporting it @kirsan31!

Tanya-Solyanik commented 1 year ago

Duplicate of https://github.com/microsoft/winforms-designer/issues/4703