Visual Studio editor saying 'Macro in Skipped Region'

Visual Studio is saying macro in skipped region after a recent update. It didn’t show this message before the update.


The code compiles fine but how to remove this error message?

I was having the same issue. The weird part is that it is hard to find official references to this “Macro in Skipped Region”. There are a lot of people complaining about this, links for reference:

The best solution comes from the later where it suggests disabling this warning by disabling IntelliSense as a whole. Unfortunately, I couldn’t find a way to disable only this warning but I can live with it until a fix comes out.

In order to fully disable IntelliSense:

  • Tools → Options → Text Editor → C/C++ → Advanced → Disable IntelliSense


I recommend to vote on visualcommunity so the VS Devs priorities that. Using hint files or deactivating Intellisense don’t seem viable solutions to me.

A Workaround

Bit of a hacky workaround, but try this for now:

  1. Add a cpp.hint to your root folder

  2. Add the missing defines in here, for example, mine is:

    #define UCLASS()

    #define GENERATED_BODY()

    #define UFUNCTION()

  3. Restart visual studio and give it a few seconds. This should get rid of your green squiggles.

  4. List item

Microsoft’s Hint File Docs

This is a nice workaround. Thank you for sharing.

But: I’d just leave the whole thing alone. I mean, it is not an error, it is an information from the IDE. Keep it in your sights but do NOT change your code because of IntelliSense information.

It’s incorrect information from the IDE (as acknowledged by Microsoft). I even added my cpp.hint file to the visual studio installation directory; so it doesn’t even have to live in your project root. It’s simply an editor configuration… and it’s not modifying any code whatsoever.