Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using tsconfig.json with Visual Studio 2013? (web project)

I'm using Angular 2 in my web project, and as such need TypeScript to suport experimental decorators such as @View. This can be done in tsconfig.json with "experimentalDecorators": true but I see no such option in Visual Studio's project settings. (I created a TypeScript Project.) As such, I need Visual Studio to detect and use my tsconfig.json file.

I've read various places online that Visual Studio should pick up and use a tsconfig.json if it's present in the project's root directory. However this is not happening. I am using Visual Studio 2013 Update 4 -- and upgrading to Update 5 as I write this.

Does anyone know how to get Visual Studio 2013 (NOT Visual Studio Code, and NOT Visual Studio 2015) to use the tsconfig.json file? Maybe it needs to be in the solution's root instead of the project's root?

Failing that I can try adding a pre-build event to call tsc directly... but that seems sloppy.

like image 823
Vern Jensen Avatar asked Oct 30 '22 17:10

Vern Jensen


1 Answers

I also was looking for this. It appears that Visual Studio 2013-2015 not support tsconfig.json yet. Currently you need to edit your project file.

Edit: With Typescript 1.8 release Visual Studio 2015 seams to fully support .tsconfig. See http://www.typescriptlang.org/docs/release-notes/typescript-1.8.html

like image 177
Andzej Maciusovic Avatar answered Jan 01 '23 18:01

Andzej Maciusovic