Using TypeScript in cshtml files-Collection of common programming errors

You could manually compile the TypeScript files using tsc.exe and then add the resulting Javascript to your project or use a tool, such as Web Essentials that compiles on save.

As the compiler can be compiled to Javascript, you can also let the user’s browser do the compilation on the fly (at the cost of performance and file size, the compiler is fairly big). An example of this approach is niutech’s solution.

If you are using Bundling and Minification, I have just released an implementation of IBundleTransform that compiles TypeScript to Javascript. It is on GitHub and NuGet (Install-Package TypeScriptBundleTransform). If you are not yet using Bundling and Minification, it is worth a look!