.NET Forum / Visual Studio.NET / IDE / March 2005
Sick and tired of Visual Studio.NET 2003 deleting code.
|
|
Thread rating:  |
Ken Varn - 10 Mar 2005 21:41 GMT I can't count the number of times I have edited my ASP.NET page only to determine that Visual Studio decides to randomly delete code from my code-behind file. This has happened several times now. So far, I have lost all code in my InitializeCompoenent() method (and no, I have not placed any of my own code in it). I have also had event connections thrown out by the designer. What gives? Is Microsoft planning to patch these bugs or are we just going to have to live with them until another version of Visual Studio comes out with newer and improved bugs?
Sorry to be so cynical about this, but when you spend hours or days working on a screen only to have the designer throw out half of the code, it gets pretty frustrating.
 Signature ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc.
EmailID = varnk Domain = Diebold.com -----------------------------------
Scott M. - 10 Mar 2005 22:05 GMT First, take a deep breath. No doubt you are frustrated, but perhaps, just perhaps this could be attributed to user error?
I have been using VS.NET since early beta (4 years) and have not once encountered what you are describing.
>I can't count the number of times I have edited my ASP.NET page only to > determine that Visual Studio decides to randomly delete code from my [quoted text clipped - 14 lines] > on a screen only to have the designer throw out half of the code, it gets > pretty frustrating. kiln - 11 Mar 2005 01:57 GMT Scott this is OT but didn't get any response to my msg on this ng...I've also new to vs 2003 and one thing I sort of can't believe is that in order to set common attributes like font size and bold and color etc of textboxes and buttons, you have to use the property box. IE, there is not toolbar for formatting this stuff...I've checked out vb2005 express and don't see what I'm looking for there either...is this an attempt by microsoft to build the least productive IDE in world history, or did I miss something? As far as I can tell it takes about 10x longer than it should to set these routine attributes. Very discouraging. I'm doing VB.Net.
> First, take a deep breath. No doubt you are frustrated, but perhaps, just > perhaps this could be attributed to user error? [quoted text clipped - 20 lines] > > on a screen only to have the designer throw out half of the code, it gets > > pretty frustrating. Scott M. - 11 Mar 2005 02:09 GMT This is and has always been the way that Visual Studio works. It's not Word, it's a development environment. If you are familiar with OO concepts, then working in a properties window makes perfect sense.
> Scott this is OT but didn't get any response to my msg on this ng...I've > also new to vs 2003 and one thing I sort of can't believe is that in [quoted text clipped - 34 lines] >> > gets >> > pretty frustrating. kiln - 11 Mar 2005 02:31 GMT Wow, OO isn't really equal to clunky you know. OO isn't the issue here, it's not even in the topic space, it's an IDE issue. There isn't anything inherantly OO about a properites box as compared to a toolbar...or do you think they made a mistake having any toolbars at all in VS? I know, I can do .net with notepad, right? Productivity? What?
> This is and has always been the way that Visual Studio works. It's not > Word, it's a development environment. If you are familiar with OO concepts, [quoted text clipped - 37 lines] > >> > on a screen only to have the designer throw out half of the code, it > >> > gets Scott M. - 11 Mar 2005 02:52 GMT I'm sorry, but I do disagree. Different controls have different properties. Some controls have many many properties. Which ones should be on this toolbar of yours? You won't be able to put them all on the toolbar, so some will have to go somewhere else. Now, I've got to go to 2 places to work with properties? That doesn't sound very efficient to me.
OO means working with objects/classes, properties, methods & events. A properties window where one can browse all the properties of various classes makes perfect sense to me and doesn't slow me down at all. This is an OO concept in my mind, since properties are class members, I want a central place to do design-time work with properties. Going to a toolbar for some properties and not others seems to me like it would add confusion.
Again, it's an Integrated Design Environment, not Word. The toolbars in the IDE help the overall development process and offer various forms of help, but they aren't meant to be used with specific classes.
> Wow, OO isn't really equal to clunky you know. OO isn't the issue here, > it's not even in the topic space, it's an IDE issue. There isn't [quoted text clipped - 49 lines] >> >> > on a screen only to have the designer throw out half of the code, it >> >> > gets kiln - 11 Mar 2005 03:21 GMT When building forms, there are all sorts of controls have a text property, a varienty of font settings, backcolors, in common; ie tons of things that need formatting. It'd be child's play to have a formatting toolbar that scales down the drudgery of setting all of those properties in the dialog box. I mean, there is plenty to do that has to take a lot of time, why not make something this simple routine? There are some formatting toolbars in the IDE, just none that deal with this stuff.
What I mean is, unless you're acutally setting those properites in code, potentially hundreds of them on a form, why exactly isn't it "cheating" to use a property box, as much as a durn toolbar? This is really pretty funny...I admit it's a trivial subject in the scope of things, but programmers tend to get excited by these sorts of issues....anyways, carry on with your OO property boxes! <g>
> I'm sorry, but I do disagree. Different controls have different properties. > Some controls have many many properties. Which ones should be on this [quoted text clipped - 35 lines] > >> > should to set these routine attributes. Very discouraging. I'm doing > >> > VB.Net. Marcos Stefanakopolus - 11 Mar 2005 17:58 GMT Child's play? Really?
How about this. If you think doing that would be so stinkin' easy, why don't you go build a VS plug-in to do it, and put it up on Codeproject.Com or somplace. If people download it by the millions then you'll have proven your point. But if they ignore it in droves, well then, you'll just have to conclude that perhaps the built in properties window works for basically everybody but you. At the very least, you'll have created the dev UI that you like!
Put your "leet coder skillz" where your mouth is...
> When building forms, there are all sorts of controls have a text > property, a varienty of font settings, backcolors, in common; ie tons of [quoted text clipped - 63 lines] >> >> > should to set these routine attributes. Very discouraging. I'm doing >> >> > VB.Net. kiln - 12 Mar 2005 01:42 GMT There are tons of add-ins for VS...you're convinced that writing a toolbar that mods selected control properities would be hard compared to those? Man, you've got to be kidding. For anyone familiar withe .net and VS, it'd have to be child's play, or there's something seriously wrong with .net...just don't believe that.
I'm new to VS, and have lots of things to learn before I start writing add-ins, obviously. But wow what a super open minded set of folks have collected here, I'm amazed. Have you tried notepad for your .net stuff? You'll find it's far "simpler"! I cannot fathom why no one has said "Yes VS lacks control formatting toolbars but it would be cool". It's all "stupid idea of the level of Word toads!"
There are lots of people that don't like the VS IDE or find it inferior, limited, awkward, whatever...I'm too new to have formed much of an opinion. Mainly, Microsoft surprises me that there are so many rough edges, seeming oddities, missing items... VS 2003 isn't exactly a first rev of a product.
> Child's play? Really? > [quoted text clipped - 42 lines] > >> Again, it's an Integrated Design Environment, not Word. The toolbars in > >> the Scott M. - 12 Mar 2005 18:50 GMT I think that you should maybe lose your condescending attitude and try to understand why you are getting the comments that you are from the folks here. I don't believe anyone has called you or your idea "stupid" as you suggest.
You admit that you are new to VS.NET and you also don't seem to want to even *try* to understand the point of view from folks that have tremendous experience with it and MS development products in general. To me, that's not a very wise approach to learning.
It sure would be "cool" to have a lot of things in VS.NET that aren't there now. 3rd party add-ins are one way to get them. But, just because something would be nice for one person, doesn't mean that it would make sense and be nice for everyone else. I believe MS has taken a straight-forward approach to how you set properties at design-time. An approach that is easily understandable and consistent with how its done in, not only their other products, but with how its done in many other development products.
> There are tons of add-ins for VS...you're convinced that writing a > toolbar that mods selected control properities would be hard compared to [quoted text clipped - 74 lines] >> >> in >> >> the kiln - 12 Mar 2005 19:40 GMT This is what you originally posted when I asked you about setting control formatting properites via toolbar:
"This is and has always been the way that Visual Studio works. It's not Word, it's a development environment. If you are familiar with OO concepts, then working in a properties window makes perfect sense."
Invoking Word was condescending, altho Word programmers wouldn't appreciate the cut.
I don't have a problem with property boxes; I just expected this IDE to be a little more RAD oriented. Everyone gets used to the toolset that they work in every day, so I don't expect you to be crying in your beer about VS' missing or stunted features, I'd expect you to move on and worth with it, as I'm sure you do. Not sure if I'd expect you to stop seeing where VS could be improved, but that's probably not where you're coming from; only my peeve isn't going to be your peeve.
It's a tiny thing, one of many adaptations I'll make if I stick with VS for long. I've been far more surprised by the ideas here that a formatting toolbar would be non-OO or useless or would drag .net programmers down to the level of Word programmers...or even so hard to implement as an add-in. That last item of course I have no idea if it's really be that hard to pull off, but I'd be further staggered if people who write add-ins, or the people at MSFT who dev VS would find it more than trivial to implement. Would also be surprised if a control formatting toolbar appeared in VS2005 if it wasn't put to good use by many.
Anyways thanks for the dialog, I shouldn't have said that about "least productive IDE on the planet" or whatever it was, not what you all wanted to hear, and I'm sure not true anyways. There is a lot to like with VS.
> I think that you should maybe lose your condescending attitude and try to > understand why you are getting the comments that you are from the folks [quoted text clipped - 41 lines] > >> or somplace. If people download it by the millions then you'll have > >> proven Scott M. - 12 Mar 2005 21:22 GMT If you took offense by me indicating that VS is not Word, then I apologize but that was not meant as a dig, it is a fact. I was trying to point out that VS.NET is a development environment, not an end-user application...there's no insult there, it's a fact.
> This is what you originally posted when I asked you about setting > control formatting properites via toolbar: [quoted text clipped - 83 lines] >> >> or somplace. If people download it by the millions then you'll have >> >> proven BobF - 12 Mar 2005 23:47 GMT If you're interested in an "outside" viewpoint, I took the Word reference as insulting. I think the fact that VS.NET is a development environment is one that didn't need reinforcing - that's why it came across as an insult.
I also took the additional comment re: familiarity with OO concepts as insulting to the OP.
If you're not interested in an "outside" viewpoint, disregard the above :-)
((yes, I'm an intentional top-poster))
BobF
> If you took offense by me indicating that VS is not Word, then I apologize > but that was not meant as a dig, it is a fact. I was trying to point out [quoted text clipped - 7 lines] > > Word, it's a development environment. If you are familiar with OO > > concepts, then working in a properties window makes perfect sense." Scott M. - 13 Mar 2005 00:27 GMT Well, as I said, it wasn't meant to be, just a fact.
> If you're interested in an "outside" viewpoint, I took the Word reference > as insulting. I think the fact that VS.NET is a development environment [quoted text clipped - 24 lines] >> > Word, it's a development environment. If you are familiar with OO >> > concepts, then working in a properties window makes perfect sense." Marcos Stefanakopolus - 14 Mar 2005 19:01 GMT > There are tons of add-ins for VS...you're convinced that writing a > toolbar that mods selected control properities would be hard compared to > those? Man, you've got to be kidding. For anyone familiar withe .net and > VS, it'd have to be child's play, or there's something seriously wrong > with .net...just don't believe that. Sorry. I should have been more clear. I doubt that developing a VS add-in is itself all that hard. I've never done it, so I'm speculating, but you're probably right that it's no big trick.
The big trick will be designing such a toolbar that is actually _more useful_ than the properties window about which you are so up-in-arms. Figuring out exactly what should go on it, how it should work, how it should interact with the rest of the designer, etc., that's what isn't going to be child's play. If you think you're up for the _design_ challenge, then by all means go for it.
However, in some of your other posts you suggest that you're not looking for a generally applicable toolbar, but rather, a toolbar with your personal "favorite" properties exposed on it. If that's the case, then yeah, that's no big design challenge either. In the time you've spent ranting about VS in the newsgroups, it seems like you could have already implemented such a toolbar. So what gives? Where's your code?
> There are lots of people that don't like the VS IDE or find it inferior, > limited, awkward, whatever...I'm too new to have formed much of an > opinion. I'm sorry, but I have to call BS on that. Your many, many, many other posts in this thread demonstrate that you have an ample supply of opinions about VS.
Scott M. - 11 Mar 2005 22:31 GMT > When building forms, there are all sorts of controls have a text > property, a varienty of font settings, backcolors, in common; ie tons of > things that need formatting. It'd be child's play to have a formatting > toolbar that scales down the drudgery of setting all of those properties > in the dialog box. I've never felt that looking at a list, finding what I want to change and changing it was drudgery. And again, with your suggestion, we'd now have *some* properties in one place and *some* in others. Doesn't sound very productive to me.
>I mean, there is plenty to do that has to take a lot > of time, why not make something this simple routine? There are some > formatting toolbars in the IDE, just none that deal with this stuff. Because work on a particular class should not be confused with managing the application as a whole.
> What I mean is, unless you're acutally setting those properites in code, > potentially hundreds of them on a form, why exactly isn't it "cheating" > to use a property box, as much as a durn toolbar? This is really pretty > funny...I admit it's a trivial subject in the scope of things, but > programmers tend to get excited by these sorts of issues....anyways, > carry on with your OO property boxes! <g> You do know that you can change 100 textboxes to show their text as bold or change their text color or whatever all at once don't you?
>> I'm sorry, but I do disagree. Different controls have different >> properties. [quoted text clipped - 48 lines] >> >> > should to set these routine attributes. Very discouraging. I'm doing >> >> > VB.Net. kiln - 12 Mar 2005 01:24 GMT Yes I know you can multi select controls.
You already have access to properites in two places; the prop box and in code. I can't imagine that a third location would be so confusing.
> > When building forms, there are all sorts of controls have a text > > property, a varienty of font settings, backcolors, in common; ie tons of [quoted text clipped - 42 lines] > >> > >> Again, it's an Integrated Design Environment, not Word. The toolbars in Scott M. - 12 Mar 2005 18:53 GMT Again, I would ask you which properties would you put on this toolbar? You wouldn't be able to put them all there (especially since different controls support different properties). So, if we had *some* properties on the toolbar and *some* in the properties window, we would have to bounce back and forth. This is not the same thing as talking about setting properties in the properties window vs. the code window, since setting properties @ design-time and run-time are done for functionality reasons, not for convenience sake.
> Yes I know you can multi select controls. > [quoted text clipped - 58 lines] >> >> Again, it's an Integrated Design Environment, not Word. The toolbars >> >> in kiln - 12 Mar 2005 19:46 GMT I'd never advocate putting a control formatting property in *only* the toolbar, my prev posts made that clear.
Text, backcolor, bordercolor, font size, all of those fit perfectly into a toolbar idom. If you have multiple controls selected, and the property does not apply to one of the controls, disable the toolbar button.
It would be fun to write an add-in for this but it's not a priority. Or maybe I'd find that it's very hard to do in VS, as the other person intimated.
> Again, I would ask you which properties would you put on this toolbar? You > wouldn't be able to put them all there (especially since different controls [quoted text clipped - 41 lines] > >> You do know that you can change 100 textboxes to show their text as bold > >> or Scott M. - 12 Mar 2005 21:26 GMT Hey, you are entitled to your opinion and preference, no one is denying you that. As I said earlier, MS has a tendency not to make too many assumptions about how a developer will work and working in a properties window is and has been a pretty common paradigm for quite some time without a great call for something different. Your original post asked why MS didn't add this feature and I believe that I have just answered it for you. Now, again, that's not to say that having more features wouldn't be nice...and that's the beauty of add-ins.
> I'd never advocate putting a control formatting property in *only* the > toolbar, my prev posts made that clear. [quoted text clipped - 65 lines] >> >> bold >> >> or kiln - 11 Mar 2005 02:49 GMT Anyways, thanks for responding, and you gave me the best laughs I've had in days, despite the answer not being the one I was hoping for.
> This is and has always been the way that Visual Studio works. It's not > Word, it's a development environment. If you are familiar with OO concepts, [quoted text clipped - 37 lines] > >> > on a screen only to have the designer throw out half of the code, it > >> > gets Ken Varn - 11 Mar 2005 13:55 GMT I can't possibly equate this to being user error. When I edit my HTML file, run the ASP.NET page, and then wonder why none of it works any longer. Then, I go to look at my InitializeComponent(), which is supposed to be managed by the IDE, and I suddenly realize why my page doesn't work anymore. It is because all of the code in InitializeCompoenent() is now gone! It's not like I went into the function and deleted all of the code in it myself, nor did I delete any components in the HTML file. Maybe the designer thinks this is being done if a syntax check fails as the HTML file is being edited.
I have been using VS.NET for about 3 years, and I have had this happen several times. I have also had it unhook my event handlers even more often. I had it happen so often at one point, that I had to move the code for hooking up the event handlers outside of the InitializeComponent() function.
 Signature ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc.
EmailID = varnk Domain = Diebold.com -----------------------------------
> First, take a deep breath. No doubt you are frustrated, but perhaps, just > perhaps this could be attributed to user error? [quoted text clipped - 20 lines] > > on a screen only to have the designer throw out half of the code, it gets > > pretty frustrating. Scott M. - 11 Mar 2005 22:39 GMT Well, now we are getting somewhere.
So, tell me...
Do you use VS.NET to do your HTML changes? Do you tend to move the generated HTML tags around from where the HTML designer put them? What kind of HTML changes do you make?
Because, now that you've told me what you are doing (editing the HTML), I can tell you that what you are describing is a well-known behavior of VS.NET that happens when you make HTML changes that VS.NET can't interpret.
I'm not saying that you can't make changes to your HTML, I'm saying that the HTML tags that are created by VS.NET need to be in a certain structure in order for VS.NET to continue to recognize your controls. Changing a control's name in HTML, for example would definitely cause that object to no longer have any code in the code-behind for it or cause it to become disconnected from its event handler.
>I can't possibly equate this to being user error. When I edit my HTML >file, [quoted text clipped - 45 lines] > gets >> > pretty frustrating. Ken Varn - 14 Mar 2005 15:16 GMT > Do you use VS.NET to do your HTML changes? Occasionally I do use the VS.NET HTML editor to edit the aspx file. I have done this when editing the MultiPage control, since this is the only way to add pages to it.
> Do you tend to move the generated HTML tags around from where the HTML > designer put them? I have also had to move HTML around at times when I cannot get the ordering right using the Visual Designer.
> What kind of HTML changes do you make? It's really hard to say what exact changes I do make. I may add some JavaScript, I may edit an HTML table, I may alter a tag's style.
-------------
I sort of have an idea why these things may happen, because of the structure of VS.NET and the Visual Designer modifying the code-behind module to match the aspx module. However, I think that there needs to be some safeguard put in place that allows me to "defer" code behind changes until I feel the HTML file is stable enough for those automated changes to be done. Maybe a toolbar button or something similar.
I do have a tendency to hit "save" a lot while editing, this may also aggravate the problem. This is a leftover from my earlier days using Visual Designers that would lock-up, so I have been conditioned to save a lot while editing.
 Signature ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc.
EmailID = varnk Domain = Diebold.com -----------------------------------
> Well, now we are getting somewhere. > [quoted text clipped - 65 lines] > > gets > >> > pretty frustrating. Julie - 12 Mar 2005 04:26 GMT > First, take a deep breath. No doubt you are frustrated, but perhaps, just > perhaps this could be attributed to user error? User error? Think again, the IDE *DOES* delete code, reformat, do-whatever-it-likes-with-your-code all the time. Definitely _not_ user error, it is an abortion of an IDE.
> I have been using VS.NET since early beta (4 years) and have not once > encountered what you are describing. I've been using VS/VC since it was first released many years ago. The only thing consistent about it is its poor performance and buggy behavior.
To the OP: you are out of luck. This is a "known problem" (_Microsoft_ knows), but nothing is being done about it in this version. You have to wait for VS05 for an IDE that doesn't manhandle your code. For some completely unknown reason, MS will *NOT* issue patches/interim fixes for VS.NET. However, their Media Player division will spam you to death with (what daily?!) updates to their stupid player.
>>I can't count the number of times I have edited my ASP.NET page only to >>determine that Visual Studio decides to randomly delete code from my [quoted text clipped - 14 lines] >>on a screen only to have the designer throw out half of the code, it gets >>pretty frustrating. Scott M. - 12 Mar 2005 18:54 GMT Please see my last response to the OP which addresses your comments as well.
>> First, take a deep breath. No doubt you are frustrated, but perhaps, >> just perhaps this could be attributed to user error? [quoted text clipped - 34 lines] >>>on a screen only to have the designer throw out half of the code, it gets >>>pretty frustrating. Peter van der Goes - 14 Mar 2005 02:37 GMT > I've been using VS/VC since it was first released many years ago. The > only thing consistent about it is its poor performance and buggy behavior. [quoted text clipped - 5 lines] > VS.NET. However, their Media Player division will spam you to death with > (what daily?!) updates to their stupid player. Based on your obvious dislike for VS/VC, I have to ask: Why continue to use it? There are competing development environments (for C++, anyway). FWIW, this is an honest question, not an attempt to "stir the pot"
Julie - 15 Mar 2005 21:15 GMT >>I've been using VS/VC since it was first released many years ago. The >>only thing consistent about it is its poor performance and buggy behavior. [quoted text clipped - 9 lines] > it? There are competing development environments (for C++, anyway). FWIW, > this is an honest question, not an attempt to "stir the pot" Couple of reasons: I do a lot of contract work, and the customer dictates the tools (etc.) to be used. 100% require MSVC. Second, 95% of my current work is in C#, so IDE support (from what I'm aware of) in competing products is weak at best.
In the 'old' days, I exclusively used Borland -- 1000% better than the equivalent MS detritus. Unfortunately, Borland went to handbasket in a hell, and MSVC became (virtually) the sole option in Windows development.
(Personally, I detest all MS products (software, OS, hardware), and it is a little late to affect a comprehensive career change. Things definitely were better before the dot-com/consumerization fiasco of the 90's.)
Free MagazinesGet 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 ...
|
|
|