Instructions for using Visual C++ 2005 Express Beta 2 with the Platform SDK

This is an article that's going to be updated on the Visual C++ Express page next week. Please send any questions or comments around this article to me at brianjo@microsoft.com. Many thanks to Tarek Madkour, Don Brinn, and the VC team for helping out with this.  

Using Visual C++ 2005 Express Beta 2 with the Microsoft Platform SDK

You can use Visual C++ 2005 Express to build powerful .NET Framework applications immediately after installation. In order to use Visual C++ Express to build Win32 applications, you'll need to take just a few more steps. In this article, I'll list the steps necessary for building Win32 applications using Visual C++ Express.

Step 1. Install Visual C++ 2005 Express.

If you haven't done so, install Visual C++ 2005 Express by following the instructions here.

Step 2. Install the Microsoft Platform SDK.

You can install the Platform SDK over the Web from the Platform SDK page on the Download Center. On that page follow the instructions and install the SDK for the x86 platform.

Step 3. Update the the Visual C++ Directories in the Projects and Solutions section in the Options dialog box.

In that section, you'll want to add the paths to the appropriate subsection. If you installed the SDK to an alternate path, make sure to change these to match.

  • Executable files - C:\Program Files\Microsoft SDK\Bin
  • Include files - C:\Program Files\Microsoft SDK\include
  • Library files - C:\Program Files\Microsoft SDK\lib

Note:   For Beta 2, you cannot set the Visual C++ Directories in the Options dialog of Visual C++ Express Edition. To work around this issue, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the \vc\vcpackages subdirectory of the Visual C++ Express Edition install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%\Local Settings\Application Data\Microsoft\VCExpress\8.0" if it exists before restarting Visual C++ Express Edition.

Step 4. Update the corewin_express.vsprops file.

You just need to take one more step to make the Win32 template work in express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and change the string that reads:

AdditionalDependencies="kernel32.lib"

to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Step 5. Generate and build a Win32 application to test your paths.

In Beta 2, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder “%ProgramFiles%\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\".

In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:

 // WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;

Save and close the file and open Visual C++ Express.

From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Console Application template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.

As a final step, you should test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.