title: CUDA 9 unsupported error with Visual Studio 2017
body: <p>I've recently updated my VS 2017 and now I cannot even build a default CUDA project (the one with the vector addition). </p>
  
  <p>I suspect that this is due to the following error:</p>
  
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error   C1189   #error:  -- unsupported Microsoft Visual Studio version! 
   Only the versions 2012, 2013, 2015 and 2017 are supported! ver2    
  c:\program files\nvidia gpu computing 
  toolkit\cuda\v9.0\include\crt\host_config.h 133 
  </code></pre>
  
  <p>The other errors are irrelevant and will disappear once I fix this one. Note, that I am able to build and run simpleCUFFT from CUDA samples.</p>
  
  <p>Before the update I was able to build the default CUDA project but I was not able to build the CUDA Sample project. I've updated my VS2017 using VS installer and installed CUDA SDK 10.0.15063.0. Attached is the screenshot<a href="https://i.stack.imgur.com/vhiYh.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/vhiYh.jpg" alt="screenshot"></a> with the installed components.</p>
  
  <p>Please let me know if any additional information is required. I am aware of the <a href="https://devtalk.nvidia.com/default/topic/1022648/cuda-setup-and-installation/cuda-9-unsupported-visual-studio-version-error/" rel="noreferrer">following</a> topic and since I am using the latest CUDA toolkit, I don't need to make changes in host_config.h.</p>
  
  <p>Thanks,
  Mikhail</p>
  
  <p>Edit:
  My VS version (as displayed in VS installer) is 15.5.0
  My nvcc version is release 9.0, V9.0.176</p>
  
  <p>Edit2: I've tryied to change host_config.h line 133 to: </p>
  
  <pre><code>  #if _MSC_VER &lt; 1600 || _MSC_VER &gt; 1912
  </code></pre>
  
  <p>This error does not show up anymore, however, a bunch of errors "expression must have a constant value" show up in the file type_trails. I have no clue how to fix it.</p>