views:

117

answers:

1

I just started using C++ VS2008, and downloaded an archive of samples from MSDN. The file is vc_samples.exe - sorry, don't have a link right now.

My problem is, most of these examples would not compile. The Start Debugging button (green arrow) was disabled, with no explanation whatsoever from the IDE.

More by luck than skill, I stumbled into the Configuration Manager dialog (under the Build menu) and noticed that all the sample projects that won't build had Active Solution Platform set to Itanium. When I changed this to Win32, I could build the projects.

My question - can I change a default setting in VS somewhere so Active Solution Platform will always be Win32?

Went through all the options, looked at VS help, Googled, and still came up blank, so would appreciate any suggestions.

Thanks,

-Tom Bushell

+1  A: 

I have looked everywhere to see if I can find an answer to this and I don't think it can be done (which seems odd, really). I've tried reordering the entries in the solution (sln) file but as far as I can tell it works like this:

1) If you have a solution options file (suo) it will use the last selected configuration.

2) If there is no suo file it will use Debug as a default configuration, if the Debug configuration exists.

3) Otherwise it will sort your configurations alphanumerically and use the first one.

So you can probably trick VS into using a different one if you are so inclined. Just rename the debug configuration to something like "Debug All" and prepend your preferred configuration with an underscore or other punctuation mark. e.g. "_Release All"

I only have Win32 set up for platforms so I can't test for those settings but it might work the same way.

Dana Robinson