title: Why are .NET target framework defines not set?
body: <p>The <a href="https://docs.microsoft.com/en-us/dotnet/standard/frameworks" rel="nofollow noreferrer">Target Frameworks documentation page</a> cites that certain defines are automatically set based on the project's target framework, which I am assuming would change based on the <code>Target framework</code> field in <code>Properties &gt; Application</code>:
  <a href="https://i.stack.imgur.com/Xta8s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xta8s.png" alt="enter image description here"></a></p>
  
  <p>Or when selecting the Target framework while creating a new Visual C# project (New Project > Visual C# > Console App (.NET Framework))</p>
  
  <p>However as far as I've tested, none of the defines specified in the documentation are actually defined.</p>
  
  <p>For example, If I create a <code>.NET Framework 3.5</code> project or manually set an existing project to target <code>.NET Framework 3.5</code> in properties, <code>NET35</code> is not defined.</p>
  
  <p>I've taken every single define listed on the documentation page and added debug code that prints if any or all are defined, and none appear to be defined:
  <a href="https://i.stack.imgur.com/8sfFF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8sfFF.png" alt="enter image description here"></a>
  Sourcecode: <a href="https://gist.github.com/JohannesMP/ece8987fa18b2eaf830d7426c2256d6b" rel="nofollow noreferrer">https://gist.github.com/JohannesMP/ece8987fa18b2eaf830d7426c2256d6b</a></p>
  
  <hr>
  
  <p>Am I making an incorrect assumption about when or how these defines should be set? What other portable way would I to conditionally compile code based on the target framework on a per-line basis?</p>
  
  <p>I am running Visual Studio Community 2017 Version 15.8.4 with the default Microsoft .NET Framework Version 4.7.03056</p>