MsvcConf Get MsvcConf at SourceForge.net. Fast, secure and Free Open Source software downloads

MsvcConf is an external dependency tracker for Microsoft Visual Studio, and is designed to automatically update the include and library paths for one or more Visual C++ projects.

Using a simple XML format configuration file you can specify the header and library files required by one or more projects in a Visual Studio solution, and MsvcConf will update the project paths to point to the locations of those headers at build time, within Visual Studio.

If parts of the project are optional, pre-processor definitions can be added to the project's pre-processor settings to indicate if the relevant headers and/or libraries exist on the build machine.

Downloading MsvcConf

MsvcConf is available from the SourceForge project page, https://sourceforge.net/projects/msvcconf/files.

MsvcConf is distributed in source code form only. It is simple to build, at only a single .cpp file, and comes with Visual C++ project files for the 2003, 2005, and 2008 versions of Visual Studio.

Installing MsvcConf

  1. Create a new directory, e.g. C:\msvcconf. The actual directory name is unimportant.

  2. Unzip the downloaded file into the new directory.

  3. Open the correct project file with the correct version of Visual C++. msvcconf_vc71.vcproj is for VS2003, msvcconf_vc8.vcproj is for VS2005, msvcconf_vc9.vcproj is for VS2008.

  4. Build the 'Win32|Release' configuration.

The output from the build will be in the subdirectory 'Win32\Release', called msvcconf_vcX.exe, where X is the version of Visual C++ it is built to work with.

Configuring Visual Studio to use MsvcConf

The simplest way of configuring Visual Studio to use MsvcConf is to add it to the standard directories for Visual C++ projects:

Picture of Visual Studio C++ Directories options page    
  1. Start Visual Studio, but do not open a project.

  2. On the 'Tools' menu, select 'Options...'

  3. In the left tree view, expand the 'Projects and Solutions' item, and select the 'VC++ Directories' item.

  4. On the right hand side, ensure the 'Platform' combo box has 'Win32' selected, and the 'Show directories for' combo box has 'Executable files' selected.

  5. In the lower list, add a new entry, and add the path to the directory containing the msvcconf executable built in the Installing instructions above.

You can repeat steps 4 and 5 for other platforms, e.g. x64, but always use the Win32\Release version of MsvcConf.

Adding MsvcConf support to a Visual C++ project

Adding MsvcConf support to one or more C++ projects in a Visual Studio solution is as simple as adding a custom pre-build event to each project and a configuration file for the solution describing what dependencies to track:

Picture of Visual C++ Project options page    
  1. Open the project property pages, either via the 'View' menu, or by right-clicking the project in the Solution Explorer window, and selecting 'Property Pages'.

  2. Ensure the 'Configuration' combo box has 'All Configurations' selected, and the 'Platform' combo box has 'All Platforms' selected.

  3. In the left tree view, expand the 'Configuration Properties' item.

  4. Expand the 'Build Events' item, and select the 'Pre-Build Event' item.

  5. In the right pane, edit the 'Command Line' entry, adding:

    msvcconf_vcX.exe "$(SolutionPath)" $(ProjectName)

    where X is the version of the Visual C++ project, e.g. 8 for 2005, 9 for 2008.

  6. In the Description entry, add:

    Configuring project settings...

  7. Ensure the 'Excluded From Build' entry remains empty.

  8. Click 'OK' to save your changes and close the dialog.

If you rebuild your project or solution now, you will see something similar to this in the build output window:

------ Rebuild All started: Project: Example, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'Example', configuration 'Debug|Win32'
Configuring project settings...
MsvcConf : warning: No msvcconf.xml found in project or solution directory
Compiling...
Main.cpp

As can be seen from the output, MsvcConf is warning that it cannot find a file named msvcconf.xml in the project or solution directory. This page detailing the msvcconf.xml configuration file explains how to do this.

Any error messages about missing msvcconf_vcX.exe indicate that you have not configured Visual Studio correctly. Check that you have followed the installation instructions correctly.

License

MsvcConf is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MsvcConf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with MsvcConf. If not, see http://www.gnu.org/licenses.

Note:

This license applies to the source code and redistributable components of MsvcConf. You may of course use the MsvcConf executable to configure any other Visual Studio project without any license restriction.

MsvcConf Get MsvcConf at SourceForge.net. Fast, secure and Free Open Source software downloads
Microsoft is a U.S. registered trademark of Microsoft Corporation.
Visual Studio is a registered trademark of Microsoft Corporation in the U.S. and/or other countries.
Version: 1.0
Last modified: 18 May 2010, Rick Taylor