visual studio – C++/CLI errors in VS 2022, the IDE recognizes a namespace but the compiler does not


I have a class library using C++/CLI in Visual Studio 2008 and have upgraded it to VS 2022. The upgraded project generates the compile error:

‘AlarisSODLibrary’: is not a class or namespace name

even though the IDE is able to resolve the class and namespace references, see screenshot:

screenshot from IDE

I have made sure C++/CLI support is installed:

CLI support installed

project property sheet

It seems as if somehow the IDE knows something that the compiler does not. I haven’t worked with C++ in a long time, I have been somewhat spoiled by managed code and I have no idea what could be wrong. I have looked through the language settings in the project properties but didn’t see any setting that seemed to be relevant. Has anyone seem something like this before? Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *