OmniSharp fails to start if it reads an unparsesable sln file
See original GitHub issueEnvironment data
.NET Command Line Tools (2.1.104)
Product Information:
Version: 2.1.104
Commit SHA-1 hash: 48ec687460
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.104\
Microsoft .NET Core Shared Framework Host
Version : 2.0.6
Build : 74b1c703813c8910df5b96f304b0f2b78cdf194d
VS Code version: Version 1.23.1 Commit d0182c3417d225529c6d5ad24b7572815d0de9ac Date 2018-05-10T17:11:17.614Z Shell 1.7.12 Renderer 58.0.3029.110 Node 7.9.0 Architecture x64
C# Extension version: ? :S
Steps to reproduce
Make a project directory with some template sln/csproj (useless when not processed) files which are alphabetically before the real (processed template) sln/csproj files. For example:
<projectdir>/AAA/MyProject.template.sln
<projectdir>/BBB/MyProject.sln (this one is generated, the input is MyProject.template.sln)
Omnisharp will use the template instead of the real MyProject.sln file.
Expected behavior
A good working editor instead of only having basic syntax highlighting.
Actual behavior
Facilities like autocomplete does not work outside of the working file because omnisharp is using a template file - which does not contain any useful information - instead of the real Solution File. A workaround is to rename my templates so not to use the SNL or CSPROJ extension. For example rename: MyProject.template.sln -> MyProject.sln.template. In which case omnisharp will ignore the file. I’ve seen other languages make use of choosing a project/xml/sln file from the editor which will be used. Something like that would be pretty nice!
Obliviously this is a very minor issue, especially if you know that renaming the templates will solve it. Just wanted to make a note of it!
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top GitHub Comments
Along the same lines: how do i set a default sln to use when i point to a folder with multiple slns?
@vramanx @janaka is working on a PR to contribute that functionality: https://github.com/OmniSharp/omnisharp-vscode/pull/2053