Search Unity

Attach to Unity not working with Visual Studio Professional 2017

Discussion in 'Code Editors & IDEs' started by mattbrandmm, May 20, 2020.

  1. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    I have been using VS Pro 2017 for 2 years straight on Windows 10 with the same computer, and all of a sudden the Attach to Unity is not working.

    VS Pro shows the orange bar at the very bottom when I click the Attach to Unity button, but then switches back to blue and shows this in the log:

    Code (CSharp):
    1. The program 'Unity' has exited with code 1 (0x1).
    after loading all the modules.

    This happened once before, a month ago, and I resolved it by uninstalling VS Pro 2017 and reinstalling it. I just tried that again, but it did not work this time.

    Anyone have experience with this, or have any ideas?
     
  2. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    I have tried:
    1. uninstalling and reinstalling VS Pro 2017
    2. modifying VS Pro 2017 to remove and then re-add the "Game development with Unity" package
    3. starting Unity as an admin
    4. changing the editor in Unity Preferences to something else, then back to VS Pro 2017