Search Unity

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

Feedback It's best to put all .csproj and IDE-related stuff in a subfolder

Discussion in 'Code Editors & IDEs' started by yu_yang, Nov 2, 2023.

  1. yu_yang

    yu_yang

    Joined:
    May 3, 2015
    Posts:
    85
    This can make the project directory look cleaner.
     
    Ryiah likes this.
  2. UniqueCode

    UniqueCode

    Joined:
    Oct 20, 2015
    Posts:
    53
    Add this to your settings.json if you are using Vscode. This will show all .csproj files as one .sln file which you can collapse.
    Code (JavaScript):
    1. {
    2.     "files.exclude": {
    3.         "**/.DS_Store": true,
    4.         "**/.git": true,
    5.         "**/.gitmodules": true,
    6.         "**/*.booproj": true,
    7.         "**/*.pidb": true,
    8.         "**/*.suo": true,
    9.         "**/*.user": true,
    10.         "**/*.userprefs": true,
    11.         "**/*.unityproj": true,
    12.         "**/*.dll": true,
    13.         "**/*.exe": true,
    14.         "**/*.pdf": true,
    15.         "**/*.mid": true,
    16.         "**/*.midi": true,
    17.         "**/*.wav": true,
    18.         "**/*.gif": true,
    19.         "**/*.ico": true,
    20.         "**/*.jpg": true,
    21.         "**/*.jpeg": true,
    22.         "**/*.png": true,
    23.         "**/*.psd": true,
    24.         "**/*.tga": true,
    25.         "**/*.tif": true,
    26.         "**/*.tiff": true,
    27.         "**/*.3ds": true,
    28.         "**/*.3DS": true,
    29.         "**/*.fbx": true,
    30.         "**/*.FBX": true,
    31.         "**/*.lxo": true,
    32.         "**/*.LXO": true,
    33.         "**/*.ma": true,
    34.         "**/*.MA": true,
    35.         "**/*.obj": true,
    36.         "**/*.OBJ": true,
    37.         "**/*.asset": true,
    38.         "**/*.cubemap": true,
    39.         "**/*.flare": true,
    40.         "**/*.mat": true,
    41.         "**/*.meta": true,
    42.         "**/*.prefab": true,
    43.         "**/*.unity": true,
    44.         "build/": true,
    45.         "Build/": true,
    46.         "Library/": true,
    47.         "library/": true,
    48.         "obj/": true,
    49.         "Obj/": true,
    50.         "ProjectSettings/": true,
    51.         "temp/": true,
    52.         "Temp/": true,
    53.         "UserSettings/": true,
    54.         "UIElementsSchema/": true,
    55.         "Logs/": true,
    56.         "Bin/": true
    57.     },
    58.     "explorer.fileNesting.patterns": {
    59.         "*.sln": "*.csproj",
    60.     },
    61.     "dotnet.defaultSolution": "Wizards.sln"
    62. }
     
    MihaPro_CarX and sailro like this.
  3. jasonboukheir3

    jasonboukheir3

    Joined:
    Oct 10, 2023
    Posts:
    14
    Code (JavaScript):
    1. {
    2.     "explorer.fileNesting.enabled": true,
    3.     "explorer.fileNesting.patterns": {
    4.         "*.sln": "*.csproj",
    5.     },
    6. }
    This is a really cool trick! I needed to enable fileNesting for it to work.
     
    sailro likes this.
  4. sailro

    sailro

    Microsoft

    Joined:
    Jul 30, 2014
    Posts:
    167
    I agree. We are going to generate default `settings.json` with this included in the next release of the VS Editor package.