Command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release
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
> 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.
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, 2022Comments
-
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 over 5 yearsThanks 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 over 5 yearsIt's not resolving my problem
-
Chuck Walbourn over 5 yearsWhat kind of VCXPROJ are you using? Are you using the Makefile or Visual Studio build version?
-
Ashish Rathi over 5 years@ChuckWalbourn I am using Visual Studio build version
-
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 about 5 yearsThis option may be set on specific file, so check on compilation of which file warning is shown
-
Lmao almost 5 yearsI have experienced the same issue.
-
Ed Bayiates over 4 yearsThis was the only way it was fixed for me.
-
solstice333 over 4 yearsFor me, whenever I set
<inherit from parent or project defaults>
for theEnable Minimal Rebuild
option, Visual Studio would set this toYes (/Gm)
forDebug|x64
. But forRelease|x64
it would set it toNo (/Gm)
as expected. I trailed this down toProject/PropertyGroup/UseDebugLibraries
in the .vcxproj. Deleting that node (not that that's the "correct" thing to do), makes it so the default value forEnable Minimal Rebuild
isNo (/Gm-)
. -
MiloDC over 3 yearsThis did not work for me (Visual Studio 2017). Manually removed all "MinimalRebuild" tags in the project files, still seeing the warning.
-
Ty Deuty over 3 yearsTo 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 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-
.