How buggy is the C# programming language and VisualStudio IDE?

Having just finished what was, for me, a big programming project using a system that was frustratingly buggy, I want to use something of better quality. A couple years ago when I dug into C# and VisualStudio, much of the experience was nice. Often I would find myself thinking, “What a clever idea!”, and often I felt like the language was steering me in an elegant direction. I also liked what I read about the .NET framework and managed code, both for security and robustness. But I didn’t do anything big with it, because I didn’t have any big projects on the table at the moment.

My one frustration with it was that, on one of the little projects I did, the Windows forms started reverting to their default names (Button1, Button2 et cetera) after I had renamed them, which kept breaking the code. I actually wound up staying with the default names and holding meaningful names in a translation table I had to constantly consult. This bug, which is obviously a viciously ugly one, only appeared in one little project, and only after a couple weeks of work. The other projects were fine. I did post queries in Microsoft and nonMicrosoft discussion forums and found there were similar bugs a couple of versions back, but never got any traction to work this one out.

So, it looks somewhat attractive to me to try C# for my next big project, if it is in other ways a reasonable environment. I’m really asking about the bugginess aspect here, not the many other considerations in choosing tools.

Thanks!!

I’m currently doing a rather large project in c# and have not seen any of the issues you mentioned.

I used to be a huge fan of Borland and their IDE. I am now a C# convert! I recommend it.

The language itself is airtight, but I’ve seen some similar issues with the form designer. I was trying to work on a set of forms with another developer, and every time one of us opened a form saved by the other, it would move all the controls around (and not just graphically–the files specifying the control position would change). We never figured out what the issue was.

Ultrafilter, do I understand right that by “form designer” is meant the graphical design pane part of VisualStudio? Or do you think there was something wrong with the forms part of .NET?

Or does my question indicate some bigger misunderstanding of how the parts fit together?

Basically, Visual Studio is the best IDE out there. Ok, ok, perhaps I’m biased (having used it for years), but I do a fair bit of development in other IDEs (especially Xcode), and VS is just miles ahead of the rest.

As for C#, I’m fairly new to it, but one thing I’ll note is that IntelliSense (basically autocompletion and related functions) works great – in Visual C++, for whatever reason, autocomplete seems far less…intelligent? fill-inney? Something. But, basically, I was initially turned off at the verbosity (at least compared to c++) of c# at first, but found that the AutoComplete functions of VS vastly sped up how quickly I could Get Things Done.

In terms of bugginess – I’ve not heard about anything critical, but again, I’m no C# expert; when renaming components in the Forms Designer, I tend to check the code tied to the control to make sure its still kosher, and VS seems to be very good at instantly renaming the required parts.

So, in a nutshell: I give both the language and the IDE in question a thumbs-up; I’m sure a professional nitpicker will be along to point out the flaws eventually :wink:

C++ is a ridiculously hard language to parse. Only Perl is worse AFAIK, at least among mainstream languages. This makes it extremely difficult to write intelligent tools to work with the language. One of the really underrated aspects of languages like C# and Java is that it is extremely easy to write intelligent, programmer-productivity enhancing tools.

There are plusses and minuses for every language & environment. MS is essentially deprecating C++ in their dev tools. If you want the latest tools, you have to be using C#.

In the first incarnation I found many bugs in the C# implementation. It’s gotten better since then (though I find the “using” declaration block to be a terrible language kludge).

Do you mean the language C# has bugs? Or the dev environment? Which version of the dev tools are you using?

IME (Java,perl,C# developer) visual studio is a decent IDE, but I’ve never experienced the bugs you described. It however has many gotchas that aren’t very well documented and its pretty tricky to do very complex multi-stage builds/deployments with it. The only IDEs that I’ve seen that are even okay at that task however, are ones that have a more powerful deployment engine like ant or make running somewhere in the background.

As far as C# goes as a language, I only have 2 real pet peeves. The first is the defaulting of non-virtual methods, this pisses me off since developers have to specify what is possible to override (and they are lazy and don’t do even when they really really should). The second is that there is no exception declaration/checking on method signatures, it would be really really nice if this existed since it would be nice to know what exceptions might be thrown from a method a lot easier.

Its not even much of a kludge since its just syntactic sugar. There’s a lot of those in C#( foreach and lock come to mind).

Just out of curiosity, what did you mean by this statement? Perl, C#, C++ are all defined by context free grammars meaning they are equally “easy” to parse.

I’ve been doing pretty much exclusively C# for about 5-6 years now, and have been using Visual Studio since, ummm… well, before it was Visual Studio.

I haven’t seen any of the issues people describe in this thread. The only really annoying bug I’ve seen is in VS 2005, renaming a control via the “properties” page doesn’t always work. But it does give you a warning about it.

I’ve done multi-coder pretty large projects with it, and the only shortfalls it has is that the build/deploy system isn’t great, but there’s workarounds for it.

I wouldn’t hesitate to do a project of any size with it.

neither of those languages are context free.

What’s kludgy about that? It’s a nice structured way of making sure objects are disposed of. It’s the same as doing a try/catch/ finally and doing dispose within the finally. This will call x.Dispose() even if an exception is thrown in the block.

using (var x = new MyClass())
{
// do something
}

Or do you mean the other using? i.e, using at the top of a file to import a namespace? That’s utterly different but I don’t see a problem with that either. I think it’s basically just a shorthand so you don’t need to type the full name of everything.

No, I meant that using. The problems with it:

[ul]
[li]For a language that had no problem adding lots of keywords, they should have used a different word.[/li][li]Adding a scope means an additional indent. They should have simply made the dispose happen at the end of current scope[/li][li]You can only declare one type of var in a using, so if you have more than one type of var that you need, you get lots of nested using statements.[/li][li]Nothing prevents you from creating an alias to the auto-disposed var, so if you do assign an outer scope var to your auto-disposed var, you can double-dispose.[/li][/ul]

Perl is not defined by a CFG. You need a Turing Machine to parse Perl. C++ is context-free, but the language is inherently ambiguous(it inherited this defect from C). This makes it much more difficult to parse than languages like Java or C#, which are LL(1) languages and can easily be parsed in linear time using either a LL(1) or LR(1) parser.

I think it was in the graphical design tool, but since we never figured it out, I can’t be sure.

I just ran into a bug today: I upgraded a third-party set of controls and they disappeared from my toolbox. I can’t get them to show up. I’ve uninstalled all previous versions and the current one, then reinstalled the new version.

I have finally uninstalled VS and am now trying all of it again. :mad:

Missed the edit window: Added:

(This didn’t work BTW. However, this could as well be a bug in their tools and not in VS)

VS2008 is a good program, but I’d be lying if I said it wasn’t occasionally buggy. Things seem to get worse when you start introducing dependencies to third party libraries, which sometimes results in strange “it works on the first several builds and then stops until you remove and re-add it” kind of bugs.

There’s also nuisance issues: winform controls can’t be abstract, some of the auto-generated code around webservices will generate build warnings, and sometimes things don’t work until you “rebuild all” a few times and maybe go delete the /obj and /bin directories. Most of the problems I’ve run into are in this category: annoying but usually not a show stopper.

Overall it is very good, and I don’t think I’ve ever had it outright crash-to-desktop on me, even when debugging unsafe interop code…

I stand corrected on perl (I wasn’t using my thinking brain).

All IDEs have some bugs, and all have interesting quirks. For my money, Visual Studio is as powerful and easy to use as any, but way too expensive. For absolutely free, you can get many comparable IDEs. I can’t remember the last time I used one that didn’t have code completion. (Although, I always thought KDevelop’s sucked.)

As far as languages go, I believe they corrected most of the bugs in C# by 2.0. (We ran into a problem with building a web app on 1.0. It took MS a while to come back to us and say, oops, that doesn’t actually work. You’ll have to wait. There was also a problem with one of the number types. It was fast, but not accurate.)

I dunno, this kinda makes sense to me. Making a part of a class’s interface overridable has many potential implications and so perhaps should be a conscious design choice. But maybe that’s just many years of getting hit around the head with the C++ stick talking. I can see how it would be annoying if you’re used to Java.

True; in a language like C# which is basically a “shiny new feature dumpster,” you’d think something like this would show up. It never really bothered me, though, as I’m a long-time user of C++, which technically has exception specifications, but nobody in their right mind uses them. :smiley:

I’ve managed to crash Visual Studio several times, though to be fair it was never while using Visual C#. The last one was a bug in the C++ compiler affecting partial template specialization. Some particular arrangement of perfectly valid template code (I forget exactly what) would cause it to go down in flames every time.