title: How do I start a CUDA app in Visual Studio 2010?
body: <p><strong>Direct Question:</strong>  How do I create a simple hello world CUDA project within visual studio 2010?</p>
  
  <p><strong>Background:</strong>  I've written CUDA kernels.  I'm intimately familiar with the .vcproj files from Visual Studio 2005 -- tweaked several by hand.  In VS 2005, if I want to build a CUDA kernel, I add a custom build rule and then explicitly define the nvcc call to build the files.</p>
  
  <p>I have migrated to Win 7, and VS 2010 because I really want to try out nSight.  I have nSight 1.5 installed.  But this is where I'm totally lost.  If I proceed as before, nvcc reports that it only supports msvc 8.0 &amp; 9.0.  But the website clearly states that it supports VS 2010.</p>
  
  <p>I read somewhere else that I need to have VS 2008 (msvc 9.0) also installed -- my word.  Doing so now.</p>
  
  <p>But I'm guessing that at least part of my problems stem from the homegrown custom build tool specifications.  <a href="http://www.programmerfish.com/how-to-run-cuda-on-visual-studio-2008-vs08/" rel="nofollow noreferrer">Several</a> <a href="https://stackoverflow.com/questions/2046228/how-do-i-start-a-new-cuda-app-in-visual-studio-2008">websites</a> talk about adding a *.rules file to the build, but I've gathered that this is only applicable to VS 2008.  Under "Build Customizations" I see CUDA 3.1 and 3.2, but when I add kernels to the project they aren't built.  <a href="http://www.ademiller.com/blogs/tech/2010/08/getting-cuda-3-1-working-with-visual-studio-2010/" rel="nofollow noreferrer">Another website</a> proclaims that the key is three files: <strong>Cuda.props Cuda.xml Cuda.targets</strong>, but it doesn't say how or where to add these files -- or rather I'll gamble that I just don't understand the notes referenced in the website.</p>
  
  <p><strong>So</strong> does anyone know how to create a simple project in VS 2010 which builds a CUDA kernel -- using either the nSight 1.5 setup or the NvCudaRuntimeApi.v3.2.rules file which ships with the CUDA 3.2 RC?</p>
  
  <p>Thanks in advance!  I'd offer a bounty, but I only have 65 points total.</p>