Skip to content

VS language service ignoring flags with exclude/files directives in tsconfig.json #7044

Closed

Description

@oising

I am using 1.8 beta. I am also using aurelia framework inside an aspnet5 project. I have configured the module loader, SystemJS, to transpile my TS files. I do *not * want VS to build the TS files. I control this by using a tsconfig.json in the root of the aspnet5 project, which excludes "wwwroot" (along with node_modules, jspm_packages) from compilation. Unfortunately, it appears this also prevents essential flags specified - such as "experimentalDecorators" in this file from being picked up by the language service for excluded folders/files. This gives me annoying red squigglies everywhere complaining that I should specify the flag. If I comment out the wwwroot exlcusion, the squigglies go away.

Therefore, I suggest that the exclude/files directives should only apply to the compiler pass (they are under "compilerOptions" after all,) and not the ambient language service, or you should add a distinct block for controlling the language service flags in tsconfig.json, or even use a separate tsserver.json file. I need support for decorators in intellisense, but I have no intention of using the build process to compile. Make sense?

Activity

  1. changed the title [-]VS language service should NOT heed exclude/files directives in tsconfig.json[/-] [+]VS language service / intellisense ignoring flags when exclude/files directives in tsconfig.json[/+] on Feb 12, 2016
  2. changed the title [-]VS language service / intellisense ignoring flags when exclude/files directives in tsconfig.json[/-] [+]VS language service ignoring flags with exclude/files directives in tsconfig.json[/+] on Feb 12, 2016
  3. mhegazy commented on Feb 12, 2016

    @mhegazy
    Contributor

    Oisin Grehan (@oising), i can not piece together what is not working in your scenario. can you share a repro project?

  4. paulvanbrenk commented on Feb 12, 2016

    @paulvanbrenk
    Contributor

    Mohamed Hegazy (@mhegazy) I can..

    What Oisin Grehan (@oising) wants it to block msbuild from invoking the compiler, excluding all files will not allow you to do that.

    What the tsconfig.json does in Visual Studio is create a 'mini-project', for that 'mini-project' it defines settings how to interpret the TypeScript files. The name compilerOptions maybe a not so great choice, but it's what we have... further you don't users who actually want to compile duplicate the settings between a file used for Visual Studio and the compiler.

    Now, the option you're looking for is actually part of ASP.NET v5, by disabling the checkbox, MSBuild will no longer invoke the TypeScript compiler.

    image

    Hth

  5. oising commented on Feb 14, 2016

    @oising
    Author

    Paul van Brenk (@paulvanbrenk) Yes, that's what I would like, yes. Except in a regular asp.net 4.6 project, not in a aspnet5/core/dnx project.

  6. oising commented on Feb 14, 2016

    @oising
    Author

    Mohamed Hegazy (@mhegazy) Basically I want to enable decorators for intellisense purposes, yet exclude all TS files from compilation by VS/msbuild because I have another process that will do that.

  7. paulvanbrenk commented on Feb 16, 2016

    @paulvanbrenk
    Contributor

    You can modify your project file for the ASP.NET v4 and add a <TypeScriptCompileBlocked>true< ../> property to one of the property groups. That should give you the same behavior.

  8. oising commented on Feb 18, 2016

    @oising
    Author

    Paul van Brenk (@paulvanbrenk) Cheers Paul. Yay for seemingly undocumented obscure magic xml elements without schema!

  9. mhegazy commented on Feb 20, 2016

    @mhegazy
    Contributor
  10. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions