Skip to content

Instantly share code, notes, and snippets.

@kiwidev
Last active December 21, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiwidev/6326238 to your computer and use it in GitHub Desktop.
Save kiwidev/6326238 to your computer and use it in GitHub Desktop.
Defining a preprocessor constant depending on version of Visual Studio... Put this after the standard DefineConstants definition inside project file (unload project, edit, reload project).
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'">
<DefineConstants>$(DefineConstants);VS_10;</DefineConstants>
</PropertyGroup>
@kiwidev
Copy link
Author

kiwidev commented Aug 24, 2013

Once this is included the VS_10 preprocessor param is available. (So:

#if VS_10

// VS 2010 specific code

#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment