Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 779723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:58:15+00:00 2026-05-14T19:58:15+00:00

I’m trying some VS2005 IDE macros to modify a large amount of projects (~80)

  • 0

I’m trying some VS2005 IDE macros to modify a large amount of projects (~80) within a solution. Some of the properties I wish to set do expose a programmatic interface to ‘default’, but many others do not. Is there a generic way to set such properties to their default? (eventually meaning erasing them from the .vcproj file)

Simplified example, setting some random properties:

   Sub SetSomeProps()
    Dim prj As VCProject
    Dim cfg As VCConfiguration
    Dim toolCompiler As VCCLCompilerTool
    Dim toolLinker As VCLinkerTool
    Dim EnvPrj As EnvDTE.Project

    For Each EnvPrj In DTE.Solution.Projects
        prj = EnvPrj.Object
        cfg = prj.Configurations.Item(1)


        toolLinker = cfg.Tools("VCLinkerTool")

        If toolLinker IsNot Nothing Then
            ' Some tool props that expose a *default* interface'
            toolLinker.EnableCOMDATFolding = optFoldingType.optFoldingDefault
            toolLinker.OptimizeReferences = optRefType.optReferencesDefault
            toolLinker.OptimizeForWindows98 = optWin98Type.optWin98Default
        End If

        toolCompiler = cfg.Tools("VCCLCompilerTool")

        If toolCompiler IsNot Nothing Then
            ' How to set it to default?  (*erase* the property from the .vcproj)'
            toolCompiler.CallingConvention = callingConventionOption.callConventionCDecl
            toolCompiler.WholeProgramOptimization = False
            toolCompiler.Detect64BitPortabilityProblems = False
        End If

    Next

End Sub

Any advice would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:58:16+00:00Added an answer on May 14, 2026 at 7:58 pm

    For VS 2005, I believe you can use the ClearToolProperty method on VCConfiguration. The following code would accomplish this for CallingConvention (this is C#, but I’m sure something similar works for VB):

    cfg.ClearToolProperty( toolCompiler, "CallingConvention" );
    

    This would have the same effect as going into the GUI and choosing "<inherit from parent or project defaults>" for this option.

    Unfortunately this seems to be deprecated in VS 2010, and I’m not sure what the new supported method is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.