Currently Live Share only supports a single root folder.
This feature requests adding these capabilities into Live Share.
Additionally, it would be great to hear feedback about whether folks want to share "loose files" that they open during a collaboration session, but aren't actually part of the shared solution (VS) or workspace (VS Code).
@Chuxel Any idea where this is on your priority list?
@lumaxis It's definitely one we know is important. Out of curiosity, what is your use case? Are you In VS or VS Code?
In the VS App Center team, we are running several Node.js services which are mostly developed using VS Code. Recently, we also moved to one big mono-repo. In the mono-repo, we have several .code-workspace files that give us an immediately great dev experience for a certain combination of the projects in our mono-repo.
In my team, we also focus on knowledge sharing and try to do pairing and collaboration as much as possible. For those purposes, we recently started using Live Share as a tool, especially for the parts of our team that are remote.
Without support for multi-root workspaces, we today however have to open the _entire_ mono-repo folder in the Live Share workspace and that understandably gets a bit confusing and sometimes also slow 馃檪
Does that help @Chuxel ?
@lumaxis Yes, that's great info! Makes complete sense. This is definitely on-roadmap and we know it's important for VS solutions so it's great to hear about a concrete scenario like this for VS Code too given workspaces is a new-ish feature in the tool.
My example use case is converting a React Javascript app to TypeScript so setup a multi-root workspace with both folders that sit side by side to do the conversion. But when Live Sharing came across this issue.
In my use case I'm trying to share a project built with CMake (Visual Studio as host).
馃搧 Project Root
馃搧 build
馃搩 ALL_BUILD.vcxproj
馃搩 CMakeCache.txt
馃搩 project.sln
馃搩 <other VS files>
馃搧 source
馃搩 CMakeLists.txt
馃搩 main.cpp
馃搩 <other source files>
馃搩 CMakeLists.txt
None of the source files appear for a VS Code client, since they're outside the solution folder (i.e. build here).
Merging in #240 from @mihe, @DJLink
Issue from @mihe
Product and Version: VS 15.6.4, VS Code 1.22.2
OS Version: Windows
Live Share Extension Version: 0.2.400.25910 (VS), 0.2.405 (VS Code)
Target Platform or Language: C++
Steps to Reproduce / Scenario:
.cpp file that's located somewhere on disk that's not under the same file tree as the .sln file..sln file is located, and doesn't take the actual layout of the solution into consideration.This creates problems with any project where the .sln file isn't placed in some common parent directory to all of the source files. Unreal Engine 4 projects are one of those cases, where UE4.vcxproj (containing the source of the engine itself) is almost always placed outside of the scope of the .sln file.
Reply from @DJLink
I have this same issue. Some extra information, once I start a debug session and put a breakpoint in one of those files outside the project it will show on the other user session too, during that debug session
Further information for implementation and use-case, I work on a team developing full-stack on our own server and front-end architecture. The way our server runs, each of our products is a separate module, which I have open as separate folders within the workspace to keep from having massive, difficult to navigate file trees.
Obviously, for now, I can just utilize the server file and work from there, but ideally it would be nice to work in a per-product workspace with all dependencies loaded.
@Chuxel What are the state of this issue?
All our sln's live in a separate folder hierarchy than our csprojs. So there are no *.cs's to live share.
Really looking forward for this, collaboration will improve so much when we can use local IDE instead of remote screen sharing.
Had the same issue, but also found a simple workaround that helped for how we wanted to use it: In visual studio select the solution file you want to share, and then in the file menu select save as. Save the solution file in a higher up directory where everything you need is in, and then for liveshare open that copy of the solution instead.
Until this is fixed this should at least allow you to share everything you need.
This workaround only works for folders that can be co-located unfortunately. I have a workspace mixing golang and node and have no desire to put my javascript in my $GOPATH.
I've had to make a single folder for live share to work again. Shame this isn't higher up as a priority.
@jpike88 Apologies for that inconvenience! Not only is this high priority, but we鈥檙e actually very close to finishing the work to fully support this. We鈥檒l keep everyone updated on progress in the coming weeks 馃憤
FYI, the latest version of Live Share adds support for multi-root workspaces in VS Code! You should be able to open multiple roots and simply click the Share button 馃殌 Please let us know if you run into any issues, and we appreciate everyone's patience, and for putting up with some of the aforementioned workarounds 馃槃
We're working on the equivalent support in VS, and will keep everyone posted on progress. Thanks!
Closing this as resolved, now that support for it has been added to VS 馃憤
Closing this as resolved, now that support for it has been added to VS 馃憤
Hello, I find for solution in project subdirectory directory(such as ProjectA/win/ProjectA.sln), If I share it by live-share to visual studio code, The visual studio code can only navigate to source files in the solution file directory(e.g: ProjectA/win/ ), the source files in top project directory cannot navigated(elg: ProjectA/src/main.cc). How can I fix this? But if the session is save to another visual studio, I can navigate all the source files referenced by visual studio solution file.
Live Share extension version installed inVisual Studio is 1.0.1349.1, Visual Studio version: Microsoft Visual Studio Community 2019 16.4.2. Live Share extension in Visual Studio Code is: 1.0.1404.
Most helpful comment
FYI, the latest version of Live Share adds support for multi-root workspaces in VS Code! You should be able to open multiple roots and simply click the
Sharebutton 馃殌 Please let us know if you run into any issues, and we appreciate everyone's patience, and for putting up with some of the aforementioned workarounds 馃槃We're working on the equivalent support in VS, and will keep everyone posted on progress. Thanks!