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

Bug .csproj file is not supported in C# Dev Kit (IDE: VS Code)

Discussion in 'Editor & General Support' started by InsomAniac_PTSD, Jul 20, 2023.

  1. InsomAniac_PTSD

    InsomAniac_PTSD

    Joined:
    Jan 19, 2022
    Posts:
    2
    Hello! I'm InsomAnaic_PTSD
    I try to relearn programming after going through mandatory conscription. So I start with Unity
    but after trying to install and set things up, I found out that C# dev kit extension on vs code does not support .csproj files generated by Unity. how can I fix this? any way to work around this?

    OS: Windows 8.1 (x64)
    Unity: V. 2022.3.3f1
    IDE: VS Code v. 1.79.2
    extension
    - C#: v.2.0.249
    - C# dev kit : v0.2.100

    .NET SDK v.7.0.306
    .NET Framework v.7.4.1 developer pack

    maybe I should reinstall the extension but I don't know which version will work?
    Thank you in advance.
     

    Attached Files:

  2. Farfi55

    Farfi55

    Joined:
    Jul 18, 2016
    Posts:
    11
    I'm not sure how c# dev kit works and what it can handle, but you should be fine using just the c# extension alone for unity
     
  3. InsomAniac_PTSD

    InsomAniac_PTSD

    Joined:
    Jan 19, 2022
    Posts:
    2
    Thank you
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    VSCode is no longer supported. There is a community driven github project where fixes are added to the VSCode plugin or package but I don't have that link.
     
    Kurt-Dekker likes this.
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,563
    Welcome back to the productive non-lethal side of the world. :) I wish you all the best in your recovery from military service and hope that unlike your handle, you are free of both insomnia and PTSD.

    As CodeSmile points out, there is a way to use VSCode, but the official way is Visual Studio.

    Remember you technically don't need either one because Unity does 100% of the compilation when it builds. You technically could edit 100% of your code with Notepad if you wanted.

    Here's the skinny on Visual Studio, some of which may apply to VSCode:

    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 low-value high-hassle files that Visual Studio tends to slowly 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 package inside of Unity: Window -> Package Manager -> Search for Visual Studio Editor -> Press the Update button

    Update: The VSC extension has been deprecated.

    https://forum.unity.com/threads/update-on-the-visual-studio-code-package.1302621/

    There is a community fork available that is receiving updates.

    https://github.com/Chizaruu/com.tsk.ide.vscode

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

    actionf

    Joined:
    Jul 17, 2020
    Posts:
    1
    Disable plugins
     
  7. Lnnewechat

    Lnnewechat

    Joined:
    Aug 24, 2023
    Posts:
    1
    Remove visual studio code editor packge.It has been deprecated.
     
  8. Farfi55

    Farfi55

    Joined:
    Jul 18, 2016
    Posts:
    11