0

I need to make a preprocessor directive that will exclude a line of code only on ALL version of Visual Studio 2012.

Question 1: Is there a tag for all versions of VS2012? (I see people using VS_2005_PRO and similar, but I need all versions of 2012)

Question 2: is there a #ifNOT type command besides creating a logical #elif?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Michael Meritt
  • 383
  • 5
  • 18
  • @Dai All of the answers in your linked duplicate checks the framework version the code is being compiled as, not the version of the compiler that is being used. – Scott Chamberlain Nov 04 '15 at 20:55
  • *"is there a #ifnot"* Yes, its in the format: `#if !TAG_NAME`, but I don't know of any defined directives for any version of Visual Studio, at least not in C#. Why do you have code that is specific to the IDE and not the framework? – Ron Beyer Nov 04 '15 at 21:06
  • See this answer from Mark Gravell: http://stackoverflow.com/a/408937/4798077 – Ron Beyer Nov 04 '15 at 21:12
  • I have a suite of CodeWebTests, which the tag decoration causes errors on our build automator -- which is hardwired to VS2012, while the devs use 2013/2015. – Michael Meritt Nov 05 '15 at 18:16

0 Answers0