У меня есть проект asp.net core 2.2, работающий на .net 4.7.2, который включает пакет nuget Microsoft.TypeScript.MSBuild.
Каждый раз, когда я добавляю новый машинописный текст (.ts или .tsx)) в мой проект Visual Studio автоматически добавляет строку:
<ItemGroup><TypeScriptCompile Remove="myFile.ts" /></ItemGroup>
в файл моего проекта .csproj.
Вот мой файл tsconfig:
{
"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" ]
}
Обратите внимание, что я использую пакет только для проверки типов моих файлов, фактическая компиляция выполняется с помощью Babel.
Не могли бы вы помочь мне понять, почему Visual Studio добавляет эти TypeScriptCompile Remove в мой проект? Я что-то не так делаю?