Skip to content

This is a Visual Studio Code extension that provides a (.sln) Visual Studio Solution explorer panel..(部分汉化并修补了一个小bug)

License

Notifications You must be signed in to change notification settings

Minessential/vscode-solution-explorer

 
 

Repository files navigation

vscode-solution-explorer

This extension adds a Visual Studio Solution File explorer panel in Visual Studio Code. Now you can navigate into your solution following the original Visual Studio structure.

Getting Started

To activate vscode-solution-explorer you have to first open a folder or workspace.

Then, you can find this extension displayed as:

  • a tab in the "Explorer" activity

Visual Studio Code Explorer tab

  • an activity with the Visual Studio icon

Visual Studio Code Activity

You can configure it in the Visual Studio Code settings panel, looking for "VsSolution: Show Mode" section:

Visual Studio Code Settings: Show Modes

Open Solutions

vscode-solution-explorer has several ways to open the solution files and you can configure them in the Visual Studio Code configuration panel.

Open Solution command

You can execute the "Open solution" command from the command palette or from the welcome view (if no solution has been found).

Open Solution Command

Omnisharp integration

You can enable omnisharp integration and vscode-solution-explorer will open the same .sln file you open with Microsoft extension.

Activate Omnisharp integration in settings panel

It will ignore .csproj files because vscode-solution-explorer cannot open a project file without a Solution.

You have to install Microsoft C# extension to enable omnisharp integration.

Find Solution files

You can use the automatic solution file finder activating some options in the Visual Studio Code settings panel.

Open Solution Command

The vssolution.openSolutions.inRootFolder setting will look for the solution files in the root folder.

Open Solution Command

The vssolution.openSolutions.inFoldersAndSubfolders setting will search for the solution files in the root folder and its subfolders.

Open Solution Command

And if you want to specify the subfolders where you want to look for the solution files you have to activate the vssolution.openSolutions.inAltFolders setting and specify the folders in the vssolution.altSolutionFolders setting:

Open Solution Command

You can combine all of these options to find the best configuration for you.

Features

Adds a Solution Explorer panel where you can find a Visual Studio Solution File Explorer.

  • Can load any .sln version

  • Supports csproj, vcxproj, fsproj and vbproj (from vs2017 and before)

  • Supports dotnet core projects

  • You can create, delete, rename or move project folders and files.

  • You can create, delete, rename or move solution, solution folders and projects.

  • You can add or remove packages and references when the project is of kind CPS (dotnet core).

  • You can update all packages when the project is of kind CPS (dotnet core).

Solution Explorer

Solution Explorer

Solution Explorer

Extension Settings

  • vssolution.showMode Show the solution explorer in the "activityBar", in the "explorer" pane or "none" to hide it. This feature is only for testing pourposes.

  • vssolution.solutionExplorerIcons "solution-explorer": custom items from vscode-solution-explorer extension. "mix": file and folder icons from the installed icons theme. "current-theme": all the icons are from the installed icons theme.

  • vssolution.showOutputChannel Show the solution explorer output channel.

  • vssolution.trackActiveItem Select the active editor file in the solution explorer (not recomended).

  • vssolution.itemNesting Sets whether related items will be displayed nested.

  • vssolution.netcoreIgnore Folder and file names to ignore when get a dotnet core project content.

  • vssolution.xxprojItemTypes Type of XML element to put in the xxproj files.

  • vssolution.xmlspaces Spaces to be used for indenting XML output. It could be a number or an string. ex. "2", " " or "t".

  • vssolution.altSolutionFolders If there is no solution in the workplace root folder, it will search for solutions in any of these folders.

  • vssolution.win32Encoding Win32 "codepage" to "iconv.js" encoding equivalences.

  • vssolution.openSolutions.inRootFolder Sets whether solutions will be automatically loaded from the root folder.

  • vssolution.openSolutions.inAltFolders Sets whether solutions will be automatically loaded from the vssolution.altSolutionFolders parameter.

  • vssolution.openSolutions.inFoldersAndSubfolders Sets whether solutions will be automatically loaded from the current opened folder and subfolders.

  • vssolution.openSolutions.selectedInOmnisharp Sets whether solutions will be automatically loaded from the current selected solution in Omnisharp extension.

Example
{
    "vssolution.showMode": "activityBar",

    "vssolution.solutionExplorerIcons": "current-theme",

    "vssolution.showOutputChannel": true,

    "vssolution.trackActiveItem": false,

    "vssolution.itemNesting": false,

    "vssolution.netcoreIgnore": [
        "bin",
        "node_modules",
        "obj",
        ".ds_store"
    ],

    "vssolution.xxprojItemTypes": {
        "*": "Content",
        "cs": "Compile",
        "cpp": "ClCompile",
        "cc": "ClCompile",
        "c": "ClCompile",
        "h": "ClInclude",
        "hpp": "ClInclude",
        "vb": "Compile",
        "fs": "Compile",
        "ts": "TypeScriptCompile"
    },

    "vssolution.xmlspaces": "2",

    "vssolution.altSolutionFolders": [
        "src"
    ],

    "vssolution.win32Encoding": {
        "932": "Shift_JIS",
        "936": "GBK",
        "950": "BIG5"
    },

    "vssolution.openSolutions.inRootFolder": false,
    "vssolution.openSolutions.inAltFolders": false,
    "vssolution.openSolutions.inFoldersAndSubfolders": false,
    "vssolution.openSolutions.selectedInOmnisharp": true
}

Known Issues

Please report your issues: vscode-solution-explorer GitHub page

Release Notes

There is a lot of work to do.

0.5.0

Adding open solution command

Adding different automatic open solution flags: in root folder, in alt folders, in root folders and subfolders (Enhancement #204), and omnisharp integration

Adding command to update package references versions automatically

Bugfix #205: README images fixed thanks to Philippe Desmarais

Adding welcome view when no solution found

Updating README

0.4.7

Enhancement #63: prefix commands with "SolutionExplorer: "

Enhancement #167: using runtime icons for tree actions

Enhancement #189: it tries to determine the file extension when you create a new one without extension

Enhancement #159: added new command: "SolutionExplorer: Select Active Document"

0.4.6

Bugfix #178: Nested items PR #197 (by @callummarshall9). You can activate this option by setting the vssolution.itemNesting parameter to true

Enhancement #171: load new project templates from dotnet new --list command output.

Fixing Dependabot alerts

Move branch from master to main.

License

The source code is licensed under the MIT license.

The icons from (vscode-icons extension) are licensed under the Creative Commons - ShareAlike (CC BY-SA) license.

Branded icons are licensed under their copyright license.

Thanks to contributors

dfrencham darkmfj mwpenny remcoros marawan31 emrahcetiner martinothamar jesperbjensen Dvvarf vthg2themax jloureiro09 jbactad vlesierse m4ss1m0g Coda Hongyang Du (hond) Callum Marshall Philippe Desmarais

Enjoy!

About

This is a Visual Studio Code extension that provides a (.sln) Visual Studio Solution explorer panel..(部分汉化并修补了一个小bug)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.7%
  • JavaScript 1.3%