Command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release

17,011

Solution 1

Try selecting <inherit from parent or project defaults> for the Enable Minimal Rebuild option (under C/C++ > Code Generation). After this, the option should show No (/Gm-), not in bold. Make sure you do this for your project(s) (you could have several projects in the solution), and all property pages they inherit from.

I had the same problem using Visual Studio 2019, in the end the problem was in a second project I had in the same solution, that had the option set to Yes (/Gm).

Solution 2

According to the documentation

You may safely remove this option from your projects.

Solution 3

project property "Enable Minimal Rebuild" image

Project > Properties > Configuration Properties > C\C++ > Code Generation > set the Enable Minimal Rebuild to no, and there is no warning.

Solution 4

Happened for me too. Did not manage to fix it through UI. In the end I searched for "MinimalRebuild" in all project files and removed it manually - that helped

Solution 5

Properties > C\C++ > Code Generation > Enable Minimal Rebuild: DELETE value - and there is no warning.

Share:
17,011
Ashish Rathi
Author by

Ashish Rathi

I am Dot Net Developer mostly focusing on design/architect of software and web applications. I try to keep my eye on trending technology. I am self learner, self motivated developer who can work individually and equally contribute if working in a team.

Updated on July 10, 2022

Comments

  • Ashish Rathi
    Ashish Rathi almost 2 years

    I am getting the warning message "cl : Command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release" while building my project with Visual Studio 2017 latest update 15.9.2. How to resolve this warning?

  • Ashish Rathi
    Ashish Rathi over 5 years
    Thanks for the documentation, I have Modified the "Enable Minimal Rebuild" property as per the documentation but still I am getting the same warning?
  • Ashish Rathi
    Ashish Rathi over 5 years
    It's not resolving my problem
  • Chuck Walbourn
    Chuck Walbourn over 5 years
    What kind of VCXPROJ are you using? Are you using the Makefile or Visual Studio build version?
  • Ashish Rathi
    Ashish Rathi over 5 years
    @ChuckWalbourn I am using Visual Studio build version
  • Liam
    Liam over 5 years
    @Ashish: Have you made sure you've selected "All Configurations" and "All Platforms" on the project's property page, before changing the value...?
  • sax
    sax about 5 years
    This option may be set on specific file, so check on compilation of which file warning is shown
  • Lmao
    Lmao almost 5 years
    I have experienced the same issue.
  • Ed Bayiates
    Ed Bayiates over 4 years
    This was the only way it was fixed for me.
  • solstice333
    solstice333 over 4 years
    For me, whenever I set <inherit from parent or project defaults> for the Enable Minimal Rebuild option, Visual Studio would set this to Yes (/Gm) for Debug|x64. But for Release|x64 it would set it to No (/Gm) as expected. I trailed this down to Project/PropertyGroup/UseDebugLibraries in the .vcxproj. Deleting that node (not that that's the "correct" thing to do), makes it so the default value for Enable Minimal Rebuild is No (/Gm-).
  • MiloDC
    MiloDC over 3 years
    This did not work for me (Visual Studio 2017). Manually removed all "MinimalRebuild" tags in the project files, still seeing the warning.
  • Ty Deuty
    Ty Deuty over 3 years
    To expand on this, this was most likely due to not have the "all configurations" option selected from the dropdown in the project settings window. You might already know this but just mentioning it in case others are wondering why you had to go into the project file source.
  • MSalters
    MSalters about 3 years
    @AshishRathi: Setting it to "bold no" adds the option /Gm-. You want to delete the option altogether ("inherit from parent"), and there should not be a parent which has either /Gm or /Gm-.