-
Notifications
You must be signed in to change notification settings - Fork 12.8k
tsconfig breaks TSC in VS 2015 #4161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@paulvanbrenk can you take a look/provide a workaround here? |
only the following setup is supported at this time
For compile on save to work you need to enable Compile on save for files that are not part of a project, in tools/options/text editor/typescript/project hope this helps |
also to note, this is something we are still working on. TypeScript 1.5 release went out before ASP.Net release, so there are some missing support that we need to update in the next release. sorry for the hassle. |
Well okay - the currently supported setup works - but orignially we wanted to go by one file per Module, which is not accomplishable without multiple tsconfig files, but with a buildstep - so we will use that as a Workaround. |
Can you describe how you would like to setup your project to do 'one file per module', so we can take that into account when we improve the tsconfig experience in the near future. |
Well we'd like to use something like this:
Which should be build into this:
Currently we can only make one js file per ts file or one js file with all the code. (The latter `out: "../wwwroot/js/Output.js"´ seems not to work either.) |
@glatzert thanks, this is good feedback. You should be able to enable this scenario right now using a grunt task, however I don't think there is any good information available right now (I couldn't find any just now). And I have to make sure that works with compile on save. I'll add some information to the ASP.NET + TypeScript wiki this week. |
I'm trying to write simple spa using VS 2015 RTM, ASP.NET 5, TypeScript and Aurelia. I have tried the setup that was proposed here earlier, but didn't succeed.
I had to follow these instructions to make everything work well. Hope I won't need to copy Thanks |
Hi guys, I'm building a standalone TypeScript app with a similar folder structure and output to glatzert above. We need to build several .ts files in a folder to one combined .js file. Is there any update on when this tsconfig issue will be resolved? I see it was marked initially for 1.6 but is now pushed to 1.6.2, will it be released with 1.6.2? Thanks, |
@swilson128 It will work in 1.6 with the |
@paulvanbrenk so we will eventually be able to do the following?
|
@aaron-bond yes that's the goal, however you'll have to switch to use the new |
@paulvanbrenk that's great news for us. We're planning a project for some time in the future. Is there a time frame on the outFile property being available? |
@aaron-bond the |
Closing this thread as the original issue with the tsconfig.json file in the root of the project is fixed in the final release of 1.6. The support for multiple tsconfig.json files is tracked in issue #4714 |
mhegazy, how does TypeScript depend on Asp.Net? Because TS is front-end and Asp.net is back-end. I thought TypeScript is using only Node.js. If tsconfig.json support is done, update this https://github.com/microsoft/TypeScript/wiki/Using-TypeScript-With-ASP.NET-5 I don't understand can I use tsconfig in HTML With TypeScript project type? |
TypeScript VS plugin does not depend on niether ASP.net nor nodejs.
yes you can with TS 1.8/VS2015 update 2. Just add a tsconfig.json file to your project and it should just work.
nope. works in all project kinds.
looged issue #8402 to update the docs. for now here is a better tutorial for ASP.Net and TS: https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/quick-start/asp-net-core.md |
What did you mean then?
TypeScript Compiler is running via node.js? So, it indirectly depend on node.js )
Ok. But I still don't understand how does msbuild and tsconfig cooperate. |
I have found another workaround for this. If I have tsconfig.json file in project and I set Build Action to None for each and every .ts file in the project the conflict disappears and tsconfig is used instead. Build actions such as Build/Clean seems to be working fine. Bit painful, especially when I have tons of ts files inside but works well. To simplify this, open .csproj in notepad and replace all occurences of TypeScriptCompile to None :) Or create a project pre-build action which will take care of it in case the tsconfig.json exist in the project root. |
I am sorry, its bit more complicated, but I still have similar workaround. a) set all .ts files build action to None In this case build/clean including tslint and build error reporting works well if the single file is used as a TypeScript compiler (outFile option) |
Placing a tsconfig.json file inside of an ASP.NET vNext Project (beta6) will break tsc.
It will not produce any output.or overwrite files or whatever else.
Removing the tsconfig.json fixes the automatic compilation.
The text was updated successfully, but these errors were encountered: