简体   繁体   中英

Visual Studio 2015 with tsconfig.json - Typescript 1.8.10

This Typescript wiki says that as of Typescript 1.8, there is 'Improved support for tsconfig.json in Visual Studio 2015' (emphasis added by me):

TypeScript 1.8 allows tsconfig.json files in all project types . This includes ASP.NET v4 projects, Console Application, and the Html Application with TypeScript project types. Further, you are no longer limited to a single tsconfig.json file but can add multiple, and each will be built as part of the project. This allows you to separate the configuration for different parts of your application without having to use multiple different projects.

I have an ASP.NET project where compiler settings are given by tsconfig.json. Outside of VS2015, this configuration is taken into account when compiling. I know this because if I change the value of 'noImplicitAny' to true, the build fails, as I am using 'any' elsewhere in the project. but in Visual Studio, making this change isn't noticed at build, and the build succeeds.

What can stop Visual Studio 2015 from using tsconfig, and what can I do to make sure VS2015 does use this configuration?

I may give you some additional direction. I had problems with TS myself, and in one of StackOverflow answers was mentioned that .xproj file itself has higher priority than tsconfig. From my experience there are some options that cannot be defined in .xproj and therefore taken from tsconfig.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM