Archive for the ‘Visual Studio’ Category

Installing Visual Studio 2008

Thursday, December 6th, 2007

I have finished now, but I have to say there was something creepy about the two male photos used. One looked too happy and the other too smooth.  What made it worse was that it kept changing and my attention would be pulled to smug guy or happy guy.

Visual Studio 2008 - Happy Guy Visual Studio 2008 - Smooth Guy

I’m not looking forward to having to do a repair, luckily I did a full install, so there are no extra features that I will have to install later……

Visual Studio: Multiple startup projects

Friday, October 5th, 2007

I have just been blessed with knowledge from 11 times MVP Chris Crowe. I was down in IS Land, complaining about how Visual Studio became unstable when debugging many instances of the same solution. And Chris drops the bombshell that you can launch and debug from the same instance.

Low and behold it’s true, and now I’m even considering moving more projects into the same solution, just to simplify the debug launch process…

So the steps are:

  1. right-click on your Solution in the Solution Explorer
  2. click of Properties
    Steps 1 - 2
  3. select Startup Project
  4. select Multiple startup projects:
  5. change the Action from None to Start or Start without debugging
  6. use the Arrow to change the order of the projects starting up
    Steps 3 - 6
  7. press F5 to run them all…

For more information here is the MSDN link

Visual Studio 2005 can do directory based search

Wednesday, August 22nd, 2007

One of the features I thought was lost in Visual Studio 2005, directory/file based searches, is not!

When you bring up Files In Files (Ctrl+Shift+F, Edit.FindinFiles) you can type in the path straight

Find_In_Files

Or you can click on the Epsilon button at the side and select many directories.

Folder_Choosing

Look you can even have named sets.

I take back all those bad word I said about you Microsoft. Well maybe I leave some the table, because it has taken me so long to re-find one of my favorite features.

Visual Studio 2008 Beta 2 is out…

Friday, July 27th, 2007

From Darryl I learnt Visual Studio 2008 Beta 2 is out. Damn it, I had only just gotten Beta 1 installed and working how I liked in my VPC at work.

Well I’m excited really about the new version, but more annoyed at all the system updates that wasted so much time this week, when all I want to do was experiment with Silverlight.

Now I’ve just got to not restart my dev machine over the next ~7 hours while it comes down.

I was wondering about Silverlight, but reading Soma’s details Silverlight 1.0 RC is due any day now also. Woot!

Visual Studio keyboard mappings lost.

Sunday, May 6th, 2007

After installing DirectX SDK (April 2007) I have lost my keyboard mappings in Visual Studio. Del and Delete, Arrows Enter all don’t work.

I have done a repair on Visual Studio (only took an hour) and that didn’t fix it.

So it now looks like I get uninstall the DirectX SDK (knew I should stick to OpenGL), and uninstall/install Visual Studio again.

Failing that it might be repave time. And here I was just wanting todo some work….

Update: ARRRRRGGGGGG, Uninstalled DirectX SDK (April 2007 and December 2005) didn’t work!

Uninstalled Visual Studio 2005, and reinstalled, still doesn’t work! In fact it’s like it didn’t actually uninstall.

I’m SOOO grumpy at this point.

Update 2: Nothing like, having nothing to lose to help solve the problem. I went and deleted the following directories

  • C:\Documents and Settings\<user name>\Application Data\Microsoft\VisualStudio\8.0
  • C:\Documents and Settings\<user name>\Application Data\Microsoft\VisualStudio\recent
  • C:\Documents and Settings\Parents\Local Settings\Application Data\Microsoft\VisualStudio\8.0

Plus the .suo and .ncb of my project and it now working correctly again.

THANK GOODNESS!

Visual Studio: Code Definition Window

Friday, April 13th, 2007

