AvaloniaUI / AvaloniaVSCode

Visual Studio Code Extension for Avalonia UI
https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.vscode-avalonia
MIT License
103 stars 18 forks source link

Extension does not work when .NET 9 Previews is installed #120

Closed Mrcubix closed 4 months ago

Mrcubix commented 8 months ago

Describe the bug

Previewing & Auto-Complete stops working when .NET 9 is installed.

To Reproduce

Install any .NET 9 Previews.

Avalonia for VS Code

0.0.31

Avalonia version

11.0.4 - 11.0.10

VS Code version

1.85.2

Relevant log output

[AvaloniaTeam.vscode-avalonia]Unexpected token 'E', "Error pars"... is not valid JSON
$onExtensionRuntimeError @ mainThreadExtensionService.ts:81
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
y @ event.ts:1127
fire @ event.ts:1158
fire @ ipc.net.ts:650
V.onmessage @ localProcessExtensionHost.ts:376
mainThreadExtensionService.ts:82 SyntaxError: Unexpected token 'E', "Error pars"... is not valid JSON
    at JSON.parse (<anonymous>)
    at updateSolutionModel (c:\Users\tinta\.vscode\extensions\avaloniateam.vscode-avalonia-0.0.31\out\services\solutionParser.js:62:23)
    at ChildProcess.<anonymous> (c:\Users\tinta\.vscode\extensions\avaloniateam.vscode-avalonia-0.0.31\out\services\solutionParser.js:108:17)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Process.onexit (node:internal/child_process:302:5)

Additional context

For now, the only way to get it working again, is to uninstall .NET 9, which may require a reboot.

zhangchaoza commented 5 months ago

Use this version SolutionParser, and replace to AvaloniaVSCode data directory will solve this temporarily. extensions\avaloniateam.vscode-avalonia-0.0.31\solutionParserTool