Search code examples
c++cvisual-studio-2015clr

Getting error D8045 "cannot compile C file <file> with /clr option" even after turning off CLR option


This is in Visual Studio 2015.

I have a native C library that I'm using from my .NET Visual C++ code. I'm aware that I have to change the "Common Language Runtime Support" option to "No Common Language Runtime Support" on the property page for each .c file, per this question. However, even after I have turned that option off, I am still receiving error D8045 when I attempt to compile those files.

Is this a known issue in VS2015, or am I missing something?


Solution

  • It cleared up on its own eventually. I had restarted Visual Studio a few times and it kept happening, which is why I asked this question. I guess some cache somewhere wasn't being updated or got corrupt or something.