D8016 error with VS 2019

I keep getting this error

Error D8016 '/ZI' and '/clr' command-line options are incompatible

I googled, and enabled what was requested , but it still keeps happening..
I went here: https://stackoverflow.com/questions...and-clr-command-line-options-are-incompatible
and here https://docs.microsoft.com/en-us/cp...error-d8016?redirectedfrom=MSDN&view=msvc-160


but none of it helps.
Any suggestions? it works fine one a set it to Release, but i need to debug it now.

thanks

ps. This used to be a VS Studio 6 program, with I am trying to work in VS 2019. as release, it works fine.

Also, I am still learning c++ as well.


Unless you're compiling with microsoft's abomination known as "managed C++", then just remove the /clr.

Oh, and paste the real URLs, not something with .... in the middle of it.
Thank you.

I still need to find out how to remove that.

I know if I remove if from the settings, to no compiler or something like that.
Then it cannot find the system items at all.
Then it sounds like you are using C++\CLI. Remove the /ZI option.
/Z7, / Zi , / ZI (Debug Information Format) | Microsoft Docs
https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format

/clr (Common Language Runtime compilation) | Microsoft Docs
https://docs.microsoft.com/en-us/cpp/build/reference/clr-common-language-runtime-compilation

How to set the compiler option for either switch in the VS 2019 IDE is at bottom of their respective pages.
Topic archived. No new replies allowed.