This is a Visual Studio Code extension that provides a (.sln and .slnx) Visual Studio Solution explorer panel..
This is a Visual Studio Code extension that provides a (.sln and .slnx) Visual Studio Solution explorer panel..
⚠️ Please note, while there is another extension offering a solution explorer for Visual Studio Code, it's important to clarify that this is not the official Microsoft extension. For the official extension, you can visit this link.
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.
It was originally intended to work with .Net Core solutions and projects. For this reason, the compatibility with other types of projects (such as .Net Framework or C++) is not guaranteed.
If you want to enjoy the full experience, you should install:
Table of Content:
If you like my work you can buy me a beer and show that love
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
an activity with the Visual Studio icon
You can configure it in the Visual Studio Code settings panel, looking for "VsSolution: Show Mode" section:
vscode-solution-explorer has several ways to open the solution files and you can configure them in the Visual Studio Code configuration panel.
You can execute the "Open solution" command from the command palette or from the welcome view (if no solution has been found).
You can enable omnisharp integration and vscode-solution-explorer will open the same .sln or .slnx file you open with Microsoft`s extension.
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.
You can use the automatic solution file finder activating some options in the Visual Studio Code settings panel.
The vssolution.openSolutions.inRootFolder setting will look for the solution files in the root folder.
The vssolution.openSolutions.inFoldersAndSubfolders setting will search for the solution files in the root folder and its subfolders.
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:
You can combine all of these options to find the best configuration for you.
Adds a Solution Explorer panel where you can find a Visual Studio Solution File Explorer:
Only available when the project is of kind CPS (dotnet core).
dotnet builddotnet cleandotnet newdotnet packdotnet publishdotnet restoredotnet rundotnet watch runIf you want to customize the terminal commands you can change them in the settings json file. These are the default commands configuration:
…It will replace keywords like $solutionPath or $projectPath with the actual values.
As an example, if you want to compile in Release mode every time you publish a project you can create something like:
{
"vssolution.customCommands": {
"publish": [ "dotnet", "publish", "\"$projectPath\"", "-c", "Release" ]
}
}Besides the classic step-by-step "Add new project" wizard, solutions have an "Add new project (panel)" command that opens a Visual Studio-style, two-pane dialog: a searchable list of the dotnet new templates installed on your machine on the left (filterable by name or tag), and on the right a form to set the Project Name, Project Language, Location (with a folder picker) and .NET Framework once you pick a template.
The template's description and the frameworks it actually supports are fetched on selection, so the Framework field is populated per-template rather than a generic list; fields that don't apply to a given template (e.g. one that only supports a single language, or doesn't expose a --framework option) are disabled instead of shown as free-form input.
Only available when the project is of kind CPS (dotnet core).
If you want to use custom nuget feeds it will look for a file called nuget.config in the root folder of the project and its parent folders. If it finds this file, it will read the configuration and use it. If it does not find it, it will use the default nuget feed.
As an Example:
If you are working with /drive/path/to/project.csproj, it will look for:
/drive/path/to/nuget.config/drive/path/nuget.config/drive/nuget.config/nuget.configNote vscode-solution-explorer only supports ClearTextPassword credencials in nuget.config
Only available when the project is of kind CPS (dotnet core).
Only available when the project is of kind CPS (dotnet core) c# projects.
If you open a .csproj file you can see if the nuget packages versions are out-dated. You can update them by clicking on the `` icon and select the version you want to use. It also adds code completions for packages names and versions.
Or if you hover over a package version you can see a tooltip with all the available versions.
Notes: This feature uses caching to avoid unnecessary calls to the nuget server. If you want to force the cache update you can use the Solution Explorer: Invalidate Nuget Cache command.
Only available when the project is of kind CPS (dotnet core).
This extensions has a custom template system to create new files. When you create a new file you can select a template from the dropdown list:
You can customize the templates for your project. First of all click with the right mouse button on your solution file and select Install File Creation Templates. Then you have to move to .vscode/solution-explorer folder and you can find the file called template-list.json. This file contains the list of templates.
We strongly recommend you to update your templates after updating this extension:
This extension adds syntax highlighting to .sln files.
And also for .slnx files.
You can add a Directory.Packages.props on Solution under Solution items folder. This option will remove all Version attribute of the PacakageReferences in the projects files. You can also add an existing Directory.Packages.props with Add Solution file on a folder.
If a Directory.Packages.props are already present on the solution, after add a new project all PackageReferences will be updated and added the PackageVersion to the current file.
The project reader understands a realistic subset of MSBuild, so the tree reflects what would actually be built instead of just what's literally written in the xxproj file:
Condition attributes are evaluated (not just stored) on PropertyGroup, ItemGroup and individual items, supporting ==, !=, And/Or/!, parentheses, Exists() and boolean literals. This fixes the common "same property set for Debug and Release in two different PropertyGroups" case, which previously always resolved to whichever one appeared last in the file.$(...)) cascade in document order like real MSBuild, including reserved ones seeded up front: MSBuildProjectDirectory, MSBuildProjectDirectoryNoRoot, MSBuildProjectFullPath, MSBuildProjectFile, MSBuildProjectName, MSBuildProjectExtension, MSBuildThisFileDirectory, MSBuildVersion, Configuration and Platform.net8.0;net472) get a derived $(TargetFramework) (the first entry) so per-TFM conditions still resolve, even though this reader evaluates the project once rather than per target framework.Directory.Build.props / Directory.Build.targets / Directory.Packages.props (found by walking up from the project directory, same as MSBuild), are merged into the evaluation - including central package management version resolution for PackageReferences that don't specify a Version..props/.targets files - even ones living outside the project's own folder - automatically reload the affected project(s) in the tree.Solution and project nodes have an "Edit MSBuild Properties..." command (also in their context menu) that opens a form to override Configuration, Platform, TargetFramework (offered as a dropdown when the project multi-targets) and any custom property, without touching the project files themselves. Overrides set on a project take precedence over the ones set on its solution, which in turn take precedence over the vssolution.defaultMsBuildConfiguration / defaultMsBuildPlatform settings below.
The extension's UI (commands, menus, settings descriptions and the panels above) is localized and follows VS Code's display language automatically. Currently supported languages: English (base), German (de), Spanish (es), French (fr), Portuguese - Portugal (pt-pt), Portuguese - Brazil (pt-br) and Simplified Chinese (zh-cn).
The
de,es,fr,pt-pt,pt-brandzh-cntranslations are AI-generated. If you're a na
No open issues yet, or sync has not completed.