You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tsconfig.json is ignored by Visual Studio 2015 RTM #3949
VS2015 RC was (seemingly) using this configuration file... after updating to RTM this file simply being present actually causes Typescript to not compile on save anymore. We had to remove tsconfig.json to get this to work again. On top of that, there is no way to set configurations, other than editing the .xproj file and adding what is needed by looking at https://github.com/Microsoft/TypeScript/wiki/Setting-Compiler-Options-in-MSBuild-projects.
Yes, you need the tsconfig.json file to set the compiler options. We do expect the tsconfig.json file to be located in a "scripts" folder next to the "wwwroot" folder.
I have the compile "Compile on save" option checked and this works.
EDIT: Also it looks like compile on build no longer works in this scenario either.
I also tried putting a "scripts" folder next to the "wwwroot" folder as you suggested with the tsconfig.json file in it and that would not work unless the "Compile on save" option was checked.
With this config, compile on build will create an app.js in the /project root/wwwroot/lib folder, but on compile-on-save, this same config will produce a NEW wwwroot folder inside the scripts folder (WHAT?)...
{"compilerOptions": {// other options here"target": "es5","out": "wwwroot/lib/app.js"}}
THIS config will work properly with compile-on-save, but on build, puts a NEW wwwroot above the project root (WHAT?)...
{"compilerOptions": {// other options here"target": "es5","out": "../wwwroot/lib/app.js"}}
There is a discrepancy with the 2 different build types... is there a fix (or work-around) for this yet?
As noted here #4820 (comment) we should make sure whatever the default is the user understands what's happening if tsconfig or the project file is superceding the other.
No, I don't think there is a workaround at the moment.. I'll have to look into that, but we're doing a ton of work on tsconfig support in VS, so I expect it to be much smoother in the next release.
Activity
danquirk commentedon Jul 21, 2015
tagging Paul van Brenk (@paulvanbrenk)
paulvanbrenk commentedon Jul 21, 2015
Yes, you need the tsconfig.json file to set the compiler options. We do expect the tsconfig.json file to be located in a "scripts" folder next to the "wwwroot" folder.
Further you need to enable 'Compile on Save' for files that are not part of a project in tools\options for now.
UTGuy commentedon Jul 22, 2015
I checked this morning... here is our project structure...
/project root
/wwwroot
/client
/app
- *.ts
- tsconfig.json
I have the compile "Compile on save" option checked and this works.
EDIT: Also it looks like compile on build no longer works in this scenario either.
I also tried putting a "scripts" folder next to the "wwwroot" folder as you suggested with the tsconfig.json file in it and that would not work unless the "Compile on save" option was checked.
paulvanbrenk commentedon Jul 22, 2015
Compile on build expects the tsconfig.json to be located in the root of the scripts folder next to the wwwroot folder.
UTGuy commentedon Aug 13, 2015
Ok I have figured this out finally....
With this config, compile on build will create an app.js in the /project root/wwwroot/lib folder, but on compile-on-save, this same config will produce a NEW wwwroot folder inside the scripts folder (WHAT?)...
THIS config will work properly with compile-on-save, but on build, puts a NEW wwwroot above the project root (WHAT?)...
There is a discrepancy with the 2 different build types... is there a fix (or work-around) for this yet?
paulvanbrenk commentedon Aug 13, 2015
Did you install TS 1.5.4 or are you still on the 1.5.3 which shipped with RTM?
UTGuy commentedon Aug 13, 2015
1.5.4.0 (per the "TypeScript for Microsoft Visual Studio" extension)
danquirk commentedon Sep 16, 2015
As noted here #4820 (comment) we should make sure whatever the default is the user understands what's happening if tsconfig or the project file is superceding the other.
3 remaining items
paulvanbrenk commentedon Dec 22, 2015
@MrAndMrsK Which version of Visual Studio and TypeScript are you using?
paulvanbrenk commentedon Dec 22, 2015
No, I don't think there is a workaround at the moment.. I'll have to look into that, but we're doing a ton of work on tsconfig support in VS, so I expect it to be much smoother in the next release.
paulvanbrenk commentedon Dec 22, 2015
Does Compile on Save have the expected result?
paulvanbrenk commentedon Dec 22, 2015
@MrAndMrsK ok, thanks. I'll make sure to fix this for the next release. It doesn't sound like you're blocked at this time?
paulvanbrenk commentedon Jan 26, 2016
Support for multiple tsconfig.json files is part of 1.8, as is support for more project types.