Handle projects that use <TargetFrameworks> instead of <TargetFramework>#8
Handle projects that use <TargetFrameworks> instead of <TargetFramework>#8l0hn wants to merge 2 commits intoAvaloniaUI:mainfrom
Conversation
…d project using first framework found.
| Console.WriteLine(jsonStr); | ||
| } | ||
|
|
||
| static string? GetFirstFramework(MSProject proj, out bool hasMultipleFrameworks) |
There was a problem hiding this comment.
I am not sure has this API is exactly used in VSCode extension.
But for VisualStudio extension we prioritize plain "netx.0" target framework over platform specific, and macos/windows as a second choice (if on that platform).
There was a problem hiding this comment.
There was a problem hiding this comment.
For example, if project has "net8.0-ios" as a first framework, previewer will still fail.
There was a problem hiding this comment.
As for SolutionParserCommand, it would make sense to return multiple projects in this situation. So, the caller can decide which framework to use (in this case, VSCode extension).
There was a problem hiding this comment.
Will the language server handle multiple entries for the same .csproj file? If so it would make sense to add a project entry for each framework listed.
Fixes bug where projects that use
<TargetFrameworks>instead of<TargetFramework>are not parsed, leading to lack of autocompletion from LSP.