镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Can't edit files in Visual Studio after installing 1.8.4 On Update 2 CTP #7204

Description

@OSUblake

TypeScript Version:
1.8.4

Visual Studio Version:
Community 2015 CTP 14.0.25008.00

Everything was working fine using TypeScript 1.8.1 beta. After installing 1.8.4 last night, the editor no longer works. Typing does nothing. The onlys keys it responds to are enter, delete, backspace. The three drop-down lists at the top of the editor that let you jump to certain parts of your code are all blank.

I've tried all of the following with no luck.

  • Repair/uninstall Visual Studio and TypeScript
  • Disable extensions
  • Uninstall ReSharper
  • Clear MEF component cache
  • Update devenv.exe.config

I also can't seem to stop Visual Studio from updating to the CTP when I reinstall. I started getting a lot of JavaScript language service crashes after installing the CTP. Viewing a compiled TS file would cause JavaScript to stop working.

Activity

  1. djarekg commented on Feb 24, 2016

    @djarekg

    I have the same problem. My co worker does not and the only major difference is I have the vs2015.2 CTP and he just has vs2015.1 rtm. Hope that helps

  2. birick commented on Feb 24, 2016

    @birick

    I ran into the same problem as well.

    I was playing using the newly added ability to add comments to the tsconfig.json file. If I added a comment at the very top of the file, then this behavior occurred after a restart of VS.

    To resolve, remove any comments at the top of the tsconfig.json file (only use inline comments to the json), and then restart VS. To be safe, you might try removing any comments to the file and restarting VS and see if that fixes it.

  3. changed the title [-]Can't edit files in Visual Studio after installing 1.8.4[/-] [+]Can't edit files in Visual Studio after installing 1.8.4 On Update 2 CTP[/+] on Feb 24, 2016
  4. mhegazy commented on Feb 24, 2016

    @mhegazy
    Contributor

    Update 2 CTP does not support TS 1.8.4. We are looking into why the setup did not show the correct blocking message.
    TS has dependency on internal APIs that changed in Update 2, trying to install TS 1.8.4 (targeting Update1) will cause the language service to be broken.
    Update 2 CTP has TS 1.8.1-beta in box, the next public release of Update2 should have the TS 1.8.4. sorry for the inconvenience.

  5. IanYates commented on Feb 24, 2016

    @IanYates

    Mohamed Hegazy (@mhegazy) - thanks for the update. Partly our fault for running a CTP :) The perf improvements have been worth it though.

    If you've got some hacky way of rolling back to the 1.8.1-beta that'd be splendid.

  6. mhegazy commented on Feb 24, 2016

    @mhegazy
    Contributor

    uninstall TS 1.8.4, repair Update 2 entry in Add/Remove programs should do the trick.

  7. IanYates commented on Feb 24, 2016

    @IanYates

    Despite having Update 2 CTP installed, my Add/remove programs just shows
    Microsoft Visual Studio Enterprise 2015 with Update 1
    capture1

    But CTP for update 2 was definitely installed and indeed when I run VS 2015 it says it's CTP for update 2
    capture2

    I guess the incorrect info being reported in add/remove programs is the reason why installation of TypeScript 1.8.4 wasn't blocked.

    So I've uninstalled TS 1.8.4 - it was really quick and then repaired the only VS2015 entry (update 1) in add/remove programs so I no longer get those crashes in VS pointing me to the activity log but I also get a read-only TypeScript editing experience.

    Sorry for so many words - I wanted to be specific and anticipate what you might suggest :) My other thread has the things I've tried already with regards to uninstall, reinstall, repair, etc.

  8. IanYates commented on Feb 24, 2016

    @IanYates

    I went to my layout folder for the update 2 CTP and found the pair of Typescript *.msi files. They wouldn't install as a newer version of the product was already present. Removing TypeScript 1.7.x and 1.8.x from add/remove programs still didn't let the *.msi files executes.

    So I then fired up Windows Installer Cleanup Utility. It lists many packages for CTP update 2 - so that's good. It also still listed the TypeScript packages. I nuked them and then ran the ones from the update 2 ctp folder.

    That got me back to VS 2015 throwing errors directing me to the activity log upon opening a TypeScript file.

    I visited add/remove programs and removed TypeScript from there. Opening VS 2015 got me back to the behaviour described in this thread where I get the read-only TypeScript experience (but no errors raised in the GUI). Strange that even after uninstalling TypeScript I still got syntax highlighting, etc.

    I'm now running a full repair from the VS 2015 Update 2 CTP installer. Fingers crossed.

  9. IanYates commented on Feb 24, 2016

    @IanYates

    🙅
    Reboot after repair and it's still read-only. I noticed however that I can cut & paste code to the editor. Saving doesn't recompile the JS files though.

    I'm heading home (GMT + 10 here) and will check this thread again in an hour or two. I have some work to do tonight so am very happy to be a guinea pig for any suggested fixes you may have.

  10. OSUblake commented on Feb 24, 2016

    @OSUblake
    Author

    uninstall TS 1.8.4, repair Update 2 entry in Add/Remove programs should do the trick.

    Unfortunately, this does not resolve the issue. Everything Ian Yates (@IanYates) has posted is the same for my machine. There is no Update 2 entry in Add/Remove programs, and Visual Studio is still showing 1.8.4 as being installed.

    Testing out all these different repairs takes way too long. At this point, I'm beginning to think that doing a clean install is going to be the easiest fix for me.

  11. 96 remaining items

  12. vanister commented on Jun 7, 2016

    @vanister

    Paul van Brenk (@paulvanbrenk) sure, how do you want me to get it to you?

  13. paulvanbrenk commented on Jun 7, 2016

    @paulvanbrenk
    Contributor

    Van Huynh (@vanister) A repo on GitHub is probably easiest. Also, which version of VS and TypeScript are you using ( see Help - About).

  14. vanister commented on Jun 7, 2016

    @vanister

    Paul van Brenk (@paulvanbrenk) I'll create a repo for it and send you the details. I'm using 2015 update 2 with TypeScript 1.8.31. Whatever was installed with the VS update 2 installer. I am also using gulp-typescript and that typescript version is:

    $ node_modules/gulp-typescript/node_modules/typescript/bin/tsc -v Version 1.8.10

    image

  15. vanister commented on Jun 7, 2016

    @vanister
  16. paulvanbrenk commented on Jun 7, 2016

    @paulvanbrenk
    Contributor

    Van Huynh (@vanister) change the following in your project files:

    -    <TypeScriptTarget>Unknown</TypeScriptTarget>
    +    <TypeScriptTarget>ES6</TypeScriptTarget>

    We don't gracefully deal with that, this will be fixed in the next release of TypeScript

  17. vanister commented on Jun 8, 2016

    @vanister
  18. kabua commented on Jun 13, 2016

    @kabua

    I think I found the Issue!
    I just ran across the same problem BUT I think I've tracked down the issue.

    If I have a very simple project; which contains only a single ts file and a tsconfig.json file then I can edit the ts file. However, if I include the project's node_modules folder (which contains Angular2's QuickStart required modules - consists of 5,610 files) then I can't edit the ts file; well not for a few seconds that is.

    On future investigation, I discovered that when I couldn't edit the ts file, the three drop-down list boxes were empty. But then after several seconds, I noticed that the first drop-down list box would finally show "TypeScript Virtual Projects" at which point, I could edit my ts file!!

    By changing my tsconfig.json file to exclude the node_modules folder, I could edit my ts almost instantaneously.

    My test tsconfig.json file:

    {
        "compilerOptions": {
            "target": "es5",
            "module": "system",
            "moduleResolution": "Node",
    
            "declaration": false,
            "diagnostics": true,
            "removeComments": false,
            "sourceMap": true,
            "listFiles": true
        },
    
        "exclude": [
            "WebUtilities",
            "node_modules",
            "typings"
        ],
    
        "compileOnSave": true
    }
    

    Can anyone else verify that this fixed the issue?

  19. paulvanbrenk commented on Jun 14, 2016

    @paulvanbrenk
    Contributor

    kabua that sounds very plausible.. I'll update the default tsconfig.json file to exclude node_modules and bower. Are there any other suggestions?

  20. natwebb commented on Jun 14, 2016

    @natwebb

    I am running into the same issue, and none of the fixes suggested here seem to be working. My .tsconfig has always excluded node_modules, so I can't add it pursuant to kabua 's suggestion, so presumably that's not universally the cause of this issue. I tried adding and removing .bak on the .tsconfig and that also has made no difference. I'm compiling .ts into .js using VisualStudio, and not running gulp or any other such tool.

    I have a question out on Stack Overflow here: http://stackoverflow.com/questions/37820711/visual-studio-2015-cannot-edit-typescript-files-get-exception-0x80020101 and I'm happy to share any other information that may be useful, though I can't upload the project itself without getting fired. :)

  21. paulvanbrenk commented on Jun 14, 2016

    @paulvanbrenk
    Contributor

    Nat Webb (@natwebb) Yeah, this looks like a different issue.. replied on the StackOverflow question.

  22. natwebb commented on Jun 17, 2016

    @natwebb

    At the suggestion of Paul van Brenk (@paulvanbrenk) I intalled Update 3 RC from here: https://www.visualstudio.com/downloads/visual-studio-prerelease-downloads and while the initial install failed, necessitating a restart and making VS unusable, running a Repair to get VS back up and running included a successful install of Update 3 RC and fixed the bug!

  23. Schoof-T commented on Jul 4, 2016

    @Schoof-T

    I started receiving this error after I updated to Update 3 (Final). I made a stackoverflow question about this issue: http://stackoverflow.com/questions/38184024/error-in-visual-studio-2015-update-3-when-opening-solution-typescript

  24. IvanMisyats commented on Jul 8, 2016

    @IvanMisyats

    I was able to edit Typescript files again when I installed Update 3 for VS.

  25. morsmodr commented on Jan 27, 2017

    @morsmodr

    Close VS2015.
    In the root of your solution, go to .vs folder > folder named with solution name > v14 folder > delete the hidden file (Type: Visual Studio Solution User Options)
    Restart VS2015
    Voila it works
    The one caveat is that the files you had open while working earlier are not open

  26. 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 issueHigh Priority

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions