Unity Project doesn't have solution file

11,536

Solution 1

I finally found the answer.

I closed Xamarin and inside Unity went Assets > Sync MonoDevelop Project Doing this created the two .sln projects: -csharp.sln and .sln

Solution 2

If "Open C# Project" doesnt create the .sln file, try updating your external tools first.

In Unity, go to Edit > Preferences, and make sure that Visual Studio is selected as your preferred external editor.

This created the sln file for me.

Solution 3

For people looking for answers on newer versions of Unity you may have to build your C# project.

To do this go into File > Build Settings then select the option Create Visual Studio Solution. Then build that and your file explorer will ask you for which folder you want your visual studio solution to be placed into. Then Visual Studio should behave correctly.

Share:
11,536

Related videos on Youtube

aakpro
Author by

aakpro

I am an iOS engineer.

Updated on June 05, 2022

Comments

  • aakpro
    aakpro almost 2 years

    I just started learning unity and I created a project. But my project doesn't have a sln file included in. Every time I create a C# script and open it in Xamarin Studio I can't have any intellisense.

    1. Is it normal not to have sln file in unity project?
    2. If not, how can I add solution file to project?
    3. Why that happened?
  • Jimbali
    Jimbali over 8 years
    On Unity 5 OS X it is Assets -> Open C# Project
  • thehelix
    thehelix over 4 years
    Open C# Project should be it's own answer. There's a problem with my installed version of Visual Studio, so Unity is failing this step. Open C# Project generated the sln for me, I just open it manually.
  • sab669
    sab669 about 4 years
    If it is already selected to Visual Studio and you're still experiencing this problem, try clicking "Browse", then select Notepad (or some other application), then set it back to Visual Studio and that should solve the issue.
  • HappyGoLucky
    HappyGoLucky over 3 years
    Switching External Script Editor = Visual Studio Code created the sln for me
  • CPearson
    CPearson over 2 years
    This was the solution to my problem, (I was unable to pull up solution, and if I opened a C# file, the UnityEngine namespace wasn't recognized. Thanks.