title: Cannot compile TypeScript files in Visual Studio 2012
body: <p>I downloaded and installed TypeScript extension for VS 2012, I got my first sample compiles <strong>by manually dragging the ts file onto the tsc.exe file!</strong> because no other way to compile the file will work.</p>
  
  <p>I don't want to manually do this everytime I want to debug a page! I have read about 5 articles on the web and none of the solutions work. I've tried adding TypeScript compiler to PATH in Windows, I've tried downloading and installing via Nuget Package Manager the Sholo thing, I've tried these pages:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/12695451/using-typescript-in-cshtml-files">Using TypeScript in cshtml files</a></li>
  <li><a href="https://stackoverflow.com/questions/12710691/visual-studio-typescript-options">Visual Studio TypeScript Options</a></li>
  <li><a href="https://stackoverflow.com/questions/12711826/debugging-typescript-code-with-visual-studio">Debugging TypeScript code with Visual Studio</a></li>
  <li><a href="https://stackoverflow.com/questions/12758228/cannot-compile-typescript-using-tsc-node-module">Cannot compile typescript using tsc node module</a></li>
  <li><a href="https://stackoverflow.com/questions/12887929/typescript-visual-studio-d3">TypeScript - Visual Studio - d3</a></li>
  <li><a href="https://stackoverflow.com/questions/13040793/visual-studio-2012-typescript-project-ignoring-two-files-during-compile">Visual Studio 2012 TypeScript project ignoring two files during compile</a></li>
  <li><a href="https://stackoverflow.com/questions/12730490/typescript-visual-studio-2012-compilation-parameters">TypeScript / Visual Studio 2012 / Compilation parameters</a></li>
  <li><a href="https://stackoverflow.com/questions/12867390/using-typescript-in-an-existing-visual-studio-web-site-project">Using TypeScript in an existing Visual Studio Web Site project</a></li>
  <li><a href="https://stackoverflow.com/questions/12710691/visual-studio-typescript-options">Visual Studio TypeScript Options</a></li>
  <li><a href="https://stackoverflow.com/questions/10374444/compile-generated-files-in-visual-studio">Compile generated files in Visual Studio</a></li>
  </ol>
  
  <p>And not a single solution has worked.</p>
  
  <p>I have even downloaded and installed the Web Essentials plugin for Visual Studio and gone to Options menu, then selected "Compile all TypeScript files on Build = True" and "Compile TypeScript on Save = True" - but nothing works.</p>
  
  <p>I've read the entire TypeScript website, the specification, and even their discussion tab on the codeplex site.</p>
  
  <p>How can I get TypeScript to compile when I save changes to the <code>.ts</code> file <strong>or</strong> when I press F5/Debug/Build?</p>
  
  <p>*I don't really want any third-party scripts/plugins, etc unless it's absolutely necessary. I've seen a couple of them and it's just ... there's no point. I might as well just write pure JavaScript.</p>