How to configure visual studio default build options?

嘉宣 尚 21 Reputation points
2021-01-26T03:14:28.81+00:00

How do I globally change the default settings for release configurations for my c++ projects? For example output directory and optimization settings. I remember there was a user setting that overrides the default one, and then overridden by property pages and then project settings, but I can't find any documentation now.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,787 questions
{count} votes

Accepted answer
  1. Jeanine Zhang-MSFT 10,041 Reputation points Microsoft Vendor
    2021-01-26T08:44:56.227+00:00

    Hi,

    According to your issue, whether you want to use global property settings? If so, I suggest you could try to use property sheets to accomplish this. A single property sheet can be assigned to all the projects in the solution. From then on you can change a setting in that one property sheet and it will affect all the projects.

    For more details about how to share or reuse Visual Studio project settings, I suggets you could refer to the link: https://learn.microsoft.com/en-us/cpp/build/create-reusable-property-configurations?view=msvc-160

    Usually we use multiple property sheets, (one for release target types, one for debug target types). So the order is very important. If you're editing the project files by hand then the last property sheet will override settings in the previous property sheets in the list.

    Best Regards,

    Jeanine


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.