Search Unity

Unity Visual Studio Express 2013

Discussion in 'General Discussion' started by Aurecon_Unity, Oct 18, 2013.

  1. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    I just noticed that Microsoft have released the 2013 version of Visual Studio Express.

    I know that the Express version doesn't integrate quite as deeply with Unity as the Pro version, are there any plans to change this? ie - being able to double click scripts to launch Express 2013.

    Thanks
     
  2. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    You can define an editor to open scripts with so you shouldn't have any issue using express. I'm using Visual Studio 2013 Ultimate RTM and not having any issues.
     
  3. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    It's been like this for a long time, you cannot double click to open scripts from within Unity to open visual studio express. This is Visual Studio Professional and up only. I would assume it's because of the limitations of VS Express, so I doubt they can change it.

    Only Visual Studio Pro up are compatible with this feature unfortunately.
     
    Last edited: Oct 18, 2013
  4. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    Not true, you can double click in Unity to open scripts in Visual Studio Express versions. It does require some fiddling though.
    Note I have only tested this in VS C# 2008 Express and VS C# 2010 Express.

    First you need ClassExec.exe, which you can get here: http://fvue.nl/wiki/ClassExec#Download
    Then, unzip it, and place the folder somewhere you won't delete it.
    In the folder, create a text file and put this in it:
    Code (csharp):
    1. Start "" %1
    2. "<path>\classexec.exe" %1 --class .cs
    Then save the file as a .bat

    Use this .bat as your 'script editor' in Unity, you may need to change the little file type box when searching for it in the file browser.
    You may need to make sure your project is synced with VS, which you can do through Assets->Sync MonoDevelop (it actually just rebuilds the .sln's)

    You will also need to make sure your VS is the default application for opening .cs files.

    Relatively straight forward, and once it's done you don't need to touch it again.
     
  5. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    I stand corrected! That is a neat trick, thanks for that :).
     
  6. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    No problem at all! It makes using Visual Studio Express a much more viable alternative to MonoDevelop. My workflow has improved no end since switching to VS with this little workaround :)
    Of course, the Pro editions have many benefits, like jumping to line numbers, and even debugging if you use http://unityvs.com/ :)
     
  7. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Unfortunately the jump to line number doesn't always work in 2013 Ultimate :/ not sure why. But if you learn the keyboard shortcuts for Visual Studio it will launch your productivity even further. I just let the files open and then:

    Ctrl-G (goto line): then enter line number
     
  8. MarkrosoftGames

    MarkrosoftGames

    Joined:
    Jan 5, 2012
    Posts:
    442
    what benefits are there to using vs over md? i feel like my old computer would take a big hit by installing visual studio and all its requirements, so i wouldn't want to do it for no real good reason.
     
  9. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    It really depends on what you're doing. For me, Visual Studio offers a lot of advantages. The first is that I use it on a daily basis for non-Unity projects as well so I'm familiar with the interface and toolset. It has better intellisense and just a better overall feel than MonoDevelop does imho. I also use VS 2013 coupled with TFS 2013 and am actively using many of the new features such as CodeLens so I can built unit tests and easily discern code coverage and see test results right from my source (not to mention change history on a per-method basis without having to look it up). On the negative side, Visual Studio doesn't connect up and natively debug like MonoDevelop does for Unity applications.
     
  10. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    I just prefer it as it's the environment I learnt to code in and it's never let me down really.
    I find it crashes a lot less than MonoDevelop, and copes with large path lengths better too. I think it's Intellisense is better but that may just be personal opinion.
     
  11. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    I find VS2012 + UnityVS is reasonable, to be honest the MS toolset feels quite primitive coming from IntelliJ though. A little like trading in your harley for a marin :).
     
  12. rbnzdave

    rbnzdave

    Joined:
    Aug 17, 2013
    Posts:
    2
    Yeah I agree, just got express hoping it was going to be acceptable but not planning on hoops, mono isnt too shabby for a free editor, but its no intellij. Not sure if its worth shelling out on vs and resharper (which no doubt is the reason they havent made intellij do c# files), tho I'd not touch vs without a little jetbrains sparkle, but oh well. guess i'll have to stay in mono.
     
  13. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    You just necro'd a thread from 6 months ago.
     
  14. MarkrosoftGames

    MarkrosoftGames

    Joined:
    Jan 5, 2012
    Posts:
    442
    you just bumped a necro'd thread
     
  15. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Nonetheless, now that it's here it's worth pointing out that some fellow in the Scripting section a few weeks back wrote and shared a VS Express integration batch script that works remarkably well. It doesn't offer full integration, but it does hook up more than I tended to use in MonoDevelop anyway. That and not having MonoDevelop's bugs mean I've been using it at home for a while and loving it.
     
  16. sphericPrawn

    sphericPrawn

    Joined:
    Oct 12, 2013
    Posts:
    244
    If you're a student you can sign up for MS's dreamspark program which will get you a free copy of VS 2013 Professional.
     
  17. Sir-Tiddlesworth

    Sir-Tiddlesworth

    Joined:
    Oct 19, 2011
    Posts:
    908
    But why get VS Professional when you could just get Ultimate?
     
  18. Redtail87

    Redtail87

    Joined:
    Jul 17, 2013
    Posts:
    125
  19. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
  20. takito

    takito

    Joined:
    Apr 15, 2013
    Posts:
    11

    Go to your project folder and open the project file (example: Documents/Unity Projects/myProject)

    In there you will see the Assets Library etc. folders in there you will also see the .sln files usually with your project name on it (example: myProject.sln). Open that file with Visual Studio 2013 and you'll notice all this file icons change to vsC#.

    Now go and open Unity and go to you Edit>Preferences>External Tools>External Script Editor>Browse and find that same file as in the previous example. In my case it was Documents/Unity Projects/myProject and chose the .sln file.

    If you cant see it just make sure your File Name is set to All Files.

    Now you should be able to open you c# scripts from unity and also get intellisense you know all the good stuff.

    hope this helps
     
  21. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,191
    Sorry, but doesn't your solution require you to change the external script editor to a new file every time you work on a different project? I suppose if you're only working on a single project for an extended length of time this is a decent solution, but for something that will work with different projects, one of the other solutions would be better.

    Personally, I also use http://www.pipefantasy.com/?p=1303. If using this, there are a couple of issues that may crop up. If they do, read the comments section, as all of the issues are solved there.