Stop compiling type script files in visual studio

Stop compiling type script files in visual studio

For solving this issue we should check these points:

1. In tsconfig we should have a syntaxt like this:

{
  "compileOnSave": true,
  "compilerOptions": {
    "moduleResolution": "node",
    "allowJs": true,
    "noImplicitAny": true,
    "removeComments": true, 
    "preserveConstEnums": true,
    "target": "es5",
    "watch": false
  }, 
  "files": [
    "wwwroot/lib/_typings/_index.d.ts",
   ...
  ]
}

2. In project config file (.csproj) we should have:

<PropertyGroup>
    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
  </PropertyGroup>

3. In Error list of project we should set error scope on build only (Default is Build+IntelliSense)

اشتراک گذاری