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. Dismiss Notice

Unity 2019 & visual studio solution trouble. Custom added project removing after unity restart

Discussion in 'Editor & General Support' started by RD_Dev, Jan 6, 2022.

  1. RD_Dev

    RD_Dev

    Joined:
    Jun 25, 2013
    Posts:
    10
    Hi.

    I have a custom csProj.
    I manually adds it to solution for more comfortable work with it.
    csProj compiles to the DLL and places to my project Subfolder automaticaly.
    But after restarting unity and VS my csProj disappears from solution.
    My colleagues have such problems with Unity and Rider, but on my old computer with VS 2019 anything worked well.

    May be I need to change something on preferences or VS setting.
    I Have a visual studio community 2022 from microsoft.com, not from unity installer.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,719
    Nothing you add in Visual Studio is going to "stick." Unity will always wipe out the solution and project files and regenerate new ones according to what is in the Unity side of your project.

    You need to do 100% of your adding projects and references withiin Unity, then use Assets -> Open C# Project to see it in Visual Studio.

    Remember: you do NOT need any IDE or compiler to use Unity. It is NOT part of the development toolchain. Unity is the full toolchain. You could simply edit all scripts with Notepad or even
    vi
    if you want.

    This may help you with intellisense and possibly other Visual Studio integration problems:

    Sometimes the fix is as simple as doing Assets -> Open C# Project from Unity. Other times it requires more.

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

    Also, try update the VSCode package inside of Unity: Window -> Package Manager -> Search for Visual Studio Code Editor -> Press the Update button

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. RD_Dev

    RD_Dev

    Joined:
    Jun 25, 2013
    Posts:
    10
    <<**SOLVED**>>
    In this case, all works well:
    upload_2022-1-11_10-4-23.png

    Custom project stays in solution
    ===>>
    upload_2022-1-11_10-5-4.png

    May be it affects:

    upload_2022-1-11_10-10-52.png
     

    Attached Files:

    Last edited: Jan 11, 2022
  4. RD_Dev

    RD_Dev

    Joined:
    Jun 25, 2013
    Posts:
    10
    Update:
    Unity 2020.3.27f1 LTS
    +
    Microsoft Visual Studio Community 2022 (64-bit)
    Version 17.0.5

    Anything works fine:
    2022-02-08_12-47-55.png