Broken VS.NET Formatting and the Same Old Story

Mikhail Arkhipov details, once again explains why the existing Visual Studio html formatting bug cannot be fixed (or why Microsoft doesn't want to bother).

I'm sorry, but I'm not drinking the Koo-laid. Yes, there are valid reasons for the terrible formatting behavior, but COME ON. It's a bug that's been around for at least 3 products! And it's not just some annoying little bug, it's a productivity killing bug that mangles code and prevents us from using many features the html designer provides. I haven't dragged and dropped a single thing onto a web page in a year because it will reformat and change my code (disappearing events anyone?)

How hard would it be to cache a pre-parsed version of the page, either in memory or to the disk and return it again after you've done the parsing??? It's not elegant, but it would at least allow me to open up the designer to have it parse my controls for the code-behind and create click events for buttons. The designer should know when it doesn't have to re-write the html. You could even make it a preference to turn off the design view for everything except basic functionality.

I'd live with that, but really, why not take the Whidbey code and merge it back into vs.net2k3 as a service pack? You've already done the work, the time has been spent solving the problem. Done, finished, complete. Give it back to those who can use it for the next 6-8 months until Whidbey arrives. We need it today, we needed it yesterday. Changing to much functionality is NO EXCUSE, change it, fix it, fix the product I've paid for. I'm sorry the feature was so poorly designed in the first place, but that's not my problem, the bug is my problem, and it's your job to fix it.

Is withholding it just a way to force me to upgrade because Microsoft wants to advertise the bug fix as a new feature? What kind of motivation is that? That they've already got my money so they don't feel like fixing it? That doesn't inspire confidence since I'm sure there will be all new (un-fixable?) bugs in future products. Besides, I will be forced to upgrade anyway to develop again the new version of the framework.

I know that Mikhail is just giving the reasons why the problem is hard to fix and it's not his fault, but hard to fix or not (we know it can, and has been fixed), ignoring the problem in the current visual studios is BULL.

Print | posted on Sunday, May 16, 2004 7:07 PM

Comments on this post

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
Remember, the designer is not Designer (with capital D :-)) written to be a Designer, but is a browser. The Desgner should know when not to rewrite HTML, but browser doesn't (and shouldn't) care. To put it in other words, if you are writing code for an HTML *editor*, sure you make all the necessary changes.

New code does not fit into VS 2003 b/c we would need to replace HTML view parser by the one from Whidbey, replace HTML tree builder, a bunch of design view code, source code formatter and lots of other things. In addition, new code uses certain new features in VS, so it has to be adapted to the previous code base as well.

All this will require significant changes to approximately 30% of the code. It hence will require full test pass and full-blown release schedule. Time/resource wise it is probably close to a minor release or VS. This would delay Whidbey by significant amount of time (6 months minimum, IMHO) since same people who are currently working on Whidbey would have to stop and start working on 2K3. I totally agree, our job is to fix the issue. However, when fix costed several man-months, it was cheaper to incorporate it into a new release. Unfortunately, there was not enough time between VS 2002 and VS 2003 to do the work, 2K3 was fairly short release cycle.

I am far from defending anything, I am basically trying to explain what has been going on.
Left by Mikhail Arkhipov (MSFT) on May 16, 2004 8:17 PM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
Mikhail, thank you for responding to my comments. I understand it's a difficult fix. But from my end of things, it's something that should have been fixed a long time ago. It just seems that while Microsoft has put much time and effort trying to give us an excellent web platform to develop on, it's not put the same effort into the tools for that platform.

I feel, as someone who cut their teeth on html with classic asp and then moved into the .net realm, that Microsoft hasn't met my needs. Dreamweaver has had (at least decent html, if not pretty good) html editing for years, and Microsoft in 2004, still isn't anywhere remotely close to having reliable tools. I don't mean to say VS.Net should compete directly with DW, but it should at least get the fundementals right. Of course, Visual Studio costs a heck of a lot more than DW these days, so maybe it should compete more directly :)

I think there has to be some compromise, some kind of improvement in the interim. I've spent a significant portion of the last year I've been using Visual Studio being frustrated by it's bad/destructive formatting and working around it, and I'd rather not spend the next who knows how long until I can talk my boss into upgrading to Whidbey (I had to convince him it was worth $30 to upgrade to VS.NET 2003).

It's frustrating as hell, there has to be some way to improve it, even a little.
Left by Michael Cook on May 16, 2004 9:08 PM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
Michael, you hit the nail on the head with the comment above. MS people try to convince us that excuses == reasons but that doesn't convince most of us enough to bother relaying their lines to our employers: "Yes, MS knows it is a crippling bug and has been for years but they promise it will be fixed next time and if you buy the next new version [again], we won't have this problem anymore."
Left by anon on May 18, 2004 3:22 PM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
My development team constantly is having an issue of event handlers and items dragged to a form (ie. typed datasets) simply disapearing.

