Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question VS 2022 Closes All Tabs After Creating New Script

Discussion in 'Code Editors & IDEs' started by spiderinthesnow, May 18, 2022.

  1. spiderinthesnow

    spiderinthesnow

    Joined:
    Sep 30, 2021
    Posts:
    3
    I've got a fairly annoying that's just popped up after I updated to the latest version of VS 2022/VS Editor package - any time I create a new script, every single tab I have open in VS closes. It also saves every single script when it does it, so if there's anything I'm working on in another tab that I haven't saved it'll just up and save it as is. Another thing is that if I were to rename a script from VS, the script won't be renamed in Unity after I reload scripts.

    Is there a fix for any of these things?

    Edit: for more info I'm using 2021.3, I was using 2021.2 when I first encountered the problem. I've tried resetting and uninstalling VS 2022 as well as using a different version of Unity, neither of those worked. I tried using VS 2019 and that seems to be working fine, so it's got to be something with VS 2022.
     
    Last edited: May 18, 2022
  2. Monblur

    Monblur

    Joined:
    Dec 20, 2016
    Posts:
    1
    Also having this annoying issue >< For now I think I will go back to using my VS 2019 install.

    It also occurred for me after updating VS 2022.
     
  3. Nickromancer

    Nickromancer

    Joined:
    Jul 31, 2016
    Posts:
    92
    I am also having the same issue. It happens every time unity recompile code changes.
    I only upgrade from VS 2022 17.1 to VS 2022 17.2. It seems to be caused by the the latest version.
     
    Last edited: May 27, 2022
  4. ZekeRage

    ZekeRage

    Joined:
    Feb 4, 2014
    Posts:
    1
    Just started experiencing this issue this afternoon.

    I added an installation of Unity 2021.3.3f1 yesterday (and switched my project to use it) and I am using Visual Studio 2022 17.2.2 which I also recently updated. I have been using VS2022 for a few weeks now without issue so I'm wondering if this is being caused by either of these updates?

    Hope a fix is found soon, it's really disruptive to have to re-open all of your code!
     
  5. LapidistCubed

    LapidistCubed

    Joined:
    Dec 22, 2015
    Posts:
    10