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

Visual Studio .Net

    Next

  • 1. VS .NET 2002 Startup Crash
    Hi, Everytime I try to open VS.NET 2002, dexplore.exe crashes. I found the faulting module to be msenv.dll at offset 00040440. The version of dexplore.exe and msenv.dll is 7.0.9466.0. In addition My operating system is Windows XP Pro. Any ideas ? tia, -- Johannes Anderwald
  • 2. VS.NET 2003 IDE crash on build or exit
    Hi, I am using MS.NET 2003 and having problem with IDE since the last couple of days: each time I tried to build a project, or even exit by click Close ('X') button, IDE poped up the famous "Microsoft Development Environmeent has encountered a problem and needs to close. ...", I tried 'Debug' and got the following information: AppName: devenv AppVer: 7.10.3077.0 ModName: kernel32.dll ModVer: 5.1.2600.1106 OffSet: 00013887 I have no idea how the info can be used. What I am doing now is to use a script which build the whole solution, it works, but that reqires me to check in my changes each time - I know it's temporary, but I don't know how deep the cause could be, i.e. re-install OS? I don't have that much time to do so now. I re-installed (actually 'update', since I didn't notice any uninstall, double clicking 'Change/Remove' button on Add/Remove asked me to insert the CDs (1 and 2) ) MS.NET 2003, but it doesn't help at all. Any ideas? Thanks, Peter
  • 3. Wizard Form
    Hi, I am using Visual Studio 2002. When I invoke Data Form wizard, I am asked to enter name for dataset. When I click on "next" after entering a name for dataset, I get an error message: "An unexpected error has occured. Error Message: Specified argument was out of the range of valid values. Parameter name: '0' is not a valid value for 'index'. Call Stack: at System.Windows.Forms.ComboBox.set_SelectInedx(Int32 value) ..... " "Under" this error message box is a dialog for "Choose a data connection" which contains the combo box; so I think the error is related to this dialog. Is it an IDE bug and I can fix it with any download or am I doing something wrong? Thanks, Lubomir
  • 4. Automatic configuration of "Copy Project" dialog box
    With ASP.NET projects, is it possible to have VS.NET automatically change the configuration options of the "Copy Project" dialog box based on the value selected in the "Solution Configurations" drop down list? I'd like to set up the project that when Release is selected and I select "Copy Project", my production server's values are filled in. Likewise for my DEV, TEST, UAT etc. environments. Thanks Kevin Schneider

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

Postby dcolak » Fri, 26 Sep 2003 07:32:30 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

Similar Threads:

1.Visual Studio 2003 Removes Event Handlers from VB and C# code

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

"Damir Colak" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
> 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


2.Parameters With CS in Visual Studio 2002 vs Visual studio 2003

Hi,
In Crystal Report for Visual Studio 2003 its possible to code parameters
with the ParameterFieldInfo property . In CR for visual studio 2002 this is
not available. How is this done for the 2002 versjon av CS ?

Tnx


3.translating from C# to vb.net (event handler code) - "Form1.vb" 6645 Bytes

4.Visual Studio 2003 reformats/removes HTML code in Design mode

I have an html table based form that has textboxes embedded in table rows on 
it.  I wanted to have the textboxes autosize and also have the table rows 
autosize.  To accomplish this, I added a user-defined function that counts 
the number of carriage return/line feeds and sets the textbox's Row property 
accordingly.  This works to autosize the textbox.  Also, I wanted the 
containing table row to autosize to show the full textbox.  The reason for 
this is I'm making the textbox appear as a label (style="OVERFLOW: hidden").  
To accomplish, I have the function pass back a string with the number of 
pixels represented by the number of rows in the textbox.  I assign this 
return value to the Height attribute of the row as follows:

<TD vAlign="middle" align="left" colSpan="4" style="HEIGHT: 
=GetKeyTermsHeight()" >

This works great!  The problem is that the next time I open the form, the 
Visual Studio designer opens the form and goes to the Design tab.  This 
reformats the HTML automatically and removes the style="HEIGHT: 
=GetKeyTermsHeight()" code above.  No warning!  I turned off ALL auto 
formatting of HTML/XML in Tools/Options.  No help there!  What can be done to 
prevent this?  Currently, I'm saving the <TD> definition to the Code behind 
window as a comment and repasting it in the HTML view before rebuilding my 
solution.  It's a big pain though because the project is very large, and I'm 
concerned that another developer will unwillingly change and lose this 
feature for me.  I'd like to add the autosize to my other forms, but doing so 
would be a code management nightmare that I can't afford right now.  Any 
ideas?  Please!
-- 
tpirkle

5.Why won't Visual Studio 2003 work for C# when It will work with VB

I've been programming in VB.Net with VS2003 for a couple of years.  However, 
now that I want to use C#, it will not work.

The compiler does not recognize "system" or "Console" even though a 
reference has been set to System and the line "Using System;" is in the code.

I have reinstalled the framework, VS, and have gotten the latest downloads 
from Microsoft.  None of this helped.

Does anyone know what I need to do to get VS to work with C#?

6. translating from C# to vb.net (event handler code) - "Form1.cs" 6528 Bytes

7. Visual C++ bug in Visual Studio .NET 2003???

8. Updates for VB, Visual Studio .Net 2003, Visual Studio 2005



Return to Visual Studio .Net

 

Who is online

Users browsing this forum: No registered users and 46 guest