Closed wjk closed 14 hours ago
Great bug -- thanks!
Is there any progress on this or work around (like telling OmniSharp which SLN to look at?) or the like? Arguably one of the strongest points of fast C# development and iteration revolves around Intellisense working.. Since OmniSharp is loading our test environment sln instead of or dev sln, it does not function at all.
You can tell OmniSharp what to launch on by clicking the little OmniSharp icon at the bottom right of the VS Code status bar. (This is visible when a C# file is in the active editor.) You can use this to pick different solutions.
Ah, that is a bit less painful. Thanks.
I have the same issue -- I have a .csproj file I want to use, but it's being ignored in favour of other .sln files in the workspace tree. I've noticed that the file picker @DustinCampbell mentioned is a bit peculiar. If any .sln files exist in the workspace tree, only .sln files appear in the file picker and I can't use my csproj. If I start a new instance of vscode and just open the relevant sub-folder (which has only the .csproj in it), then vscode/omnisharp is happy to use my .csproj file.
(Yes, I could create another dummy .sln file that refers only to the .csproj I want to use, but it's not clear why I should need to.)
Update: after looking at resourcesToLaunchTargets, I realised that I'm not in fact opening the csproj file I wanted, but just its containing folder (which has the same name, and is also functional).
So please ignore my comment above -- this bug is really just about the following TODO:
// TODO:
// * It should be possible to choose a .csproj as a launch target
I think I am having the same problem, so want to re-enforce working on this. I have a project tree which contains a (Windows) VisualStudio solution file plus projects. I am now trying to compile it on Linux with .NET Core and VS Code. OmniSharp insists on loading the .sln file, which fails, and it does not offer any pickers.
If I rename the .sln and .csproj associated with VisualStudio, then OmniSharp correctly loads the Core csproj file and appears to work properly.
Why is there no progress on this? I avoid .sln files wherever possible in favour of loose .csproj folders. If I need a .sln file because of a heavy VStudio debugging need, I lose the ability to open the root folder of a collection of related projects that have a single set of documentation. Very frustrating. tried excluding */.sln in omnisharp.json file located in %USERPROFILE%/.omnisharp/ the sln file still loaded littering .slnXX files all over the place seems like the only workaround
Closing as a lot has changed with the project selector since this issue was opened. For OmniSharp we now show project .sln, .slnf, and .csproj files in the selector.
Environment data
VS Code version: 1.7.1 C# Extension version: v1.5-beta7
Steps to reproduce
In my private repo, I have a number of MSBuild-based .NET Core projects I intend on using VSCode with. However, my build process also involves creating (using CMake) and building a completely unrelated Visual C++-based solution. omnisharp-vscode then locks on to the
*.sln
file generated by CMake, which contains no C# projects, and prevents me from accessing the loose*.csproj
files that constitute the bulk of my project.Expected behavior
omnisharp-vscode should give an option to access loose csproj files, even when a solution file is detected.
Actual behavior
I can't do this.