0

I'm working on a C# project in Visual Studio Code. C# code uses conditional compilation. The project uses DotNet Core SDK for building. The build command line specifies conditional compilation flags using /p:DefineConstants paramater.

The editor in Visual Studio Code does not know which compilation flags apply during build. Therefore, "go to definition" and error highlighting features do not work correctly. For example, the editor displays errors while build actually succeeds, which is annoying.

Can you tell me how to tell the editor which compilation flags to assume?

user1476860
  • 89
  • 2
  • 9
  • Does this answer your question? [How do I set a conditional compile variable?](https://stackoverflow.com/questions/3842590/how-do-i-set-a-conditional-compile-variable) – Nate-Wilkins Mar 28 '22 at 21:44

0 Answers0