TypeScript: MSBuild: Compile task output GeneratedJavascript does not match tsconfig.json or project settings

In the typescript targets:

    <VsTsc
      ToolPath="$(TscToolPath)"
      ToolExe="$(TscToolExe)"
      TSConfigFile="%(ConfigFiles.Identity)"
      YieldDuringToolExecution="$(TscYieldDuringToolExecution)"
      ProjectDir="$(ProjectDir)"
      ToolsVersion="$(TypeScriptToolsVersion)"
      TypeScriptCompileBlocked="$(TypeScriptCompileBlocked)"
      ComputeOutputOnly="false">

      <Output TaskParameter="GeneratedJavascript" ItemName="emittedFiles" />
    </VsTsc>

The output parameter GeneratedJavascript includes a js file for every ts file in the project even if:

  1. The file is not set to TypeScriptCompile.
  2. The file is excluded or not matched in tsconfig.json.

Side affect is publish fails trying to copy files that do not exist.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 22 (11 by maintainers)

Most upvoted comments

So I figured out what was going wrong… and I have a fix. Current ETA for testing would be Tuesday.

@Drol you shouldn’t have to include the files in the project, my fix should resolve that.