You are currently offline, waiting for your internet to reconnect

FIX: AddConfiguration Method Fails for Makefile Projects

This article was previously published under Q216851
This article has been archived. It is offered "as is" and will no longer be updated.
The AddConfiguration automation method fails with the following error when called from a Developer Studio macro and the active project is a makefile project:
The configuration could not be added to the project.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
The AddConfiguration also fails when called from a Visual Basic or Visual C++ addin. The returning HRESULT is 0xcccccccc when AddConfiguration succeeds (when a non-makefile project is active) or fails (makefile project is active).

Steps to Reproduce the Behavior

  1. Create and load the following Developer Studio macro:
    Sub AddConfig()   ActiveProject.AddConfiguration "New Configuration"End Sub
  2. Create a Makefile project in a new workspace.
  3. Run the macro "AddConfig".

Article ID: 216851 - Last Review: 02/21/2014 00:33:41 - Revision: 2.0

Microsoft Visual C++ 6.0 Enterprise Edition, Microsoft Visual C++ 6.0 Professional Edition, Microsoft Visual C++, 32-bit Learning Edition 6.0, Microsoft Visual Basic 6.0 Professional Edition, Microsoft Visual Basic Enterprise Edition for Windows 6.0

  • kbnosurvey kbarchive kbautomation kbbug kbcustomwizard kbfix kbide kbscript kbvcobj kbvs600sp3fix KB216851