Its causing much frustration - and it's been around for awhile.

MS needs to fix it if they know about it and not make stupid excuses. This is quite a crippling issue.

Any know of a workaround?
Left by Steve Gentile on May 19, 2004 5:19 AM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
I have the exact same problems Steve, and unfortunatly I don't know of any way around them other than avoiding the designer whenever possible.
Left by Michael Cook on May 19, 2004 6:57 AM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
Maybe a class action lawsuit will change their minds.
Left by Angry Developer on May 21, 2004 6:11 AM

# re: Frustrated with the Visual Studio HTML Editor changing your HTML

Requesting Gravatar...
Left by scooblog by josh ledgard on May 21, 2004 8:40 AM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
It's bunk. Microsoft has been guilty of doing this for a LONG time. "This behavior is by design" anyone?

It's pretty simple. Microsoft both needs us, and we're a direct threat. We build the applications that drive customers to Microsofts OS, and we also build the applications that take away from Microsofts bottom line because people aren't buying Microsoft's applications, they're buying ours.

It's not going to change anytime soon. The truth is, they don't give a shit about us, they only care about our money.

If you *really* want to have an impact, stop using Microsoft software. It's the only way to really show them we mean business. Java? Open Source? Cold Fusion? Whatever, as long as it isn't Microsoft.

Taking away their source of $$ is the ONLY way you're ever going to get them to stop delivering half written software.
Left by Bryan on Jun 15, 2004 8:37 AM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
Did anyone actually READ the article and the reasoning behind it? The problem is fixed with Visual Studio.net 2005. The HTML Tidy fix works pretty well (just tried it now).
Left by Yohan on Jul 26, 2004 1:03 PM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
I'm a fairly experienced software developer, but all of my work up until now has been traditional windows applications. I've been working on a personal site in my spare time for the last couple of weeks (using ASP .NET) and things were going well until today when I began to experience the problems with the reformatting. Are the symptoms completely unpredictable? e.g. : related to .aspx file size, lines of code, certain tags? Everything was fine until I tried to insert an <object> tag and then everything went to hell. Now I'm running into the problem anytime I touch the html. I'm a total ASP newbie so thanks in advance for your patience.
Left by Jay on Oct 30, 2004 7:56 PM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
Well, this is driving us nuts here on our development team as well. Doesn't make for very good source control when checking in the files can result in huge changes, even though no substantive change has been made to the code.

I tried the HTML Tidy fix, but it doesn't seem to like <asp:xxx> (ASP.NET) tags. I've searched for quite awhile now and can't seem to find a way to ignore those problems. Setting input-xml: yes seems to fix that, but then I have problems with the <meta> tags at the top of the page not being closed.

Are there any config files out there that make html tidy work for asp.net? Are the fixes above just related to plain html?
Left by Luke on Nov 13, 2004 10:35 AM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
I'm a bit late to the dance here, but I felt the desire to drop my two cents in.

I've been hand coding HTML since 1994. I've written code for companies like ZDNet, CNET and Orrick. I've developed my own layout style that allows me to quickly identify areas of code. My efficiency is dependent on my ability to easily read through hundreds of lines of code to find a specific object.

At the request of my business partner, I'm now coding in Visual Studio 2003. You can imagine how I hit the roof the first time I clicked back from the design view to see my HTML completely rewritten.

I can't even conceive of the thought process that allowed this to happen. I read Mikhail Arkhipov's article, but I just don't understand how the importance of leaving a developer's code untouched rated so low on his teams list. It seems like it would have taken so little to have a copy of the code sent to the parser, rather the code itself.

I suppose I'll just have to keep working with this crippled version of the tool until our small company can lay out the cash to upgrade.
Left by Troy Brophy on Jan 26, 2005 1:16 PM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
This is shithouse. that's the only way to look at it.
I agree completely with the above post, this shouldn't be our problem.

This is a fundamental feature of the software that doesn't work.
It should never have been released.

I've never came across any other software behaviour that impacts productivity so sneakily and annoyingly.

When debugging code for hours that doesn't seem to work, only to find out that it worked fine all along, it was just a dissapearing event handler is very agrivating.

Sort it out.
Left by Dave on May 10, 2005 8:27 AM

# re: Broken VS.NET Formatting and the Same Old Story

Requesting Gravatar...
You may not like this answer but it works for me .. and I did it by accident. I was implementing the HTML tidy integration for VS.NET and did something incorrectly. Now.. when the IDE tries to format my code, the HTML tidy module causes an exception which is caught and the code remains the same.. so .. solution = ' write a buggy htmlTidy extension to VS.NEt and you too can have no source-rewrites '

option 2.. import html tidy and give it the config it needs so that it formats your code according to the xhtml standard.
Left by Erik Jensen on Jul 04, 2005 10:22 PM

Your comment:

 (will show your gravatar)
 
Please add 5 and 6 and type the answer here: