Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / September 2003

Tip: Looking for answers? Try searching our database.

BUG: Visual Studio 2003 Removes Event Handlers from VB and C# code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Damir Colak - 24 Sep 2003 23:32 GMT
Greetings,

We are having big problems working with Visual Studio 2003, it erases
event handlers from C# and VB code.

For example:

1. Open project
2. Open ASPX file with several buttons and event handlers associated
with them
3. Work on the HTML part of the page (design mode)
4. Build the project
5. Run & try the page

No button functions. Go back to the code and there it is: ALL EVENT
HANDLERS HAVE BEEN ERASED. Sometimes the bug appears sometimes it
doesn't.

Our customers are losing patience too, every few deploys they receive
application that does not work - only because of the bug in Visual
Studio 2003 that removes event handle code. Our test department has no
way of testing all buttons, edit boxes etc.

Does anybody know how to deal with this bug?

Unfortunately, the list of Visual Studio 2003 bugs we maintain is
growing each day. Our productivity is suffering badly because of the
problems induced by the new IDE.

Thanks for any info that you might have.

Best regards,
Damir Colak
Brian W - 25 Sep 2003 19:49 GMT
I have seen this too. and reported it on this NG. It is just another in a
long list of bugs in the IDE

Someone from MS wanted a sample project to reproduce the problem, but, as
you are seeing this bug is intermittent and cannot be reproduced
consistently. And there seems to be no pattern.

BTW are you sure it is the event handlers that are being erased? What was
reported before was the assignment of the handlers is being erased

  button.Click += new System.EventHandler(this.Button_Click);

I find it hard to believe that nobody at MS has ever experienced this, since
it happens often enough.

Sorry I don't have a solution, all I can suggest is, do what I do, go to the
code behind and check that the code hasn't been removed before you build.
Also, it's generally bad practice to send untested code, even if it weren't
for the IDE problems, sending untested code to a client does nothing but
lessen your credibility, as a capable developer/company.

Good luck
Brian W

> Greetings,
>
[quoted text clipped - 29 lines]
> Best regards,
> Damir Colak
John Saunders - 26 Sep 2003 01:45 GMT
> Greetings,
>
[quoted text clipped - 13 lines]
> HANDLERS HAVE BEEN ERASED. Sometimes the bug appears sometimes it
> doesn't.

If it's this consistent, perhaps you could come up with a small reproducer?
Signature

John Saunders
Internet Engineer
john.saunders@surfcontrol.com

Christian Boult - 29 Sep 2003 21:43 GMT
Attach events manually after the InitializeComponent call, instead of using
the properties editor.
It's a pain but at least the code is not touched by VS IDE so it sticks.

Chris.

> Greetings,
>
[quoted text clipped - 29 lines]
> Best regards,
> Damir Colak

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.