AvaloniaVSCode
AvaloniaVSCode copied to clipboard
Why doesn't my VSCode prompt like this?
Describe the bug
Why does it prompt such an error? I was originally in a Dotnet 8.0 environment, but when the plugin page indicated that 9.0 was required, I uninstalled 8.0 and installed 9.0, but it still doesn't work
To Reproduce
When opening the project, it prompts like this
Avalonia for VS Code
11.2.1.1
Avalonia version
0.0.32
VS Code version
1.98.2
Relevant log output
2025-03-21 15:04:04.052 [info] Creating language service
2025-03-21 15:04:04.052 [info] Starting Avalonia Language Server...
2025-03-21 15:04:04.052 [info] [Trace - 15:04:04] Sending request 'initialize - (0)'.
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Client Avalonia LSP: connection to server is erroring. Shutting down server.
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Stopping server failed
2025-03-21 15:04:04.052 [info] Error: Client is not running and can't be stopped. It's current state is: starting
at LanguageClient.shutdown (/Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/node_modules/vscode-languageclient/lib/common/client.js:914:19)
at LanguageClient.stop (/Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/node_modules/vscode-languageclient/lib/common/client.js:885:21)
at LanguageClient.stop (/Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/node_modules/vscode-languageclient/lib/node/main.js:150:22)
at LanguageClient.handleConnectionError (/Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/node_modules/vscode-languageclient/lib/common/client.js:1146:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Server initialization failed.
2025-03-21 15:04:04.052 [info] Message: write EPIPE
Code: -32099
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Avalonia LSP client: couldn't create connection to server.
2025-03-21 15:04:04.052 [info] Message: write EPIPE
Code: -32099
2025-03-21 15:04:04.052 [info] Failed to start Avalonia Language Server. Error: write EPIPE
2025-03-21 15:04:04.052 [info] [Info - 15:04:04] Connection to server got closed. Server will restart.
2025-03-21 15:04:04.052 [info] true
2025-03-21 15:04:04.052 [info] [Trace - 15:04:04] Sending request 'initialize - (0)'.
2025-03-21 15:04:04.052 [info] You must install or update .NET to run this application.
App: /Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/avaloniaServer/AvaloniaLanguageServer.dll
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (arm64)
.NET location: /usr/local/share/dotnet/
The following frameworks were found:
9.0.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=arm64&rid=osx-arm64&os=osx.15
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Client Avalonia LSP: connection to server is erroring. Shutting down server.
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Stopping server failed
2025-03-21 15:04:04.052 [info] Error: Client is not running and can't be stopped. It's current state is: starting
at LanguageClient.shutdown (/Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/node_modules/vscode-languageclient/lib/common/client.js:914:19)
at LanguageClient.stop (/Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/node_modules/vscode-languageclient/lib/common/client.js:885:21)
at LanguageClient.stop (/Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/node_modules/vscode-languageclient/lib/node/main.js:150:22)
at LanguageClient.handleConnectionError (/Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/node_modules/vscode-languageclient/lib/common/client.js:1146:18)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Server initialization failed.
2025-03-21 15:04:04.052 [info] Message: write EPIPE
Code: -32099
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Avalonia LSP client: couldn't create connection to server.
2025-03-21 15:04:04.052 [info] Message: write EPIPE
Code: -32099
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Restarting server failed
2025-03-21 15:04:04.052 [info] Message: write EPIPE
Code: -32099
2025-03-21 15:04:04.052 [info] [Info - 15:04:04] Connection to server got closed. Server will restart.
2025-03-21 15:04:04.052 [info] true
2025-03-21 15:04:04.052 [info] [Trace - 15:04:04] Sending request 'initialize - (0)'.
2025-03-21 15:04:04.052 [info] You must install or update .NET to run this application.
App: /Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/avaloniaServer/AvaloniaLanguageServer.dll
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (arm64)
.NET location: /usr/local/share/dotnet/
The following frameworks were found:
9.0.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=arm64&rid=osx-arm64&os=osx.15
2025-03-21 15:04:04.052 [info] You must install or update .NET to run this application.
App: /Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/avaloniaServer/AvaloniaLanguageServer.dll
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (arm64)
.NET location: /usr/local/share/dotnet/
The following frameworks were found:
9.0.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=arm64&rid=osx-arm64&os=osx.15
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Server initialization failed.
2025-03-21 15:04:04.052 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-03-21 15:04:04.052 [info] [Info - 15:04:04] Connection to server got closed. Server will restart.
2025-03-21 15:04:04.052 [info] true
2025-03-21 15:04:04.052 [info] [Error - 15:04:04] Avalonia LSP client: couldn't create connection to server.
2025-03-21 15:04:04.052 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-03-21 15:04:04.052 [info] [Trace - 15:04:04] Sending request 'initialize - (0)'.
2025-03-21 15:04:04.052 [info] You must install or update .NET to run this application.
App: /Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/avaloniaServer/AvaloniaLanguageServer.dll
Architecture: arm64
2025-03-21 15:04:04.052 [info] Framework: 'Microsoft.NETCore.App', version '8.0.0' (arm64)
.NET location: /usr/local/share/dotnet/
The following frameworks were found:
9.0.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=arm64&rid=osx-arm64&os=osx.15
2025-03-21 15:04:04.053 [info] [Error - 15:04:04] Server initialization failed.
2025-03-21 15:04:04.053 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-03-21 15:04:04.053 [info] [Info - 15:04:04] Connection to server got closed. Server will restart.
2025-03-21 15:04:04.053 [info] true
2025-03-21 15:04:04.053 [info] [Error - 15:04:04] Avalonia LSP client: couldn't create connection to server.
2025-03-21 15:04:04.053 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-03-21 15:04:04.053 [info] [Error - 15:04:04] Restarting server failed
2025-03-21 15:04:04.053 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-03-21 15:04:04.054 [info] [Trace - 15:04:04] Sending request 'initialize - (0)'.
2025-03-21 15:04:04.055 [info] You must install or update .NET to run this application.
App: /Users/yao/.vscode/extensions/avaloniateam.vscode-avalonia-0.0.32/avaloniaServer/AvaloniaLanguageServer.dll
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (arm64)
2025-03-21 15:04:04.055 [info] .NET location: /usr/local/share/dotnet/
The following frameworks were found:
9.0.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=arm64&rid=osx-arm64&os=osx.15
2025-03-21 15:04:04.056 [info] [Error - 15:04:04] Server initialization failed.
2025-03-21 15:04:04.056 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-03-21 15:04:04.056 [info] [Error - 15:04:04] The Avalonia LSP server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
2025-03-21 15:04:04.056 [info] [Error - 15:04:04] Avalonia LSP client: couldn't create connection to server.
2025-03-21 15:04:04.056 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-03-21 15:04:04.056 [info] [Error - 15:04:04] Restarting server failed
2025-03-21 15:04:04.056 [info] Message: Pending response rejected since connection got disposed
Code: -32097
Additional context
No response
I found that I switched to 0.0.31 He can work now
Resolved by #158