Events disappear in VS.Net 2003

R

Rekkie

Hi,

All of our developers using C# VS.Net 2003 to develop websites are
having problems with Events being deleted from their code by Visual
Studio. It seems that object events defined in the properties window
work for a while during debugging, and after a while visual studio
decides that it doesn't like the events anymore and it cancels them
however leaves intact the associated code that is called by the event.

As far as I have been told the developers using VB.NET are not
experiencing these problems.

The only way I have found around this problem is to code the events for
webpage objects directly in the HTML.

Is anyone else experiencing this problem??? and is there a solution to
this as it is driving us NUTZ. I have found very little/next to nothing
searching in google.

Regards

Rekkie


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
F

Frans Bouma [C# MVP]

Rekkie said:
Hi,

All of our developers using C# VS.Net 2003 to develop websites are
having problems with Events being deleted from their code by Visual
Studio. It seems that object events defined in the properties window
work for a while during debugging, and after a while visual studio
decides that it doesn't like the events anymore and it cancels them
however leaves intact the associated code that is called by the event.

As far as I have been told the developers using VB.NET are not
experiencing these problems.

The only way I have found around this problem is to code the events for
webpage objects directly in the HTML.

Is anyone else experiencing this problem??? and is there a solution to
this as it is driving us NUTZ. I have found very little/next to nothing
searching in google.

THis is a known isue if I'm not mistaken. I've ran into this myself a couple
of times.

You can re-wire the event handlers in the InitializeComponent() method in
the code behind.

Frans.
 
R

Robert Dickow

Hi,

All of our developers using C# VS.Net 2003 to develop websites are
having problems with Events being deleted from their code by Visual
Studio. It seems that object events defined in the properties window
work for a while during debugging, and after a while visual studio
decides that it doesn't like the events anymore and it cancels them
however leaves intact the associated code that is called by the event.

As far as I have been told the developers using VB.NET are not
experiencing these problems.

The only way I have found around this problem is to code the events
for webpage objects directly in the HTML.

Is anyone else experiencing this problem??? and is there a solution to
this as it is driving us NUTZ. I have found very little/next to
nothing searching in google.

Wow, yes, I just had a project that started doing this, for events but
also properties in my Corelab mySql add in modules. I don't know why it
happened. As you say, the code was still in the code behind files in my
web project. So.... I carefully backed up the whole sheband. Then I
created a brand new blank project, did a "Add from existing...." on
every file, and lo and behold, it fixed it. No more forgetfulness.

OH, and I'm using VS.NET 2002

Bob
 
R

Rekkie

Hi Frans,

Well actually rewiring the events in the InitializeComponent() method
doesn't really help me much, as soon as I turn around they disappear
again.

As for it being a know issue, I have not been able to find any
documentation on MSDN on the web, do you know where I can find it??

thanx
Rekkie



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
R

Robert Dickow

Well actually rewiring the events in the InitializeComponent() method
doesn't really help me much, as soon as I turn around they disappear
again.

As for it being a know issue, I have not been able to find any
documentation on MSDN on the web, do you know where I can find it??

thanx
Rekkie

I don't know about this being documented anywhere. I have a slight hunch
about it though. After restoring my project and fixing the problem, I
did one little edit in an external editor, and the problem reappeared.

Did you ever load any pages into UltraEdit or Notepad or anything like
that?

Bob Dickow
 
D

David Cuffee

I doubt this is it but I had some system classes disappear on me. It was the
ListBox.SelectedIndices and every other class under the ListBox. I found out
it was because I had gotten a new laptop and when I moved he product over I
copied the project files incorrected into the wrong sub-directories.
Meaning, the project file is suppose to be one folder above all the classes
and forms, and I had the project file in the same folder. Somehow I also had
a project file one folder above too, so VS was probably getting confused.
Once I got rid of the project file in the sub folder, everything started
working correctly. Its probably not your problem here.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top