Skip to content

Instantly share code, notes, and snippets.

@GeoffCox
Last active August 29, 2015 14:08
Show Gist options
  • Save GeoffCox/24574d47b6d71488615f to your computer and use it in GitHub Desktop.
Save GeoffCox/24574d47b6d71488615f to your computer and use it in GitHub Desktop.
Update Visual Studio 2012 Project File to support TypeScript
// Note: Install WebEssentials for VisualStudio 2012
// Add the TypeScript properties to the debug & release compile groups
// For example: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptRemoveComments>false</TypeScriptRemoveComments>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptModuleKind>AMD</TypeScriptModuleKind>
// Ensure that each .TS file is using TypeScriptCompile
<TypeScriptCompile Include="Scripts\myscript.ts" />
// After the <ProjectExtensions> node, import the TypeScript targets.
<Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets')" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment