Skip to content

tsconfig.json is ignored by Visual Studio 2015 RTM #3949

Closed

Description

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.

Activity

  1. danquirk commented on Jul 21, 2015

    @danquirk
    Member
  2. paulvanbrenk commented on Jul 21, 2015

    @paulvanbrenk
    Contributor

    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.

    /project root
        /wwwroot
        /scripts
        -tsconfig.json
        -*.ts
    

    Further you need to enable 'Compile on Save' for files that are not part of a project in tools\options for now.

    image

  3. UTGuy commented on Jul 22, 2015

    @UTGuy
    Author

    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.

  4. paulvanbrenk commented on Jul 22, 2015

    @paulvanbrenk
    Contributor

    Compile on build expects the tsconfig.json to be located in the root of the scripts folder next to the wwwroot folder.

  5. UTGuy commented on Aug 13, 2015

    @UTGuy
    Author

    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?)...

    {
        "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?

  6. paulvanbrenk commented on Aug 13, 2015

    @paulvanbrenk
    Contributor

    Did you install TS 1.5.4 or are you still on the 1.5.3 which shipped with RTM?

  7. UTGuy commented on Aug 13, 2015

    @UTGuy
    Author

    1.5.4.0 (per the "TypeScript for Microsoft Visual Studio" extension)

  8. danquirk commented on Sep 16, 2015

    @danquirk
    Member

    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.

  9. 3 remaining items

  10. paulvanbrenk commented on Dec 22, 2015

    @paulvanbrenk
    Contributor

    @MrAndMrsK Which version of Visual Studio and TypeScript are you using?

  11. paulvanbrenk commented on Dec 22, 2015

    @paulvanbrenk
    Contributor

    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.

  12. paulvanbrenk commented on Dec 22, 2015

    @paulvanbrenk
    Contributor

    Does Compile on Save have the expected result?

  13. paulvanbrenk commented on Dec 22, 2015

    @paulvanbrenk
    Contributor

    @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?

  14. paulvanbrenk commented on Jan 26, 2016

    @paulvanbrenk
    Contributor

    Support for multiple tsconfig.json files is part of 1.8, as is support for more project types.

  15. 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

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueVisual StudioIntegration with Visual Studio

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions