visual studio

FYI: Edit&Continue was fixed in VS 2010 SP1

I was lucky enough to catch the near-footnote mention when I read the Visual Studio 2010 Service Pack 1 patch notes last year, but I’ve noticed quite a few programmers missed it – perhaps still being grief stricken at the loss of one of the greatest feature of Visual Studio ever in un-patched 2010.

Remember to turn on Incremental Linking. (See also: Linker Options that Disable Edit and Continue)

If you find it flaky, try turning on the C/C++ and Linker hotpatch options.

Caveat: It’s not supported for 64 bit.


VS 2012: The one I probably won’t own

A long time ago, in a Grimsby far, far away, a young kid saves up enough money to buy a C compiler for his Atari ST. So the transition to Microsoft C was pretty natural for me. I’ve owned personal copies of each version of MSVC since C/C++ 7 in 1992, I still have my boxed VC6.

Based on my experience with the VS 2012 developer preview, beta and release candidate … Microsoft have killed everything in VS that made me choose to fire it up over Code::Blocks or KDE or VIM.

Visual Studio 2011: Woot!

The developer preview for VS2011 had me a little bummed out in terms of C++11 support. But I just read the Visual Studio 2011 BETA readme, and I have to give props to the team for getting a really good chunk of C++11 support in there:


Visual Studio 11 includes support in the box for the following languages: C#, Visual Basic, F#, C++ and JavaScript. The Microsoft implementation of JavaScript in Visual Studio 11 is compliant with the ECMAScript 5th Edition language specification. The C++ support in Visual Studio 11 includes the full C++ 11 standard library as well as new language features: stateless lambdas, SCARY iterators, range-based for loops, and scoped enumerations support. Visual C++ 11 also adds seamless access to Windows Runtime components through C++/CX as well as C++ Accelerated Massive Parallelism (C++ AMP), which enables hardware acceleration for the execution of your data parallel C++ code.

VS2011: Bummer

Apart from reading some hype about 2011 focusing on C++, I don’t really see much to be excited about in VS2011 so far. We’re running the game on Ubuntu now, and we’ve migrated development to 11.10, which means GCC 4.6. Even Intel’s C++ compiler has had excellent C++0x/C++11 support for over a year.

VS2011 is lagging horribly behind in C++11 support.

I’m fairly fond of some of the C++11 changes, in particular “enum class”, the use of (if not the name of) “auto” and “range based for”.

I’ll be very pleased when we can use the virtual function decorators, but really, I think code that has

class A {
virtual void foo() ;

class B {
void foo() ;

should be a compile error. From memory, this is allowed because of multiple-inheritance. If that’s true, fail, that is going to be a bug down the line so the language and compiler should reject it up front.

I’m still seething that C++11 is not going to give us discrete abstract-virtual classes. REMEMBER: Do NOT use the “i” word, it causes the C++ standards people to froth at the mouth or masturbate, I forget which.

It’s true, you can kinda implement interfaces in C++ already

class IWannaBeAnInterface {
void halt() = 0;
void catchFire() = 0;

Ooops, I forgot to make them public. Now, should I switch it to a struct or add an extra line?

// Since the point is not to have members, a struct feels weird.
struct IWannaBeAnInterface {
void halt() = 0;
void catchFire() = 0;

// Ok, a class feels more accurate, but remember to make stuff public.
class IWannaBeAnInterface {
void halt() = 0 ;
void catchFire() = 0 ;
} ;

// But I can also totally screw up by doing this:
class IWannaBeAnInterface {
void halt() = 0 ;
void catchFire() = 0 ;
} ;

On the one hand, C++ has the most awesome template meta-programming system. On the other, it has a bunch of not-invented-here retards on the standards committee who won’t accept “interfaces” because Java did them.

Interfaces – pure virtual abstract classes – have countless reasons to exist: clarity of code (“this is an interface, not a struct or a class”), compiler code validation (“you can’t have private members of an interface”), virtual avoidance (“I want to describe an interface to this class hierarchy without having to expose all of the #includes, and without having to do a vtable lookup”), etc.

Well, those aren’t in the C++11 standard, so I can’t fault VS2011 for not including them, but I’m gonna skip 2011 because (a) it’s already 2021, (b) it doesn’t support near enough of C++11.

Visual Studio: I’ll give you help.

It’s the one part of Visual Studio that does me in, because while it’s doing whatever it does, your Visual Studio is rendered inoperable. This time it only took 6 and a half minutes.

Serves me right for installing locally rather than just using online help.

Threading Building Blocks intro

I put together a short video walkthru creating a skeleton Visual Studio 2008 project with Intel’s Threading Building Blocks that introduces the basics of using Threading Building Blocks and compares performance of serial and parallel sort.

Visual Studio 2010 is here

Sadly – it seems there is no edition for Software Engineers – the feature set (and pricing) leaps from”can build windows apps” to “jack of all trades” with database, web, unit testing, etc. They should have moved the profiling/debugging/metrics from Premium to Professional with MSDN.

‘Collapse All’ in Visual Studio

We have tons of sub-folders in our main client project, and every time you access a file in a sub-folder Visual Studio expands the sub-folder, and given how many files we have in these sub-folders, the scroll bar quickly becomes a tiny dot.

Once their open, there’s no easy way to collapse them all except to go through by hand and manually collapse each one again.

The Visual Studio team gave me the following reply to my suggestion for a “Collapse All”  feature:

Posted by Microsoft on 3/29/2010 at 2:10 PM
Thanks for your feedback. This is a good suggestion and one that we unfortunately cannot incorporate in VS2010. However, here is a macro that should help in the meanwhile:

    Sub UIHierarchy_CollapseTree()
        Dim Hierarchy As UIHierarchy

        'Change Hierarchy to the following line to collapse the active window
        'Hierarchy = DTE.ActiveWindow.Object
        Hierarchy = DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Object

    End Sub
    Sub CollapseHierarchyItems(ByVal HierarchyItems As UIHierarchyItems)
        Dim SubHierarchyItem As UIHierarchyItem
        For Each SubHierarchyItem In HierarchyItems
            SubHierarchyItem.UIHierarchyItems.Expanded = False
    End Sub

OpenMP joy from Visual Studio :)

An update from my earlier post, I got a reply to my OpenMP 3.0 ticket, for those of you who don’t have a Windows Live account:

Hopefully that means it’ll be in VS 2010 by release time. Superb.

<3 Visual Studio, yet again :)

OpenMP dissapointment from Visual Studio

I was going to post my little OpenMP self-tuition examples, but in the process of cleaning them up for public consumption, I discovered that Visual Studio 2010 doesn’t support OpenMP 3.0. Since about half of my examples focus on the use of the task directive for recursion and descent, it’s kinda pointless =/