-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open Solution fails in folder that has multiple solution files with project locations in different location #776
Comments
@williambuchanan2 Have you used the "Open Solution" command from the command palette which would ask you which solution to open? opensln.mp4 |
Not sure if I am missing something but it doesn't seem to work for me. As soon as I choose that command it just goes back to the search function. If I then choose 'Go to file' it just opens up the sln file contents in an editor window. Screen.Recording.2023-12-11.at.9.52.46.am.mov |
@williambuchanan2 I only see one solution in your workspace so it wouldn’t show anything (that’s a diff bug). Are you expecting like a file…open experience? Commands in extensions operate on the workspace (the folder you have open). If you had multiple SLN files it would offer which one to open. Maybe I’m misunderstanding your request? What are you trying to accomplish if you already have a workspace open? |
Screen.Recording.2023-12-11.at.10.53.43.am.mov |
See movie above. This is my understanding of how it should work... I do a File -> Open Folder - if that folder has multiple solutions I should be prompted to choose which solution I want to open. As you can see from the movie that doesn't happen. Nothing happens other than all the solutions being listed in the explorer. If I double click on a solution file, or do a file open on a solution file all that happens is the contents of the solution load in an editor. Maybe I am over thinking this, or missing something, but in my way of thinking I shouldn't need to know some hidden trick to open a solution. Why can't I just open a solution file the same way I do in VS? So am I missing something, or is it just that it doesn't work? |
Ok thanks @williambuchanan2 the prior screen cap threw me off as there was only one in the workspace. Now I think I understand your setup... You have a folder that has just .SLN files and that's how you manage different solutions. They are not next to the projects, but likely have relative path mapping in the SLN files to the projects. I just tried this setup myself and was able to see it. I'm not sure if this is a macOS vs. Windows thing (didn't see anything obvious why it would), but I understand your setup now. When you open the "Open Solution" command if you wait a bit is it offering the list (can't imagine it would take more than 1s to enumerate your directory, but just checking). slnopen.mp4
With regard to this, the short answer is that VS code is different. It's an editor first so double-clicking a SLN file is just going to open that file. There isn't similar mechanisms were .sln is registered in a way like VS as a file handler, open in an IDE that is targeted to default-open SLN as a project, etc. "open file in editor" is kind of the default action for all files in VSCode. |
/cc @webreidi might be a mac-specific issue to validate |
@timheuer Yes this is how my workspace is setup. Sorry - I forgot there was a random sln file in the first screen shot - this added to the confusion! I tried waiting but the option to select the solution didn't appear. |
I was able to recreate this on both the Mac and Windows. If there isn't a .csproj file in the folder, C# Dev Kit is not activating. |
Yikes, okay -- not my experience (see video), but at least you have a repro. /cc @kvenkatrajan |
This has been behavior since start of the extension. We have few other activation triggers but sln file is not one of them. There are also some restrictions if the project folders are not in the open workspace in terms of watching and modifying them. |
Removing "area-project" as this is a solution loading issue. |
This issue has been marked as stale after 14 days of inactivity. @[ @ @], could you please take a look? |
@williambuchanan2 were you able to use the ".NET: Open Solution" command to get your solution to open? Please reopen this issue if that did not work for you. |
@webreidi |
@williambuchanan2 I apologize, but when we ask a question and get no response from the submitter, we assume that everything is working and close the ticket. To help us troubleshoot further, can you answer the question asked, please?
|
Ok, but you asked the question and closed the bug at the exact same time... The problem still exists. Using .NET Open solution does nothing, as per the screen recording above. |
Type: Bug
If there is more than 1 solution file in a folder, when I do Open Folder nothing happens.
I know I am supposed to see a popup, but I see nothing.
Incidentally - if I uninstall the C# Dev Kit and .NET Maui extensions then the popup starts to show again (but then nothing happens when I select a solution).
Extension version: 0.5.50
VS Code version: Code 1.84.2 (Universal) (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:52:33.687Z)
OS version: Darwin arm64 23.1.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: