Search Unity

Annoying VS problem

Discussion in 'General Discussion' started by pKallv, Dec 2, 2020.

  1. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    Anyone else that have the problem when you click on a code link, after error, in the Console an additional Visual Studio session is opening and not the same as is open?
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
  3. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Try changing it to point to your VS executable then, per those instructions. See if that fixes the issue.
     
  5. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I get it consistently after I add a code file. The next VS switch opens a new instance.

    Same thing happens if there's a modal dialog open in VS. I am guessing that the instance doesn't respond to Unity, so Unity just opened a new one.
     
  6. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    The only problem I get all the time and it's annoying - if I import any new script (E.G. An asset from package manager) it automatically opens up VS again. (not a new instance), just opening the same one up every time, any time I compile it opens it up, it's really obnoxious.
     
  7. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    I cant attach to Player any more to debug, its very annoying and it hinders my work.
     
  8. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    589
    Possible fix was discussed in this Beta discussion thread – check for open VS dialogue boxes. That might prevent Unity from communicating with VS and so opens a new instance.
     
  9. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    798
    Yes - super annoying.

    Removing Visual Studio Editor and Visual Studio Code editor from the Package Manager fixed it for me. Hasn't caused any bad effects as far as I can tell.
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    This most often happens for me if I double-click on a script to open it while Unity is compiling. If I wait for compilation to finish first, it usually doesn't open a second VS instance.
     
  11. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    For me it happen all the time. ...and I tried the advises.
     
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,776
    May I ask, how you do that, when Unity normally gets locked from any other action, when compiling?

    For me most of the time Unity -> VS behaves ok.
    However, I had previously few occasions, where new VS instance get opened. Nothing that is obstructing atm.

    More annoying part is occasional reload of VS, when saving and compiling, causing reset of any stored undo actions in VS. But not sure, when that happens, or how to reproduce.
     
    pKallv likes this.