Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
13
Question by Sonoshee · Sep 20, 2015 at 07:22 PM · editorvisual studio

How to generate .sln files in Unity 5.2 ( no Sync MonoDevelop Project option anymore)

In the latest version of Unity ( 5.2) there is no "Assets > Sync MonoDevelop Project" in the menu like before, only "Open C# Project".

I use Sublime Text and I need to be able to generate those .sln manually so that OmniSharp reads them and generate Auto-completion and other IntelliSense features for the project. How can I do that?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
7

Answer by kakysha · Mar 29, 2018 at 11:53 AM

It is NOT working for me in Unity 2018 with Sublime Text 3. "Open C# Project" just opens empty file with no name and does not generate anything.

To RE-GENERATE solution (*.sln) and project files you have to:

1) switch back external script editor to Visual Studio 2) Assets -> Open C# Project - at this stage .sln and .csproj should be generated 3) switch back to sublime as external editor.

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sonoshee · Mar 29, 2018 at 12:28 PM 0
Share

Do you have Sublime Text set as your external script editor? I haven't checked with 2018 but I always have VS as my external script editor and I open Sublime Text manually. This way it seems the .sln is updated automatically without me having to "Open C# Project" every time.

avatar image kakysha Sonoshee · Mar 29, 2018 at 01:08 PM 0
Share

yes, I do have sublime configured as script editor in Unity, but it seems that it causes some troubles with rebuilding sln and csproj files. $$anonymous$$aybe I should switch back to vs and open sublime manually.

avatar image huulong · Apr 29, 2018 at 10:37 PM 0
Share

Of course if you don't have Visual Studio (e.g. on Linux), you should set another IDE like $$anonymous$$onoDevelop.

avatar image KwahuNashoba · May 10, 2018 at 11:32 AM 1
Share

This did not worked for me, I use VS Comunity 2017 as my primary ID$$anonymous$$ I had to open project with Unity 2017, open any scrypt from Unity by double clicking it so it creates solution and than I open project with Unity 2018.

avatar image Velo222 KwahuNashoba · May 13, 2018 at 01:58 PM 0
Share

$$anonymous$$wahuNashoba's comment worked for me! I simply opened up my Unity 2018 project with Unity 2017. The .sln project files were generated when opening any script in Unity 2017. Then simply reopen the project with Unity 2018, and it works.

avatar image theness_ · Jun 04, 2018 at 07:53 PM 0
Share

had the same problem while working with visual studio as the editor. had to switch to $$anonymous$$ono Develop -> Open C# Project -> Switch back to visual studio..

avatar image Regent2203 · Aug 18, 2018 at 04:37 PM 0
Share

This worked for me. Had no .sln file in my new project. So, I switched to VisualStudio in Edit->Preferences->ExternalTools, opened once (VS created me solution), then I switched back to $$anonymous$$onoDevelop and it has .sln file now.

Show more comments
avatar image
2

Answer by daklab · Jan 24, 2016 at 06:29 PM

I use SublimeText too.

Assets > Open C# Project

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image idbrii · May 18, 2016 at 06:32 AM 2
Share

It's worth mentioning that this might appear to have no effect if you're not using VS/$$anonymous$$onodDevelop like SublimeText (I use vim and it just opens vim but doesn't pass a filename), but it does generate the sln file.

avatar image LocalNoob idbrii · May 07, 2020 at 11:16 PM 0
Share

Not every day do you see a fellow vim user round these parts.... I am not sure what you meant by it generates sln files. For me I have to initially run Assets -> Open C# Project (have my external editor set as $$anonymous$$onoDevelop just for this purpose) that generates solution files initially and then i just use vim for editing and solution files update automatically by unity. It is a pain this first step, how do you generate solution files??

avatar image idbrii LocalNoob · Jun 30, 2020 at 03:44 PM 0
Share

@localnoob Back then I think I was using Unity 5. I'm now on Unity 2019 and I've come back to find out why my sln is not being generated.

I guess they broke it somewhere along the way.

avatar image
1

Answer by Flexford · Mar 16, 2020 at 09:16 PM

I'll just leave it here... alt text

I made utility: SyncSolutionUtilities

Examples:

-Use from editor: Unity menu -> Assets -> Sync C# Solution

-Use from script: SyncSolutionUtilities.Sync(bool logsEnabled)

Download


syncsolutionutilities.zip (986 B)
screenshot-1.png (24.2 kB)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image idbrii · Jun 30, 2020 at 03:54 PM 0
Share

Screenshot source: https://github.com/Unity-Technologies/UnityCsReference/blob/master/Editor/$$anonymous$$ono/CodeEditor/SyncVS.cs

(Also, this answer is the best answer.)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 2019.4 Visual Studio not opening! 2 Answers

Visual Studio window pops in front whenever I create or move a C# script. 0 Answers

Why is editor stack when VS2019 attach to unity?,Editor is stack when VS2019 attach to unity. Why? 1 Answer

Open script in existing instance of VS 0 Answers

Unable to integrate Visual Studio 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges