'Visual Studio Intellisense - treat .C files as C++

Visual Studio Professional 2019 Intellisense treats files with the .C extension as being C code, rather than C++. For example, simple namespace using statements are underlined as errors.

The .C (uppercase) extension is common when working on Linux, so I'm losing the benefit of Intellisense when working on cross-platform code.

Is it possible to convince Intellisense that .C extensions denotes C++ code? I'm not using any C code, so don't need to worry about the .c/.C distinction.

Tried adding a file extension mapping for .C (Tools->Options->Text Editor->File Extension) but all I code map to was 'Microsoft Visual C/C++'. This did not resolve the problem.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source