Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

VS Tools Generated - Solution incomplete/different

Discussion in 'Scripting' started by Leviathan1753, Sep 23, 2015.

  1. Leviathan1753

    Leviathan1753

    Joined:
    Feb 15, 2014
    Posts:
    13
    So, I code on two machines, and use version control to swap from one to the other.

    The core problem is one of my machines doesn't generate a VS solution that is proper and debuggable, while the other one does.

    On the proper one, the solution that gets generated by VS Tools contains 4 projects:
    • Unity Project.CSharp
    • Unity Project.CSharp.Editor
    • Unity Project.CSharp.Editor.Plugins
    • Unity Project.CSharp.Plugins
    All my code is in the first, and i can Debug that project to hook onto Unity and debug the scene.

    ---

    However, on my other machine with is the exact setup (as far as I know), the solution contains these projects instead:
    • Assembly-CSharp
    • Assembly-CSharp-Editor
    • Assembly-CSharp-Editor-firstpass
    • Assembly-CSharp-firstpass
    All of these are library projects, and cannot be debugged as such. Also, any additional (outside) projects I add to the solution get removed when I reopen VS. This is not the case on my "working" machine; I can add/keep outside projects.

    ---

    Things I've tried to solve it:
    1. Closing Visual Studio -> Reopening via Unity -> Assets -> Open C# Project
    2. Copying over all the solution/project files from my Unity Project on my working machine
    Neither seem to have an effect on the solution.

    ---

    Both machines have:
    • Unity v5.2.0f3 personal
    • Visual Studio 1015 Community v4.6.00079


    Any ideas?
    Much appreciated!
     
  2. Leviathan1753

    Leviathan1753

    Joined:
    Feb 15, 2014
    Posts:
    13
    I copied the repo/project from my working PC to my bad PC, and the problem didn't go away. So, it's not likely a problem with my project, but rather some unity settings/installation?
     
  3. Leviathan1753

    Leviathan1753

    Joined:
    Feb 15, 2014
    Posts:
    13
    Turns out it was a case of "Did you turn it off/on again?".

    Reinstalled Unity and Visual Studio seemed to do the trick. Not sure what got corrupted
     
  4. vintar

    vintar

    Joined:
    Sep 18, 2014
    Posts:
    90
    I read somewhere that it may have to do with having stuff in StandardAssets/Plugins and compile order of scripts, but really not sure. I too use VS and use GIT between work and home and have two different unity versions even but have never seen that issue.
     
  5. Leviathan1753

    Leviathan1753

    Joined:
    Feb 15, 2014
    Posts:
    13
    It's happened again on a freshly downloaded setup with new windows (decided it was time for an OS wipe anyway)

    One interesting thing I'm seeing is that in Unity -> Preferences -> External Tools -> the "Add Unity Proj's to .sln" is greyed out, which is exactly the problem. The Extenal Script Editor points to my Visual Studio 2015, and it doesn't have much info as to why adding projs to sln greyed out.