-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
tsconfig.json does not work with VS 2015 #3124
Comments
tsconfig.json files are not currently working in VS2015. It's something @paulvanbrenk is working on. |
Any work around for the time being? I need to specify modules to AMD. |
No guaranteed workaround, you can try adding a TypeScriptModuleKind element to a propertygroup, with amd or commonjs specified.. not sure if that gets correctly communicated to the compiler. |
Thanks that seems to work. |
+1 for this to work in VS2015 RC without workarounds. |
This will work in the final release of VS 2015. |
Updating the label to suggestion as this is not a bug level change; this does not change the plan of shipping this in the next public VS release. |
Checked in the code to enable this scenario in VS 2015 |
just got VS 2015 RTM now but the tsconfig is not working. and when you change module system it just does not work. it defaults to commonjs. and if you remove TypeScriptModuleKind it cannot compile without --module flag |
What kind of project are you using? For VS 2015 RTM tsconfig.json based configuration is only supported for ASP.NET v5 and Cordova Projects. |
njsproj |
Yes, that's a currently unsupported project type. The behavior you're seeing is expected. We are planning support for additional project types, but nothing concrete at the moment. |
thanks. it would be great if njsproj would be supported and also for tsconfig files sync with ItemGroup typescriptCompile includes. |
That's exactly one of the problems we run into.. we don't want to have to keep the 2 files in sync. As long as the files are edited in Visual Studio we would be ok, but the moment one of the files is edited outside of Visual Studio the files would be out of sync and we would have a problem getting them back in agreement. |
I'm trying to use the tsconfig.json inside an empty ASP.NET vNext project and it is not being used. I have to set the properties inside a PropertyGroup in the .xproj file... Is there any steps I need to do in order to make it work? @paulvanbrenk, as you mentionned in a previous reply, this should work right? |
What does your project look like?
|
@paulvanbrenk you mentioned "For VS 2015 RTM tsconfig.json based configuration is only supported for ASP.NET v5 and Cordova Projects." In VS 2015 there is a project for Html Application with TypeScript. Will this be supported? |
We are looking at making the experience better for all projects, including the Html App with TypeScript.. not sure about the time line though. |
tsconfig.json is not being honored for me (new ASP.NET v5 project.) |
@dazinator, for now it needs to be under the scripts folder. but we have a fix for this in the next release. so bear with us for a little bit longer. |
@mhegazy ok thats fine - will give that a try. Thanks :) |
I use latest (1.6.3 TypeScript language services), VS 2015 and ASP .Net Betta8. I have FrontendApp folder in the root of web project with tsconfig.json. It contains compiler options and links to files with TS definitions. I also use WebPack + ts-loader to build frontend application and it builds successfully. But Visual Studio code analyzer shows errors in the TypeScript files for imports of modules which are declared in the definition files. If I add references like
then errors are disappearing. But all these files are already declared in the tsconfig.json so I don't want to have two sources of these files. What is even more interesting that I have several modules (external) and I added reference comments only to one of them (the main one). If I reopen project and open some other TypeScript file (not main) - Visual Studio shows errors. If I open main TS file after that and wait a few seconds then errors disappear (in all TS files). And after each project reopen I need to open main TS file and wait few seconds. Is it possible just to use files list with definitions from tsconfig.json without including reference comments? |
@oryol Please see this wikipage about using I think the reason you're seeing what you're seeing is that we only check for tsconfig.json files in the scripts folder. |
So, is it possible to use tsconfig.json in other folders (not in "Scripts")? If not - are you going to support such scenarios and when can we expect such feature? |
@oryol No, not in TypeScript 1.7 (or earlier). However I'm right now working on making the Caveat: Any features don't actually exist until they're checked-in/shipped, and schedules can change at a moments notice. |
Thank you for reply! |
Does this still work for *.csproj files ? I opened a new blank asp.net application and tried to make it work with tsconfig.json .The project I chose in 2015 was But it seems the VS completely ignores the tsconfig.json. My project structure somewhat looks like this Note : I am using typescript v1.8.2 |
@defyjoy can you try the latest (https://github.com/Microsoft/TypeScript/releases/tag/v1.8.7), and if you run into issues, please file a new issue and provide a project we can look at. |
@defyjoy Can you make sure TypeScript shows in Help > About |
Doesn't work here, I'm using |
When using VS2015, put the tsconfig file in a "Scripts" folder. Otherwise I don't think VS will find it or honour it. |
@dazinator that isn't really good way to deal with config file, I always rename |
@dehghani-mehdi - yep I know. I also think it's a poor, but that is how the VS project system (vs2015) supports typescript projects as far as I know. This should help @defyjoy. If you want to handle typescript project compilation outside VS using |
Also - if you do decide to use command line <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> |
@dazinator Thanks for the note, for now I just add |
I am trying to give options to typescript namely trying tell how to load modules from VS. For new ASP.NET 5 templates this option simply not available, worse typescript 1.5 does not honor tsconfig.json either so what should I do ?
The text was updated successfully, but these errors were encountered: