Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 - tsconfig.json - TypeScript 1.6.0 Beta

I created a blank HTML application with TypeScript using File > New > Project in VS2015.

I added a basic tsconfig.json in a /scripts folder and was expecting to have VS read the file and output the .js files into a different folder. Unfortunately, nothing happens. It's a though VS is not even finding the tsconfig.json

Is anyone else having this problem?

I am aware there was a previous problem with 1.5, but the previous fix doesn't seem to work: https://github.com/Microsoft/TypeScript/issues/4300

---------------- Update 9/10/2015

Here's one sample tsconfig.json

{
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5",
    "module": "amd",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "outDir": "../www/scripts/"
  },
  "files": [
    "./scripts/index.ts"
  ]
}

Here's another tsconfig.json

{
"compilerOptions": {
    "target": "es5",
    "out": "/wwwroot/scripts/appBundle.js",
    "sourceMap": true,
    "removeComments": true,
    "sourceRoot": "/"
    }
}

I have created tsconfig.json files for TypeScript + Cordova projects and they work correctly.

like image 828
DeanB_Develop Avatar asked Oct 31 '22 19:10

DeanB_Develop


1 Answers

Prior to typescript 1.8 Beta, .tsconfig was ignored for .net 4.x projects. Now with this released, visual studio does recognize if there is a .tsconfig file and disables the other project types.

Just make sure you have uninstalled previous versions of Typescript for Visual Studio, and install the latest version.

Here is the install file for Typescript 1.8 Beta for VS: http://download.microsoft.com/download/6/D/8/6D8381B0-03C1-4BD2-AE65-30FF0A4C62DA/TS1.8.1-Beta-TS-master.20160126.1/TypeScript_Dev14Full.exe

Here is their announcement on it: https://blogs.msdn.microsoft.com/typescript/2016/01/28/announcing-typescript-1-8-beta/

like image 63
aoakeson Avatar answered Nov 15 '22 08:11

aoakeson