title: Compiling c++ project through the command prompt
body: <p>I'm having a hard time trying to figuring out what field to fill into an xml file I'm creating. I have been trying to follow 'Using MSBuild to Create a Visual C++ Project'(<a href="http://msdn.microsoft.com/en-us/library/dd293607.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd293607.aspx</a>) but I'm stuck on the xml part.
  So the fields are:</p>
  
  <pre><code>&lt;Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;ItemGroup&gt;
      &lt;ProjectConfiguration Include="Debug|Win32"&gt;
        &lt;Configuration&gt;Debug&lt;/Configuration&gt;
        &lt;Platform&gt;Win32&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include="Release|Win32"&gt;
        &lt;Configuration&gt;Release&lt;/Configuration&gt;
        &lt;Platform&gt;Win32&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
    &lt;/ItemGroup&gt;
    &lt;Import Project="$(VCTargetsPath)\Microsoft.Cpp.default.props" /&gt;
    &lt;PropertyGroup&gt;
      &lt;ConfigurationType&gt;Application&lt;/ConfigurationType&gt;
      &lt;PlatformToolset&gt;v120&lt;/PlatformToolset&gt;
    &lt;/PropertyGroup&gt;
    &lt;Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /&gt;
    &lt;ItemGroup&gt;
      &lt;ClCompile Include="main.cpp" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;ClInclude Include="main.h" /&gt;
    &lt;/ItemGroup&gt;
    &lt;Import Project="$(VCTargetsPath)\Microsoft.Cpp.Targets" /&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>The only part I know I have to change is the Item group portion to match all my .cpp and .h files. Are all the fields necessary? Can you give an example for the $(VCTargetsPath) in each of the Import Projects? This seems simple but only after the first time of doing it. Thanks.</p>