Search Unity

Unity5.2 Visual studio 2015 out of the box support...

Discussion in 'Windows' started by twDuke, Sep 8, 2015.

  1. twDuke

    twDuke

    Joined:
    Nov 18, 2012
    Posts:
    6
    So I was excited when i read about default use of VS2025 CE, happily downloaded unity 5.2 installed VS alongside.

    I open my "old" 5.1 project ready for some out of the box VS support, so mono develop is still set as External script editor, OK VS is not available as an option in the drop down for selecting external editor.. No big deal i just set it manually to
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe

    OK, so now visual studio loads when i click the script files. But moving between unity and VS causes constant "sln file has been changed by external program, do you want to reload" prompts, they are not related to any specific action, i don't add any new files from unity and still this prompt.. Also whenever i close a file in vs and reopen it by clicking in unity, i get "the line endings are inconsistent, should we fix them..." . No sign of any neat integration yet.
    After a quick google it seems i must install Visual Studio 2015 Tools for Unity, alright looks like i missed something. OK done! Nothing changed, same irritating prompts.
    Also according to this
    https://msdn.microsoft.com/en-us/library/dn940020.aspx
    I should be able to see Unity Project Explorer from VS, not visible in my view menu, same with Unity Error List.

    So after reading this
    http://unityvs.com/documentation/native-support/
    it tells me I should have this text in the bottom left corner, which I don't .

    What I have tried:
    *Repairing VS tools for unity
    *Creating a brand new unity project.

    Was excited bored now.

    Anyone have any ideas what to try next?
     
    Last edited: Sep 9, 2015
  2. MotoSV

    MotoSV

    Joined:
    Mar 4, 2015
    Posts:
    23
    These are the steps I take in order to view the Unity Explorer:

    1) Start Unity
    2) In the opening dialog enter the details for a new project
    3) Click the Asset Packages button below the 3D and 2D options
    4) Select Visual Studio 2015 Tools from the list of packages
    5) Click the Create Project button
    6) In Unity, open the About window and look for Microsoft Visual Studio Tools for Unity 2.1.0.0 enabled in the bottom left
    7) In the Project panel create a new script file
    8) Double-click that script file to open it in Visual Studio
    9) You should see the Unity Project Explorer option in the View menu

    One other thing to check is:

    1) Open Visual Studio 2015
    2) Go to Help\About Microsoft Visual Studio
    3) Scroll to the bottom of the list and look for Visual Studio Tools for Unity 2.1.0.0

    If you can't see that then there might be an issue with the tools integration.

    UPDATE #1:

    If you have an existing project where you didn't select the Visual Studio 2015 Tools package from the New Project dialog, then you can open that project, right-click somewhere in the Project panel, go to Import Package from the context-menu and you should see Visual Studio 2015 tools
     
    Last edited: Sep 9, 2015
  3. twDuke

    twDuke

    Joined:
    Nov 18, 2012
    Posts:
    6
  4. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,252
    I already had VS 2015 RTM installed. I just upgraded from Unity 5.1 to 5.2.0f3 and I just had to double-click on a C# script from Unity for it to open in VS. I make no other changes, just upgraded Unity.
     
  5. MotoSV

    MotoSV

    Joined:
    Mar 4, 2015
    Posts:
    23
    @twDuke That is a good point. When they said it was integrated I thought it was more of "it comes pre-installed", but I've just tried a sample project without including the package and I still see the Unity Explorer. My previous post then could be considered the "old way" of doing it.
     
  6. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    Cool, so I am not only one with problems.

    I had to manually select devenv.exe since it did not show up in Unity Preferences.
    About does not show the info mentioned by MotoSV, with or without the "Visual Studio 2015 Tools" package imported.

    In VS the Unity Project Explorer is missing but I do have the Attach Unity Debugger. None of the shorcuts mentioned here works, https://msdn.microsoft.com/en-us/library/dn940020.aspx
     

    Attached Files:

    • 00.jpg
      00.jpg
      File size:
      65.9 KB
      Views:
      884
    • 01.jpg
      01.jpg
      File size:
      134.1 KB
      Views:
      868
  7. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    Turned off Firewall (noticed a lot of popups before which I kept blocking), Resintalled VS2015, Restarted puter.

    Working now without the need for the "Visual Studio 2015 Tools" package in project.

    I see the info in Unity's About and when I open the solution via Unity > Assets > Open C# Projecti see the Unity Project Explorer in VS > View menu.
     
  8. SpawnOfLinkTIS

    SpawnOfLinkTIS

    Joined:
    Jul 3, 2013
    Posts:
    9
    I wanted to drop a note here after a few hours of troubleshooting.

    After installing Unity, VS 2015, and VS Tools, if you do not see the info in the About, restart your computer. That seems to be the one thing that fixed it for me. I think the installer should recommend a restart after completion, because this was unexpected.

    Additionally, elsewhere I saw users having issues with ReShaper, this was not the case for me as I do not have it installed.