Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Microsoft previews Unity extension for Visual Studio Code

Discussion in 'Code Editors & IDEs' started by simon-elliston-ball, Aug 3, 2023.

  1. simon-elliston-ball

    simon-elliston-ball

    Unity Technologies

    Joined:
    Sep 9, 2022
    Posts:
    4
    We are delighted to announce that Visual Studio Code support for Unity is coming back in a new improved form.

    In June our friends at Microsoft launched the C# dev kit, which gives Visual Studio Code users access to some of the powerful C# tools more familiar to full Visual Studio users. Today, they are opening a preview of the Unity Extension for Visual Studio Code which brings the Unity experience for Visual Studio into Visual Studio Code.

    The extension supports code editing powered by Roslyn for better Intellisense and AI assisted coding, backed up by the Unity Roslyn Analyzers to give you code suggestions specific to Unity. It also helps with debugging, running in the Unity Editor or standalone players. Use the new “Attach Unity Debugger” command in Visual Studio Code, and set a breakpoint to get into the VS Code debugging experience.



    The new Unity Extension for Visual Studio Code is built on the same foundations as the Visual Studio Tools for Unity and the C# Dev Kit. It is also licensed in the same way as regular Visual Studio. This means it is free for individuals, academia, and open-source development, just like the terms that apply to Visual Studio Community. For organizations, C# Dev Kit and its family of extensions are included with Visual Studio Professional and Enterprise subscriptions, as well as GitHub Codespaces. Please refer to Microsoft’s license terms for details.

    Getting Started
    The extensions require Unity 2021 or greater. All you need to do is to install the “Visual Studio Editor” package (version 2.0.20 or above) in your Unity project. Note that you should NOT use the deprecated version for Visual Studio Code. The new extension uses the same backend as the full Visual Studio. If you have the old package installed, it’s best to remove it first.


    Once the Unity side is ready, you can just install the Unity Extension in Visual Studio Code, which will bring in dependencies, including C# Dev Kit and C# extensions if you don’t already have them.

    Don't forget that you can also choose Visual Studio Code as your external script edtor in the Unity Editor preferences under External Tools.
    If you want to learn more about this extension, and provide feedback direct to the Microsoft team, you can do that in the Visual Studio Code editor itself with the Help > Report Issue function. Also check out their blog for more detail on this release.
     
  2. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    24
    Thanks Microsoft for the new debugger.

    Also, "For developers who prefer using a fully featured IDE, we continue to recommend using Visual Studio with the Visual Studio Tools for Unity which together deliver a feature rich development experience tailored to Unity."
     
    Last edited: Aug 3, 2023
    jbevain-msft likes this.
  3. saskenergy

    saskenergy

    Joined:
    Nov 24, 2018
    Posts:
    29
    Just tested it and everything works as expected. It's also pretty fast compared to the previous Unity extension. Huge thanks to the people who worked on this! Now we have an alternative to Rider for Linux.

    It's also cool that it offers syntax coloration for .asmdef, .shader, .uss, and .uxml files. Though it doesn't offer full support, for example, using random variable names in shaders doesn't produce any errors. This is the start at least.

    Can we also have official support for common snippets like this extension? Nothing wrong with it, just makes it very convenient to have all functionality in one extension.
     
  4. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    336
    @simon-elliston-ball since the Visual Studio Editor package can now generate SDK-style project. Please use it for Visual Studio too. While I mainly use Visual Studio, I do have a need to use VSCode side-by-side sometimes. But if I select VSCode as the External Scripting Editor just to regenerate the project files, I can't work normally on Visual Studio until the next regeneration. And it's too annoying.
     
  5. orionsyndrome

    orionsyndrome

    Joined:
    May 4, 2014
    Posts:
    3,063
    Yay great news! I very much respect and appreciate this decision. Many thanks to everyone involved!
    Also the timing of this is incredible! Just as was pondering whether upgrading to the next LTS would be more important than my long-time VSCode setup.
     
    sailro likes this.
  6. carored

    carored

    Joined:
    Mar 21, 2018
    Posts:
    11
    I really don't like this update showing that methods are unsed!
    upload_2023-8-4_12-35-39.png
     
  7. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    336
    There is probably something missing for your setup. I didn't experience this though.
     
    Pnvanol likes this.
  8. jbevain-msft

    jbevain-msft

    Joined:
    Dec 3, 2020
    Posts:
    4
    Earlier versions of the C# extensions had some issues with analyzers, please make sure:
    • Your C# and C# Dev Kit extensions are upgraded to the latest version:
      • C# (v2.0.320)
      • C# Dev Kit (v0.4.2)
    • You've restarted VS Code, just in case.
     
    stonstad, Harry-Wells and sailro like this.
  9. petit_morceau_de_ciel

    petit_morceau_de_ciel

    Joined:
    Jan 24, 2021
    Posts:
    8
    Not working for me. Now it does not show the erros in the code in VS code. And it does not autocomplete either. Basically now it does nothing but showing the outline and counting the references to the methods. Using VS code in linux, Unity 2021. Until know everything was working ok.
    After some time waiting this is what it says:
    2023-08-04 23:02:14.018 [info] Project system initialization finished. 0 project(s) are loaded, and 54 failed to load.
    I'm going to the old version.
     
    Last edited: Aug 4, 2023
    brandonsTP and Fitbie like this.
  10. saskenergy

    saskenergy

    Joined:
    Nov 24, 2018
    Posts:
    29
    I got it fully working on both Windows and Ubuntu 23.04. There are a couple of requirements you need to do to have it working:
    1. For Linux users, you need to install VS Code using apt or dnf. I installed mine using Snap and Unity can't detect it.
    2. Use the latest versions of C# (v2.0.320) and C# Dev Kit (v0.4.2) as @jbevain-msft mentioned above.
    3. Install .NET 7 (not version 6, I tried it and it doesn't work).
    4. Install the Visual Studio package in the Unity package manager (NOT the Visual Studio Code package). The package MUST be version 2.0.20 or above. I'm currently on the latest 2022 LTS version of Unity, I don't know if the previous versions have the latest package version.
    5. Open your project from the Unity editor. Make sure you've set Unity to open using VS Code in your preferences (for Linux users, if the VS Code option does not pop up, follow step 1). Opening it from the Unity editor sets some things in VS Code's side.
    That's all you need to do and it should work. Assuming you've properly set it up, those squiggly lines under Start, Update, etc. shouldn't show up. Make sure there are no errors on the extension (check on bottom left indicator).

    I did have a small issue on the Linux side though, VS Code keeps complaining about how it can't watch all the files in my project due to hitting fsnotify limits. I've already set my fsnotify limit to max and the issue still persists. Rider does not have this issue on the exact same project so this issue probably on VS Code. Even with that, intellisense seems to work fine so I dunno?
     
  11. petit_morceau_de_ciel

    petit_morceau_de_ciel

    Joined:
    Jan 24, 2021
    Posts:
    8
    Thank you. Doing "3 Install .NET 7" now it's working.
     
  12. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    24
    Create a .editorconfig file in your project's directory and add this to it.
    Code (csharp):
    1. #Ignore IDE0051: Remove unused private members
    2. [*.cs]
    3. dotnet_diagnostic.IDE0051.severity = none
    This is a requirement for Unity projects IMO.
     
    Deleted User likes this.
  13. jbevain-msft

    jbevain-msft

    Joined:
    Dec 3, 2020
    Posts:
    4
    The Unity extension ships with our suite of analyzers and suppressors that should remove the `IDE0051` for Unity types.

    If there are cases that we're missing or that are still showing up, we'd love to hear about it to provide a better experience.
     
    stonstad and TheSleepyKoala like this.
  14. EX_MOON

    EX_MOON

    Joined:
    May 31, 2023
    Posts:
    1
    References of fields are gone. There are only references for methods, but fields references are missing. Also there are constantly advices to make some fields with readonly modifier. I checked all versions of extensions, version of dotnet and etc. All versions are up-to-date. I don't know whats the reason of these problems upload_2023-8-6_0-30-54.png
     
    BELjay13 likes this.
  15. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    336
    @jbevain-msft The current version can't autocomplete MonoBehaviour messages (Start, Awake,...)
     
  16. jbevain-msft

    jbevain-msft

    Joined:
    Dec 3, 2020
    Posts:
    4
    We have that feature in Visual Studio and it hasn't made it into the Unity extension for Visual Studio Code yet.
     
    saskenergy likes this.
  17. jbevain-msft

    jbevain-msft

    Joined:
    Dec 3, 2020
    Posts:
    4
    I think that might be a feature difference between the previous Omnisharp based C# extension and the new one that the .NET just released. Let me talk to the team this week to better understand the plan around this.
     
  18. Fitbie

    Fitbie

    Joined:
    Aug 17, 2021
    Posts:
    65
    I have such problem here with Visual code + Unity

    This problem appeared either because I tried to install the new Unity Extension (but I have 2020.3), or because of Visual Code auto-updates, or God knows what else.
    Can you tell me if I can roll back my Visual Code version to what it was just 3 days ago?
    I was fine with the old Visual code, plus I'm on a tight deadline :(
     
  19. awlok

    awlok

    Joined:
    Dec 3, 2019
    Posts:
    10
    After this update, the reference of field is gone except the methods. And there are some weird readonly modifier advices for private fields.

    upload_2023-8-7_17-53-51.png

    upload_2023-8-7_17-53-57.png
     
    meta44 likes this.
  20. zulo3d

    zulo3d

    Joined:
    Feb 18, 2023
    Posts:
    756
    Open the extensions panel and right click on the C# language support extension and select 'Install Another Version'. You probably want V1.26.0.
     
    Deleted User, matt6on and Fitbie like this.
  21. Fitbie

    Fitbie

    Joined:
    Aug 17, 2021
    Posts:
    65
    SOLVED! God bless you, friend!
    The only problem that remains is this warning

    I tried switch Dev Kit even to oldest version, but no result.
    Also i didn't understand what .NetInstall tool, Dev Kit and Intellicode Does. And what Unity extension does for me (i have 2020 Unity version)


    But! Everything is working, thanks! I disable autoupdates for now haha.
     
  22. zulo3d

    zulo3d

    Joined:
    Feb 18, 2023
    Posts:
    756
    I don't have the C# Dev Kit installed so it's probably not needed.. I also don't have IntelliCode. I think you only need .NET Install Tool and C# base language suppport.
     
    Fitbie likes this.
  23. Fitbie

    Fitbie

    Joined:
    Aug 17, 2021
    Posts:
    65
    Yes, I looked and apparently these are debugging and AI code-writing and stuff tools for C#. Also they are needed for the new Unity extention, but since I have the 2020 version, all these extensions don't make sense to me.
     
  24. NeedsLoomis

    NeedsLoomis

    Joined:
    Mar 22, 2017
    Posts:
    57
    Thats just basic C# guidelines kicking in. Setting fields as "readonly" is recommended for any private field you don't ever set in a method or parameter (which Im guessing you never did with that field). It signifies that this field will never bet set again after instantiation (readonly fields are typically set in the constructor only).
     
    Last edited: Aug 8, 2023
  25. sarahpuspdew

    sarahpuspdew

    Joined:
    Nov 7, 2021
    Posts:
    4
    i have an error like this pls help, also the intellisense didnt work

    2023-08-08 11:40:50.205 [info] A fatal error occurred. The folder [C:\Program Files\dotnet\host\fxr] does not exist

    2023-08-08 11:40:50.205 [info] Project system initialization finished. 0 project(s) are loaded, and 1 failed to load.
     
  26. petit_morceau_de_ciel

    petit_morceau_de_ciel

    Joined:
    Jan 24, 2021
    Posts:
    8
    I think now it's not possible to follow the FormattingOptions from the omnisharp.json file.
    This is not working know:
    {
    "FormattingOptions": {
    "enableEditorConfigSupport": false,
    "NewLinesForBracesInLambdaExpressionBody": false,
    "NewLinesForBracesInAnonymousMethods": false,
    "NewLinesForBracesInAnonymousTypes": false,
    "NewLinesForBracesInControlBlocks": false,
    "NewLinesForBracesInTypes": false,
    "NewLinesForBracesInMethods": false,
    "NewLinesForBracesInProperties": false,
    "NewLineForClausesInQuery": false,
    "NewLineForMembersInAnonymousTypes": false,
    "NewLineForMembersInObjectInit": false,
    "WrappingKeepStatementsOnSingleLine": true,
    "WrappingPreserveSingleLine": true,
    "NewLinesForBracesInObjectCollectionArrayInitializers": false,
    "NewLinesForBracesInAccessors": false,
    "NewLineForElse": false,
    "NewLineForCatch": false,
    "NewLineForFinally": false
    }
    }

    So, now new line before each brace. I hate this rule. (I'm a hater) I dont want new lines before each brace! But omnisharp.json rules are not working now.
    (as a hater i hate braces too, why no braces like python? why braces if there is indentation? i know, i know this is imposible. Ah and I also hate the end line semicolon i forgot it)

    Well, the question is FormattingOptions from the omnisharp.json file are not working anymore.
     
    Last edited: Aug 8, 2023
  27. TheSleepyKoala

    TheSleepyKoala

    Joined:
    Aug 24, 2018
    Posts:
    24
    And it won't because we aren't using omnisharp anymore.

    Your best bet is to use .editorconfig to solve your problem.

    It would probably look something like this.

    # top-most EditorConfig file
    root = true

    # C# files
    [*.cs]
    indent_style = space
    indent_size = 4
    insert_final_newline = false

    csharp_new_line_before_open_brace = none
    csharp_new_line_before_else = false
    csharp_new_line_before_catch = false
    csharp_new_line_before_finally = false
    csharp_new_line_within_query_expression_clauses = false
    csharp_new_line_within_anonymous_types = false
    csharp_new_line_within_object_initializers = false
    csharp_preserve_single_line_statements = true
    csharp_preserve_single_line_blocks = true


    Or just try out something like csharpier
     
  28. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,132
    A little disappointed that this project was not announced before you announce vscode deprecation. It make us panic and frustrated for no reason

    Thank you for your team to not neglecting vscode which is the best IDE
     
    brandonsTP likes this.
  29. hareharu

    hareharu

    Joined:
    Nov 22, 2014
    Posts:
    5
    Does anyone getting this warning for .csproj files? It only appears in Unity 2022/2023.
    csproj.png
    It's happening because of this part:

    <ItemGroup>
    <Analyzer Include="C:\Users\Haru\.vscode\extensions\visualstudiotoolsforunity.vstuc-0.9.0\Analyzers\Microsoft.Unity.Analyzers.dll" />
    <Analyzer Include="C:\Unity\Editors\2022.3.7f1\Editor\Data\Tools\Unity.SourceGenerators\Unity.SourceGenerators.dll" />
    <Analyzer Include="C:\Unity\Editors\2022.3.7f1\Editor\Data\Tools\Unity.SourceGenerators\Unity.Properties.SourceGenerator.dll" />
    </ItemGroup>

    Unity 2021 projects only have one element here - "Microsoft.Unity.Analyzers.dll" from vs code plugin. 2023.2 beta add another one - "Unity.UIToolkit.SourceGenerator.dll".
     
  30. carored

    carored

    Joined:
    Mar 21, 2018
    Posts:
    11
    For the error of TargetFramework I upgrade the Visual Studio Editor to the latest version 2.0.20. (from the package manager)
    Now in Preferences > External Tools the Vscode display the version
    upload_2023-8-10_9-40-14.png

    Then I clicked the button [Regenerate project files]
    Finally I opened the project from the menu: Assets > Open C# Project

    If you check the file Assembly-CSharp.csproj you should see this line change from this:
    <TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
    to this:
    <TargetFramework>netstandard2.0</TargetFramework>

    This worked for me with Unity 2021.3.6f1
     
    sailro likes this.
  31. petit_morceau_de_ciel

    petit_morceau_de_ciel

    Joined:
    Jan 24, 2021
    Posts:
    8
    Thanks it works with .editorconfig . I don't think it can be done with csharpier in case someone tries to do it.
     
    TheSleepyKoala likes this.
  32. NeedsLoomis

    NeedsLoomis

    Joined:
    Mar 22, 2017
    Posts:
    57
    Off topic, so I'll keep it short, there is no indentation and barely any spacing. This is a perfectly valid class:
    Code (CSharp):
    1. using System.Diagnostics;public class MyClass{SomeVariable variable;public void SomeFunction(){Debug.WriteLine("derp");}
    2.  
    3.  
    Python is language designed for easy scripting, and in principal is supposed to be simple and fast to write.

    C# is a very verbose general purpose language with a ton of features. Brackets and semicolons are a design choice that allow you tell the compiler where the code begins and ends, granting the freedom to organize that OOP mess in a way that's hopefully readable to you and your team.

    Look at its sister language, F#. There Microsoft decided that such a concise functional language would benefit from less freedom in exchange for less noise. Its all six one way, half a dozen the other.
     
    Last edited: Aug 11, 2023
  33. meta44

    meta44

    Joined:
    Sep 11, 2018
    Posts:
    23
    I installed this extension, and now I can't see reference counts for most of my variables, including all [SerializeField] values. Is there a way to get them to show up again?
     
  34. sailro

    sailro

    Microsoft

    Joined:
    Jul 30, 2014
    Posts:
    164
    meta44 likes this.
  35. devrandomzero

    devrandomzero

    Joined:
    Aug 2, 2020
    Posts:
    43
    Hi,
    I'm on Arch Linux and I'm using Unity 2021.3.23, at the moment the new extension is not working at all in VSCode.
    As you can see even the autocompletion is not recognized (fresh new project just for testing)

    upload_2023-8-12_16-10-7.png

    All extensions are updated to the last version.
    Same for dotnet
    dotnet --list-sdks
    7.0.109 [/usr/share/dotnet/sdk]


    Are there any logs that I could check out to give you more info?

    Thank you
     
  36. sailro

    sailro

    Microsoft

    Joined:
    Jul 30, 2014
    Posts:
    164
    I tried to make a summary here:

    https://github.com/microsoft/vscode-dotnettools/issues/329#issuecomment-1675794278
     
  37. devrandomzero

    devrandomzero

    Joined:
    Aug 2, 2020
    Posts:
    43
    Thank you for your answer, maybe the problem is at this step:

    3- Make sure C# Dev Kit is not displaying any error message:


    This is the output for C# Dev Kit

    Code (Boo):
    1. Starting Open a solution...
    2. Starting Open a solution with environment service...
    3. Starting Clear environment...
    4. Starting Spawn .NET server...
    5. .NET server STDERR: Unhandled exception.
    6. .NET server STDERR: System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
    7. en-us is an invalid culture identifier.
    8.    at System.Globalization.CultureInfo.GetCultureInfo(String name)
    9.    at Microsoft.VisualStudio.Server.VSCodeCultureInheritance.InheritCultureFromVSCode()
    10.    at Microsoft.VisualStudio.Server.ServiceBroker.Program.Main(String[] args)
    11.    at Microsoft.VisualStudio.Server.ServiceBroker.Program.<Main>(String[] args)
    12.  
    13. .NET server STDOUT: [createdump] Gathering state for process 6586 Microsoft.Visua
    14. [createdump] Crashing thread 19ba signal 6 (0006)
    15.  
    16. .NET server STDOUT: [createdump] Writing crash report to file /tmp/csdevkit/dumps/Microsoft.Visua.6586.dmp.crashreport.json
    17.  
    18. .NET server STDOUT: [createdump] Crash report successfully written
    19.  
    20. .NET server STDOUT: [createdump] Writing minidump with heap to file /tmp/csdevkit/dumps/Microsoft.Visua.6586.dmp
    21.  
    22. .NET server STDOUT: [createdump] Written 68587520 bytes (16745 pages) to core file
    23. [createdump] Target process is alive
    24. [createdump] Dump successfully written in 1632ms
    25.  
    26. .NET server exited with null
    Thank you for your help
     
  38. sailro

    sailro

    Microsoft

    Joined:
    Jul 30, 2014
    Posts:
    164
    Indeed, could you use the built-in VSCode feature to report an issue?
    `Help / Report issue` and give all the details. Thanks!

    upload_2023-8-12_21-19-38.png
     
  39. devrandomzero

    devrandomzero

    Joined:
    Aug 2, 2020
    Posts:
    43
    Done, thank you
     
  40. petit_morceau_de_ciel

    petit_morceau_de_ciel

    Joined:
    Jan 24, 2021
    Posts:
    8
    Having this problem now:
    microsoft code analysis server high memory usage. In my case 3GB.
    https://github.com/dotnet/vscode-csharp/issues/5733
    Is this:
    "I feel the same.
    After using C# Extension as vscode for a year, after the C# Extension update, it already occupies more than 4.5 gigabytes of memory, even though it doesn't debug or do anything."
    "Right out of the gate, the process "Microsoft.CodeAnalysis.LanguageServer" is utilizing about 1 to 1.5 GB of ram after the initial scan of the solution is complete. After navigating through the solution a bit, as one would for a bugfix or a small feature, the memory utilization jumps to 3-4 GB."

    Returning to c# v1.26
     
    Last edited: Aug 17, 2023
    Thaina likes this.
  41. borkom_unity

    borkom_unity

    Joined:
    Jul 22, 2021
    Posts:
    13
    and it costs 45$ a month.
     
  42. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    411
    Individuals and organizations falling in the Visual Studio Community usage tier can use it for free. It’s also included with subscriptions to Visual Studio.
     
    sailro likes this.
  43. ryanslikesocool

    ryanslikesocool

    Joined:
    Jul 31, 2016
    Posts:
    49
    Does the new package still require Mono on macOS? The C# output terminal in VS Code says "Language server initialized", but code completion doesn't seem to work, and it's not respecting my global .editorconfig.
     
  44. meta44

    meta44

    Joined:
    Sep 11, 2018
    Posts:
    23
    I don't know how to insert a screenshot in a comment, but I'm finding the new coding auto-complete really annoying. For example, when I want to type [SerializeField], before I could tab out of the bracket after typing, but now the auto-complete wants to complete to [SerializeFieldSerializeField], and when I hit tab it inserts that nonsense. It's obviously buggy and not implemented properly, and I just want to disable it, anyone know how to do that?
     
  45. sailro

    sailro

    Microsoft

    Joined:
    Jul 30, 2014
    Posts:
    164
    Mono is not required anymore if you use C# Dev Kit / C# Extension v2.x / Unity extension.

    Could you please have a look at this thread:
    https://github.com/microsoft/vscode-dotnettools/issues/329#issuecomment-1675794278

    Thanks!
     
    Last edited: Aug 20, 2023
    ryanslikesocool likes this.
  46. sailro

    sailro

    Microsoft

    Joined:
    Jul 30, 2014
    Posts:
    164
    Indeed this is unexpected.

    Could you please have a look at this thread:
    https://github.com/microsoft/vscode-dotnettools/issues/329#issuecomment-1675794278

    And if you still hit the issue please use `Help/Report issue` in `VSCode`

    Thanks!
     
  47. borkom_unity

    borkom_unity

    Joined:
    Jul 22, 2021
    Posts:
    13
    In non-enterprise organizations, up to five users can use Visual Studio Community. In enterprise organizations (meaning those with >250 PCs or >$1 Million US Dollars in annual revenue), no use is permitted beyond the open source, academic research, and classroom learning environment scenarios described above.

    If you are making non open source games you have to pay 45$ a month, right, right?
     
  48. meta44

    meta44

    Joined:
    Sep 11, 2018
    Posts:
    23
    So, so, so many issues with this new system. Things that used to be so simple are so difficult now. Just found out that when you make a new script in Unity, VS Code bugs out and doesn't detect the unity library. No clue what's up with that. Intellisense is still busted, references still not showing, plus the new way that references are displayed is wonky as hell and way, way worse than the way it used to work.

    Rolling back the versions of the C# and C# Dev Kit extensions, and that fixed some things, but creates other problems. Not sure what else to do, and the current state of things is pretty unusable.
     
    Last edited: Aug 21, 2023
  49. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    411
    There are different parties to consider.
    -For individuals, non-FOSS usage is permitted at no cost.
    -For "organizations" that are not "enterprises," non-FOSS usage for <= 5 developers is permitted at no cost. With more developers, you will need a paid license.
    -For "organizations" that are "enterprises," non-FOSS usage is not permitted. You will need a paid license.
    https://visualstudio.microsoft.com/license-terms/vs2022-ga-community/
    This is obviously a business decision made by number crunchers. It stands to reason that with that many computers or that much income, you would have the kind of structure and requirements where a paid license with the attached things like support plans makes sense. Small organizations would probably have a harder time, the 5 user cap personally seems overly restrictive. In any event, as I have already said, individuals and organizations that fall within the necessary bracket can use Visual Studio Community. This includes the right to create non-FOSS products with it.

    You really didn't need to make a duplicate of your other post.
     
    LilGames, xoofx and sailro like this.
  50. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    559
    @sailro
    I can't get this to work (Windows 10, 64bit, VS Code 1.81.1). I've uninstalled the old deprecated debuggers, installed the official Microsoft one, the support extensions for C# Dev Kit, DotNet SDK for 6 and 7 installed. When I try to debug I get a prompt that says:
    "Configured debug type 'unity' is not supported."
    along with a button that says "Install unity Extension", and a button that says Open launch.json.

    Example (legacy) entry in the launch.json from using the previous Unity debuggers:

    Code (csharp):
    1. {
    2.             "name": "Unity Editor",
    3.             "type": "unity",
    4.             "path": "/c:/WORK/[my project name and path redacted]/Library/EditorInstance.json",
    5.             "request": "launch"
    6.         },
    (The button "Install unity Extension" is just a generated button that shows a list of extensions matching the name 'unity'. I have all the pertinent ones installed already.)
     
    Last edited: Aug 22, 2023