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

Visual Studio 2013 crashes when opening Unity 3D project? (C#)

Discussion in 'Editor & General Support' started by sharpener, Jan 6, 2015.

  1. sharpener

    sharpener

    Joined:
    Jan 6, 2015
    Posts:
    8
    I'm not sure if this is the right forum for this question but I didn't see a C# developer forum.

    I'm trying to load an existing Unity 3D project into Visual Studio 2013 Ultimate. Every time I do it crashes. Before VS2013 automatically restarted, I managed to see an "Unsupported Project" warning with a reference to this project element:

    Assembly-UnityScript-firstpass.unityproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=C58B1F1F-8686-7922-EDE1-281471AD9A9E

    Thinking it was an Extension issue I downloaded and installed the Visual Studio 2013 Tools for Unity 3Dextension. That did not help. Has anyone encountered this problem?
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I don't think VSTU is meant to open a Unity project. I think it's meant to let you use VS for editing and debugging c# script. I've never read the documentation, but where does it say VSTU will open a project?
     
  3. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
  4. sharpener

    sharpener

    Joined:
    Jan 6, 2015
    Posts:
    8
    Hello Graham,

    I should have clarified this. I'm not trying to open a Unity 3D project but a Visual Studio solution that contains Unity 3D C#. Unless Unity 3D names it's projects with the *.SLN extension I assume that the file I'm trying to open is a Visual Studio project?
     
  5. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Sounds like there is something goofy with the solution... Visual Studio shouldn't be trying to open the .unityproj file at all. It should be opening the regular project files via the solution. I've been using VS2013 Ultimate along with Unity (3.5 through 5) without issue. However, Graham did hit on something... rather than just opening the .sln in Visual Studio you should install UnityVS and use it (it's now called Visual Studio Tools for Unity). Once you import the unitypackage for it, you'll have an editor menu that allows you to generate the Visual Studio project files. Do that and then open it in Visual Studio. This will allow you to get better intellisense and debug from within Visual Studio as well.
     
  6. sharpener

    sharpener

    Joined:
    Jan 6, 2015
    Posts:
    8
    Thanks Dustin. My guess is that the Unity project I had was a solution generated using the procedure you mentioned for generating a VS solution. However, It turned out that trying to open that Visual Studio project mucked something up so bad, I couldn't open any VS solution file after that, Unity or otherwise (i.e. - VS became useless except for simply loading the IDE). Fortunately I was at update 3 and installing update 4 fixed the problem. I'll have to make another go at it but I'm waiting for a new external hard drive to do an image backup first, in case the solution opening problem happens again.
     
  7. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Iteresting, sounds like something might have gotten hosed with the VS cache but there's nothing your Unity project could have done to cause that. It was most likely coincidental and the result of another update that happened on your machine.
     
  8. Joacim

    Joacim

    Joined:
    Apr 13, 2015
    Posts:
    10
    Yes I just had the same problem. In my case it was because I accidentally loaded the Visual Studio 2015 tools for Unity package. This changes the solution to a VS 2015 solution which can't be opened in VS 2013.