Wednesday, September 24, 2008

Unresolved Externals when using POOM in VC++

I found several postings when searching for a solution to compiling a POOM app that errors out with Unresolved External Symbol CLSID_Application and IID_IPOutlookApp. Only one of the solutions I found worked for me using Visual Studio 2008 C++:

The trick is to use:

#include "initguid.h"
#include "pimstore.h"

at the begining of the .cpp file. The initguid.h is the item that fixes the problem.

Saturday, September 6, 2008

Incrementing FileVersion for VC++

In a recent posting, I talked about solutions to incrementing the FileVersion in Visual Studio .NET for VB.NET and C# project. This need was motivated by the changes in VS2008 that requires a FileVersion to be changed before the Windows Installer will replace a file.

Some of my projects have Native DLLs that are compiled in VS 2008's VC++ compiler. These files has the same problem with the installer, yet the previous solution ( did not address.

I found this very handy Add-In that works well with VS2008 (and previous versions) that will increment the FileVersion (Product Version, etc.) in the VC++ projects resource file.

Friday, September 5, 2008

Visual Studio 2008 Setup Project always requiring .NET Framework 3.5 even when 2.0 is Targeted

I am slowly upgrading my projects from VS2005 to VS2008. I had a puzzling problem with the Setup Projects always requiring the .NET Framework 3.5 even when the Setup Project is targeted to 2.0 and the application it is delivering is using .NET Framework 2.0.

There are several posting on the the internet about solving this problem. It basically requires you to go to View/Editor/Launch Condition and change the .NET Framework to the version you desire. The Project properties for your setup project are a bit misleading when they have no affect on this problem.

Read these posting for more detailed explanations:

Thursday, September 4, 2008

Auto-Incrementing the File Version in Visual Studio 2005 and 2008

*** Update - Since I made this post, I have found another tool that is simpler to use and also work with VS2010. See this

If this doesn't work for you, then you may with to view the info below:

The Setup and Deployment (Windows Installer) has a significant change between VS2005 and VS2008. In VS2008, a file will not be updated by the installer if the File Version has not changed. This pretty much breaks all of the VS2005 Installations I have created. There are various reasons for this, and I will let you read for yourself:

The solution to the problem is to increment the File Version (under Project Properties/Assembly Information) between Setup (.msi) builds. So, before every setup you create, you have to go manually update the File Version so the setup will update the file. Before, you just had to update the Version property in the Installer Project (and let it update the Product Code); you still have to do this (which is probably acceptable). I thought there must be someway to automatically increment the File Version since this change to the Installer breaks all of my setups; however, there is not (that I can find anyway). The only workable solution I have found is to use a BuildTask that updates the AssemblyInfo.vb (or AssemblyInfo.cs) before each build is made. This solution is a really complicated for something that was a checkbox in VB6 (as someone pointed out).

Here is the solution I tried and it does work:

Here is a similar solution:

Wednesday, September 3, 2008

Launch Internet Explorer or Default Browser from VB.NET (or C#)

I found several ways to launch IE from VB.NET, but the following approach appears to be the simplest:

Process.Start("IExplore.exe", "")

More information at:

If you want to launch the default browser (such as Firefox), it may be easiest to just say the following:


and let the Shell do the work of deciding th default browser.

For more info on this approach:

The C# approach is not any different, just use the approprate syntax.