【问题标题】:tsconfig reference doesn't seem to work with multiple projects in VS2017 15.7.1tsconfig 参考似乎不适用于 VS2017 15.7.1 中的多个项目
【发布时间】:2018-05-22 21:24:05
【问题描述】:

我有一个 VS2017 15.7.1 解决方案,其中包含两个项目。项目 A 中有一个 angular.js 和一个 angular.d.ts 文件,我想在项目 B 中引用它们,使用 tsconfig.json 文件,如下所示:

{
  "include": [
    "../ProjectA/angular.d.ts",
    "**/*.ts"
  ]
}

在项目 B 的 file.ts 中,我现在希望能够引用 angular 命名空间(我可以在同一个项目中很好地引用它),但它说它在全局模块中找不到符号“angular”。

但是,如果我在 VS Code 中打开同一组项目,它的行为完全符合我的预期。这是 Visual Studio 的一个错误,还是我只是弄乱了一些东西?

【问题讨论】:

    标签: typescript visual-studio-2017 tsconfig


    【解决方案1】:

    我终于想通了。 VS 15.6 进行了更改,因此它只识别 .tsconfig 文件,如果它们的 Build Action 在其属性上设置为 Content。

    【讨论】:

      猜你喜欢
      • 2014-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多