PRB: Custom AppWizards Can't Make Per-File Settings/Build Steps

Last reviewed: February 20, 1998
Article ID: Q181503
The information in this article applies to:
  • The AppWizard included with:

        - Microsoft Visual C++, 32-bit Editions, versions 5.0, 5.0sp1,
          5.0sp2, 5.0sp3
    

SYMPTOMS

Custom AppWizards can not make per-file settings or per-file custom build steps on the projects they generate, such as modifying the compiler settings for one .cpp in a project or adding a custom build step to run MIDL on a project's IDL file.

STATUS

This behavior is by design.

MORE INFORMATION

As of Visual C++ 5.0, an automation object model exists that allows COM clients to automate and control the Developer Studio shell. Custom AppWizards now have an extra override in their CCustomAppWiz-derived class, CustomizeProject, which gives the custom AppWizard access to the project settings for the project it is generating. Using IConfiguration interfaces from CustomizeProject's IBuildProject interface, the custom AppWizard can call AddToolSettings, RemoveToolSettings, and AddCustomBuildStep to change various project settings.

Unfortunately, AddToolSettings, RemoveToolSettings, and AddCustomBuildStep operate on the entire project only; they cannot make tool settings or create custom build steps for a single file. The current Developer Studio object model does not support this. Custom build steps for single files must be added by hand after the custom AppWizard generates the projects. Settings made with AddToolSettings and RemoveToolSettings are applied to all files in the project for the specified tool. Custom Build steps added with AddCustomBuildStep run at the end of the build process only and cannot be used to generate dependent files.

For more information about using CustomizeProject to change the settings of a generated project, refer to the Developer Studio documentation on the Developer Studio Object Model. For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q173483
   TITLE     : HOWTO: Create Custom AppWizards that Generate Non-MFC
               Projects

REFERENCES

DevStudio Object Model documentation: "Object Model, Developer Studio."

Visual C++ 5.0 AppWizard Programming Reference: "Customizing the Generated Custom AppWizard Project."


Additional query words: kbdsstools
Keywords : VSDSAuto VwbIss WizardIss
Version : WINNT:5.0,5.0sp1,5.0sp2,5.0sp3
Platform : winnt
Issue type : kbprb
Solution Type : kbpending


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 20, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.