I have an asp.net core 2.2 project running on .net 4.7.2, which includes the Microsoft.TypeScript.MSBuild nuget package.
Every time I add a new typescript (.ts or .tsx) file to my project, visual studio automatically adds a:
<ItemGroup><TypeScriptCompile Remove="myFile.ts" /></ItemGroup>
line into my project .csproj file.
Here is my tsconfig file:
{
"compilerOptions": {
// Target latest version of ECMAScript.
"target": "esnext",
// Search under node_modules for non-relative imports.
"moduleResolution": "node",
// Process & infer types from .js files.
"allowJs": false,
"jsx": "react",
// Don't emit; allow Babel to transform files.
"noEmit": true,
// Enable strictest settings like strictNullChecks & noImplicitAny.
"strict": true,
// Disallow features that require cross-file information for emit.
"isolatedModules": true,
// Import non-ES modules as default imports.
"esModuleInterop": true,
"skipLibCheck": true,
"baseUrl": ".",
"paths": {
/* my paths */
}
},
"include": [
/* my typescript folders */
],
"exclude": [ "node_modules" ]
}
Note that I'm only using the package to type-check my files, the actual compilation is done using Babel.
Can you please help me understand why Visual studio adds these TypeScriptCompile Remove in my project? Am I doing something wrong?