In the process of trying to do a Format Selection (Ctrl+E, F) I butter fingered the Code Definition Window (Ctrl+W, D) open. Now this is a really cool window (for C++ and C#) that shows the definition code of the current item under the cursor. So in C++ clicking on

FLAT_DESIGN_INCREMENT_1

I get the display below, very cool!

Visual Studio Code Definition Window

Visual Studio 2005

Friday, March 23rd, 2007

First the good. My current C++ projects were updated from VS6.0 so the project files are quite messy. One project file was 250KB large. One of the feature I like about VS2K5 is unloading the project (right click on the project in the Solution Explorer). Then right click it again and choose Edit project. Ta-da, you can edit the raw XML of the project. Now in my projects I had for each file, extras that were always blank.

<File
RelativePath=ActDt.cpp
>
<
FileConfiguration
Name=Debug|Win32
> <
Tool
Name=VCCLCompilerTool
AdditionalIncludeDirectories=“”
PreprocessorDefinitions=“”
/>
</
FileConfiguration
>
<
FileConfiguration
Name=Release|Win32
>
<
Tool
Name=VCCLCompilerTool
AdditionalIncludeDirectories=“”
PreprocessorDefinitions=“”
/>
</
FileConfiguration
>
</
File>The Italics parts are just filler, as they are not add any new options. So using the fancy Search-and-Replace (Ctrl-H) and this handy visual studio regex ^:b+\<FileConfiguration\n(.*\n)(.*\n)(.*\n)(.*\n)(.*\n)(.*\n)(.*\n):b+\</FileConfiguration\>\n to can find all the blocks, and replace with empty. But you don’t actually want to use the above regex, as it will match lines that with seven inner lines but things like

UsePrecompiledHeader=1

which you don’t want to lose. So I changed it to

^:b+\<FileConfiguration\n(.*\n)(.*\n)(.*\n)(.*\n)(:b+.*=”"\n)(:b+PreprocessorDefinitions=”"\n)(.*\n):b+\</FileConfiguration\>\n

So now we know only blank entries will be removed, we can charge ahead and press the Replace All button. Oh the rush, did it work? Anyway after the trimming the large project is only 35KB now. The above file block only has two build targets, but the large project had seven, thus every file had seven FileConfiguration blocks.

After editing, close the project file, then right click to Reload it.

Now the other part of this post is for me to rage that devenv.exe (Visual Studio) keep using 100% of one of my CPU’s when editing/debugging more than one solution at once. Which is really annoying as I have 4-5 programs in our product, and I want to debugging then concurrently. It seems that if I start a new copy of VS while another is debugging it’s lost to the weeds until I reboot.

It gets tiring having the debugging going to a crawl. The whinge is now out of my system now, thank you.

Visual Studio 2005, C++ and Time

Friday, February 9th, 2007

Microsoft wisely updated time_t and the ATL CTime and CTimeSpan to use a int64 under the hood (from a int32), this is good except when we have those data types in our interfaces, and now we have broken backwards compatibility.

time_t has a a define you can use force time_t to stay a int32 _USE_32BIT_TIME_T. Unfortunately CTime/CTimeSpan do not respect this. One of our DCOM components packs arrays of objects into a stream. To make the game more fun one object element was a CTime and another was a variable length string. The fun began when another teams Delphi tool unpacked these streams and went off into the weeds because the packed objects were different lengths, thus the variable length string’s length was in a different place. Lots of fun debugging that one.

Anyway, the current solution was to change the object’s to use int32’s instead of CTime/CTimeSpan, and downcast the int64 result from .GetTime() and .GetTimeSpan() to a int32. Now our interface is restored. Ok so we are not future proof, and that app will start to behave fun some time in the future, but this just adds to the code paths that need retiring. Oh the joys of large old systems.

Visual Studio 2005

Wednesday, November 23rd, 2005

Well after attending Connect Technical Session, I duly collected my Visual Studio 2005 (and other stuff).

Tonight I installed VS2005 and I have to say it went without a hitch. It told me I had the RTM of Visual Studio 2005 installed, and showed me a URL with instruction to uninstall it. I ran the uninstall program, and it just worked. 50 minutes after that I have VS2005 and MSDN installed.

Thoughts after playing in my Curse of the Azure Bonds project, seems faster. Not actually sure of timing, but pause while it parsed the error list (for all 1500 errors) feels shorter.

Thoughts from my first Microsoft event…

It was cool. I was surprised by the number of attendees. While Craig and I were talking at the end, the key note speaker Jonathan Tom came up and talked to us. We had been talking about the new features, and how it will be hard to get them adopted because most of our work is on going evolution of our core product. Craig was also interested in the push of BI, Jonathan been a Senior Product Manger SQL Server Marketing was happy to talk about these things. It was cool that he chatted with us, so I tried asking a tricky question about the role of BI as leverage to sell/upgrade people verse extending the power to users. Been the marking guy he was he had a solid and respectful answer to both natures of the question.

The best session for me was Darryl’s Smart Client talk. While I’d seen the parts demoed before, it was nice to see him whip it all together. He also had good stage presence, and tried to redeem his name after the Wayne’s slander in the Team System talk. (Note for Darryl: remember to look into my issues with the Connections Site)

Other than the PA system bang, and Jonathan failing off the stage, it all went well.