Search Unity

Unity4.5 with Visual Studio Express 2012?

Discussion in 'Scripting' started by pretender, Aug 26, 2014.

  1. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    Hi! I am trying to make this happen, but no luck. I returned to windows after awhile working on mac and I want to take advantage of it and use VS.

    I tried to setup it up using Windows 7, Unity4.5 and VS Express 2012. I use 2012 because of Windows 7
    Sync project gives me sln file which VS says its incompatible, and can't be used. I also downloaded VSTools unity package and that generates sln file but also can't be opened.

    What is the proper setup for this, all I could find seems straightforward but in my case it isn't!

    Thanks!
     
  2. Polymorphik

    Polymorphik

    Joined:
    Jul 25, 2014
    Posts:
    599
    Did you change the External Scripting Editor to VS?
     
  3. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    Yes, it can open individual files, but project file no
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    You probably downloaded the wrong VS version. You need Visual Studio 2012 Express for Desktop.
     
  5. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    That is exactly what I have...that is why i am frustrated because it seems that it is fairly easy to setup, but i tried everything i could find on the internet and it doesn't work!
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Could you press Help -> About in Visual Studio and post the screenshot of it here?
     
  7. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    Ok, here it is! Thanks for looking into this! (also it says that it expires, i thought express version is free?)

    forum.png
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Alright, the VS version seems to be good indeed.

    What could you paste the contents of Visual Studio output window after it fails to open the project?
     
  9. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    Ok, here it is!

    forum.png
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Looks like it's trying to open them as UnityVS projects, but that requires Visual Studio Professional or higher. Could you uninstall UnityVS, reboot your PC, then go to Edit -> Preferences -> External Tools -> External Script Editor and select Visual Studio 2012 there and try to double click the script again?
     
  11. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    Ok!

    I did what you said and this happens:
    - on double click script opens, but not solution (intellisense doesnt work)
    - again on double click script opens but on other instance of VS (intellisense doenst work)
    - if i sync monodevelop project it opens again in new instance with three solutions loaded properly and two incompatible (check out the image), i am not sure what solution to use, to open scripts from? Assembly-CSharp,Assembly-CSharp-editor or Assembly-CSharp-firstpass (There are inconsistences in what all of those contain...)
    - if I open Assembly-CSharp (which seems to have all files) intellisense works but double clicking script opens new instance...

    is this setup how it should be? thanks again!

    forum.png
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Assembly-CSharp and Assembly-CSharp-firstpass contain the scripts for the game, while Assembly-CSharp-Editor contains the scripts that will only be used in the editor. You shouldn't modify these projects - though, intellisense should work fine for modifying the scripts.

    I'm not sure what are the "FlipIt" projects - did you add them yourself or were they generated?
     
  13. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    I think flipit projects are solutions generated with unityvs that doesn't work.

    So double clicking script in unity is the way to go? Is there a solution to prevent multiple instances of vs? Or to make it work like in monodevelop?

    Thanks
     
  14. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Which exact Unity version are you on? I'm pretty sure this was looked at in a recent patch release. If you're below 4.5.3, it might be worth updating.
     
  15. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    Ok, i updated Unity to latest 4.5.3p2

    when i double click the script it opens in VS but intelisense isnt working, and double clicking again opens new instance :(
    syncing project gives me intellisense but double clicking opens new instance :(

    so only way i see it is to sync project and open script from VS...damn! i wish these basic things are working just like with monodevelop
     
  16. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    also, is it possible to get inline help for unity from VS?