【问题标题】:No input were found in config file when using visual studio 2022 preview使用 Visual Studio 2022 预览时,在配置文件中未找到输入
【发布时间】:2022-01-26 14:26:36
【问题描述】:

我的 tsconfig.json 看起来像这样

{
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": false,
    "removeComments": false,
    "sourceMap": false,
    "target": "es5",
    "outDir": "wwwroot/js"
  },
  "exclude": [
    "wwwroot"
  ],
  "compileOnSave": true
}

还有一个名为“typescript”的文件夹,我的home.ts 在那里,当我进行更改时,它会在wwwroot/js 中构建一个home.ts 就好了 另请注意,我的 tsconfig.json 和“typescript”文件夹是兄弟文件夹,位于我的项目的根目录中(.net core 6)

我已经尝试了在我发现的每一个 SO 帖子中包含/排除的所有组合,但我无法摆脱图片中的这些警告,有什么想法吗?

【问题讨论】:

    标签: typescript visual-studio visual-studio-2022


    【解决方案1】:

    错误原因是tsconfig.json设置为复制到输出目录。如果在文件属性中将其更改为不复制,则错误消失。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-07-08
      • 2021-10-11
      • 1970-01-01
      • 2022-01-10
      • 2023-02-07
      • 2022-12-09
      • 1970-01-01
      • 2023-03-31
      相关资源
      最近更新 更多