Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Visual Studio opens duplicates of my cs files

Discussion in 'Editor & General Support' started by munkbusiness, Mar 22, 2018.

  1. munkbusiness

    munkbusiness

    Joined:
    Aug 22, 2017
    Posts:
    55
    This is a issue I have tried to figure out why happens since yesterday. It didn't use to happen, and I have no clue why it started.

    When I open a .cs file in the unity editor and it boots up visual studio it opens up multiple versions of the same file with ":2" ":3" etc after the name.

    Here is a screenshot http://prntscr.com/iur0iu

    It is super annoying and I have to spend a lot of time closing files all the time. Any fixes? I have tried deleting my csproj files to regenerate them and I have tried to reimport the entire project.
     
    Last edited: Mar 22, 2018
  2. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    And if is a VS problem? Can it be a configuration inside VS?

    Try to use MonoDevelop to look if is it VS that is triggering the problem. You can do this by telling Unity to open the cs files using Mono in the top menu bar: Edit > preferences > External tools and switch it from Visual Studio 2017 (community) to by file extension or browse the notepad (or MonoDevelop)

    I think is not possible to uninstall VS and is better not to do so, but did you try to update it to VS 2017 (community).
     
  3. munkbusiness

    munkbusiness

    Joined:
    Aug 22, 2017
    Posts:
    55
    I tried to use monodevelop to test it and trying to open the same file twice crashed it, but only once and I weren't able to replicate that error afterwards. It seemed to work fine, if I closed it and open the same file from unity editor it would open correctly and only once.

    I switched back to Visual Studio as I prefer that, and to see whether the issue had randomly been resolved, but it persists.

    I have been using the newest as of now Community Visual Studio version (2017 15.6.3).
     
  4. munkbusiness

    munkbusiness

    Joined:
    Aug 22, 2017
    Posts:
    55
    Bump for help, this is still an issue.