在发布模式下编译时,TypeScript 1.4编译器抛出错误

时间:2015-04-29 20:11:11

标签: visual-studio-2013 typescript1.4

我正在使用Visual Studio 2013中的TypeScript 1.4做一些简单的教程,当我在 debug 中进行编译时,一切正常。一旦我尝试在发布中编译,我得到:

The command "tsctrue "C:\Users\dluther\Downloads\typescript\materials\2-typescript-m2-exercise-files\Code\Before\TypeScriptTypes\TypeScriptTypes\app.ts"
"C:\Users\dluther\Downloads\typescript\materials\2-typescript-m2-exercise-files\Code\Before\TypeScriptTypes\TypeScriptTypes\Scripts\02-05-primitives.ts""
exited with code 9009.

在我的.csproj文件中,我有这个:


    <Target Name="BeforeBuild">
        <Message Text="Compiling TypeScript files" />
        <Message Text="Executing tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
        <Exec Command="tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
    </Target>

1 个答案:

答案 0 :(得分:1)

Turns out I didn't have this in my project file (I had to add it manually):


    <PropertyGroup Condition="'$(Configuration)' == 'Release'">
        <TypeScriptSourceMap> --sourcemap</TypeScriptSourceMap>
    </PropertyGroup>

相关问题