Error MSB6001 Invalid command line switch for "tsc.exe".

Error MSB6001 Invalid command-line switch for "tsc.exe".

To solve the issue please follow the below:

1. For the TypeScript App :

If Project was using TypeScript use this as below change on .jsproj file:

From:

  <PropertyGroup>
    <TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
  </PropertyGroup>

To:

  <PropertyGroup>   
    <TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
<TypeScriptToolsVersion><-- version no of typescript --></TypeScriptToolsVersion>
  </PropertyGroup>
 

2. For pure JS App :

The way to completely disable typescript compilation as below change on .jsproj file:

From:

  <PropertyGroup>
    <TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
  </PropertyGroup>

To:

  <PropertyGroup>
    <TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
    <TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
  </PropertyGroup>

Comments

Popular posts from this blog

Learn to be a Phoenix

Good Listener

No Data No Scale