Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice

Help Wanted Visual Studio keep closing program

Discussion in 'Editor & General Support' started by white_comet, Jan 5, 2022.

  1. white_comet

    white_comet

    Joined:
    May 2, 2021
    Posts:
    32
    Hi! Does anyone knows why Visual Studio keep suddenly closing when coding for Unity and how to fix it?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    24,741
    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.

    Other times it requires you also nuke the userprefs and .vsconfig and other crufty error files that Visual Studio tends to accumulate and damage over time. Then try the above trick.

    Barring all that, move on to other ideas:

    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. white_comet

    white_comet

    Joined:
    May 2, 2021
    Posts:
    32
    I tried the methods above for Visual Studio still auto close

    this is how Visual Studio close
    https://youtu.be/C6536hLYLmQ
    do you think my computer need more ram?
     
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    1,079
    How much RAM does your computer have? Have you monitored RAM usage while Visual studio opens?
     
  5. white_comet

    white_comet

    Joined:
    May 2, 2021
    Posts:
    32
    4.png 4.png
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    13,334
    @white_comet 8Gb is barely enough but I wouldn't expect a crash. How does it behave if you launch Visual Studio separately without Unity running?
     
  7. white_comet

    white_comet

    Joined:
    May 2, 2021
    Posts:
    32
    still crash. Is not new installed. I have it long time ago, just keep crashing recently
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    13,334
    Got it. You might consider reinstalling Visual Studio from their website. During the install, I believe there is a Unity option you should select, it's been awhile for me too. I'm using VS 2019 here myself.
     
  9. white_comet

    white_comet

    Joined:
    May 2, 2021
    Posts:
    32
    Thank you! Looks Okay now after reinstall to Visual Studio 2022
     
unityunity