Search Unity

Visual Studio Tools for Unity 2.2

Discussion in 'Code Editors & IDEs' started by jbevain, Feb 4, 2016.

  1. mirlix

    mirlix

    Joined:
    Jun 2, 2011
    Posts:
    7
    I assume you still have the UnityVS DLLs in your project? In Windows this is no longer needed, as they are automatically loaded. If you want to use the UnityVS tools on Mac, you need to add the DLLs to the project and you will get the menu, but only on Mac.
     
  2. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    00christian00 and MV10 like this.
  3. TJClifton

    TJClifton

    Joined:
    Apr 26, 2016
    Posts:
    16
    I have also been hit by this issue. Whilst I can understand why the option has been removed it is not entirely transparent that the current behaviour is working as expected. The window flashing and disappearing gives every sign of something being broken. I've spent a good while googling this issue before I came across this thread.

    To give my use case for this, I develop packages for the Unity Asset Store. One of my selling points is the comprehensive documentation I attempt to provide, which I achieve through heavy use of XML Comments. I generate my documentation using the old Sandcastle utility and for that I require xml documentation which I generate by modifying the build events in the project properties of my Unity projects.

    I appreciate that these settings are going to get lost when the project gets regenerated but for me this isn't a major issue - ticking a couple of boxes again before generating my documentation isn't a massive hit for me, particularly as its a task I only perform once a month or so.

    Removing this ability has wasted a day or so of my time, specifically when I am trying to push a new release out which is the most frustrating thing.

    For now I will probably attempt to move back to the old VSTU to move past this issue. It's a shame because I've been a massive fan of VSTU for a long time. If you intend to keep the current behaviour (which I agree might be nice to have on some sort of toggle) then it would be nice to make it clear what is happening. If I double click on my project properties, my expectation as a user is that the appropriate properties are displayed to me. Anything that deviates from that expected behaviour provokes an initial reaction that this is a bug (particularly when it looks glitchy). Could you not display some error dialog explaining that the user is not allowed to edit the properties and that this is intentional?

    And lastly if this is the desired behaviour and you intend to keep it as such, what would be your proposed solution for my scenario? I need to modify the debug settings to generate an xml file and then run a build. Obviously I could do this by cracking open the properties in notepad and running a build but it is not exactly the most convenient solution. Open to suggestions.

    Cheers
    Tom
     
    jimena_who and fantastisch_ like this.
  4. Erhune

    Erhune

    Joined:
    Sep 12, 2012
    Posts:
    7
    I use a lot of conditional compilation symbols in my projects, and I'm used to change them in Visual Studio project properties when I want to enable this or that piece of code. I know they won't be persisted, but that has never been an issue for me. Now, I have to spend 20x more time on the same workflow because I need to change compilation settings in Unity, regenerate the solution, reload it in Visual Studio... over and over again.

    I understand the rationale of preventing fiddling with project settings, but please can you at least let us enable that in VSTU settings?
     
    fantastisch_ and TJClifton like this.
  5. JakeTBear

    JakeTBear

    Joined:
    Feb 15, 2014
    Posts:
    123
    I wasn't able to debug with 2.2, for a couple days I tirelessly looked for a solution, I reinstalled Unity and Visual Studio, twice. Looked everywhere, I read every single post that mentioned "Visual studio debug unity", I was about to give up.

    The problem started when I had to reinstall Visual studio to include Xamarin, for some odd reason that failed and then I had to get an ISO with it, I made it work and all but I had to also reinstall Visual Studio tools for Unity (2.2).

    So apparently I was using 2.1 before and I never attempted to upgrade, thanks to @alexzzzz who posted a link to 2.1 I was able to get debugging back, like magic really...

    Why would this happen? why is debugging not working with 2.2 but works perfectly in 2.1? Visual studio says "Attach to unity", it builds and all but it simply goes back to normal without entering debug mode.

    Sticking to 2.1 for now since it works, but I dont want to be afraid of updating, please any insight would be appreciated :)
     
  6. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    @JakeTBear I had this issue as well and turned out that if your Unity installation folder is not named "Unity" then 2.2 behaves as you mentioned.

    I was renaming my installation folder to include the Unity version. I guess that was throwing something off.
     
  7. JakeTBear

    JakeTBear

    Joined:
    Feb 15, 2014
    Posts:
    123
    @jprocha101 My folder is properly named and it is the only 64 bit version I have currently installed, it seems that I was experiencing the same issue even with 2.1.

    I even uninstalled the 4.6 version I had, but the solution was even simpler than that, I reinstalled 2.2 and I ran unity as an administrator. And it works, it seems that Windows updated some security things which was blocking the communication. What exactly, I have no idea.

    Thanks for the input though, I hope this information helps any dev in the same predicament.
     
  8. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Is there a way to tell which version of VSTools I have installed?
     
  9. JakeTBear

    JakeTBear

    Joined:
    Feb 15, 2014
    Posts:
    123
    @TokyoDan if you open the help/about unity and if you have visual studio enabled as your IDE it will tell you on that window on the bottom left side which version you have installed.
     
  10. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    It's 2.2.0. Thank you!
     
  11. jbevain

    jbevain

    Microsoft

    Joined:
    Feb 22, 2012
    Posts:
    141
    Hi all,

    We shipped VSTU 2.3 today. Mainly it fixes the conflict with Xamarin that prevented us to attach the debugger.

    Also, and as discussed with the folks in this thread, we added an option for the most savvy people here with particular workflows who need to modify the generated project properties.
     
  12. jimena_who

    jimena_who

    Joined:
    Aug 1, 2016
    Posts:
    4
    Trying to change the target framework but properties window will not open, is there a proper way to do this? I tried opening the project file and changing the code but it feels a little risky to do that for all of my projects etc... really annoying :/
     
  13. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,447
    1. Update VSTU to 2.3
    2. Enable access to the project properties page.

    Sketch.png
     
  14. jimena_who

    jimena_who

    Joined:
    Aug 1, 2016
    Posts:
    4
    yey! Thank you, by the way I read very arrogant comments in here from very experienced developers and I would just like to comment that I understand the frustration of having something working and suddenly finding out it's not; but I think you tend to overrate yourself in a bad way as if "why u mess with my greatness in order to help the stupid ones?" and oh well, kind reminder that we were all stupid at some point (in my case, I still am) so no need to be mean for a simple fix==bug. Treat people the way you would like your computer to treat you :D bye...
     
  15. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Unity Project Explorer

    Would be nice if this had a context menu to open the folder in explorer. And a search filter would also be pretty good in it. Like the same as Unity Project tab
     
  16. Gru

    Gru

    Joined:
    Dec 23, 2012
    Posts:
    142
    Hello,

    I am having issues with 2.3 and VS 2015 Update 3. The problem is the newly created files don't trigger project reload in case I open them just after creation. After creating a new script with Unity, if I click back into VS without opening the new file the expected "Reload All" dialogue appears. If I instead open the new file without going back to VS first, I don't get that dialog and there is no Intellisense in the new file. Opening/Closing VS also solves the issue.

    I have tried reinstalling VSTU 2.3 and clearing the .suo file. Right now I suspect it's either the upgrade to VS Update 3 or VSTU 2.3 which I did at about the same time.

    Please provide the fix ASAP or a link to 2.2 as it seems here https://visualstudiogallery.msdn.microsoft.com/8d26236e-4a64-4d64-8486-7df95156aba9 we can download only the latest version.
     
  17. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,447
    I can't reproduce it (VS 2015 Update 3 + VSTU 2.3). "Reload All" always appears.

    Anyway, VSTU 2.2 for 2015
     
  18. Gru

    Gru

    Joined:
    Dec 23, 2012
    Posts:
    142
  19. scottlaforge

    scottlaforge

    Joined:
    Mar 12, 2013
    Posts:
    42
    I'm confused. What is the best practice for adding dll references so that I can use them in Visual Studio Community 2015? I can no longer add them in Visual Studio. I've added the dll files into the Unity Plugins folder. They get added to a build, but I cannot reference them in VS to actually do any scripting. Any help would be greatly appreciated.
     
  20. heroichippo1

    heroichippo1

    Joined:
    Mar 30, 2015
    Posts:
    36
    https://msdn.microsoft.com/en-us/library/dn940021.aspx

    this article shows how to modify the project files that Unity generates in the solution, but i'm wondering if it's possible to add a new project to the solution.

    I'd like to have Unity add an NUnit 3 project to the solution separate from the Editor project.

    i.e. instead of this in the .sln...

    Code (CSharp):
    1. Microsoft Visual Studio Solution File, Format Version 12.00
    2. # Visual Studio 2015
    3. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TenacityDemo.Plugins", "TenacityDemo.Plugins.csproj", "{C345BE8D-9A4E-B2E0-E9E4-940EBC64E4C6}"
    4. EndProject
    5. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TenacityDemo", "TenacityDemo.csproj", "{859A91D0-E4B5-AB59-50BF-ED832894C406}"
    6. EndProject
    7. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TenacityDemo.Editor", "TenacityDemo.Editor.csproj", "{577A038F-563F-90E4-74EF-BE671D5FDCB7}"
    8. EndProject
    I would like the .sln to contain something like this...

    Code (CSharp):
    1. Microsoft Visual Studio Solution File, Format Version 12.00
    2. # Visual Studio 14
    3. VisualStudioVersion = 14.0.25420.1
    4. MinimumVisualStudioVersion = 10.0.40219.1
    5. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TenacityDemo.Plugins", "TenacityDemo.Plugins.csproj", "{C345BE8D-9A4E-B2E0-E9E4-940EBC64E4C6}"
    6. EndProject
    7. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TenacityDemo", "TenacityDemo.csproj", "{859A91D0-E4B5-AB59-50BF-ED832894C406}"
    8. EndProject
    9. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TenacityDemo.Editor", "TenacityDemo.Editor.csproj", "{577A038F-563F-90E4-74EF-BE671D5FDCB7}"
    10. EndProject
    11. Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TenacityDemo.Tests", "TenacityDemo.Tests.csproj", "{8EDF4429-251A-416D-BB68-93F227191BCF}"
    12. EndProject
    Any sample code or help would be appreciated.
     
  21. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    A better way to do it would be to create your own separate solution and add your projects and the unity generated project to it. That might work.