-
-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Environments
- IDE Version: Microsoft Visual Studio Community 2022, Version 17.11.2
- Extension Version: 1.8.0
- CSharpier Version: 0.29.1
- Operating System: Windows 11 Home 23H2 (OS Build 22631.4112)
- .csharpierrc Settings:
{ "printWidth": 100, "useTabs": false, "tabWidth": 4, "endOfLine": "crlf" } - .editorconfig Settings: None. Globally installed, and this issue happens in all projects, with and without the editor config (if present, it contains just one to two warning suppressions)
Log Output
[Info - 29.8.2024 20:07:32] Starting
[Debug - 29.8.2024 20:07:32] Ensure there is a csharpier process for D:\VS\AnyProject\AnyProject
[Debug - 29.8.2024 20:07:32] Looking for csproj in or above D:\VS\AnyProject\AnyProject that references CSharpier.MsBuild
[Debug - 29.8.2024 20:07:32] Running 'dotnet tool list' to look for version
[Debug - 29.8.2024 20:07:32] Output was:
Package Id Version Commands Manifest
---------------------------------------------------
[Debug - 29.8.2024 20:07:33] Running 'dotnet tool list-g' to look for version
[Debug - 29.8.2024 20:07:33] Output was:
Package Id Version Commands
------------------------------------------------------
csharpier 0.29.1 dotnet-csharpier
csharprepl 0.6.7 csharprepl
dotnet-example 3.1.0 dotnet-example
[Debug - 29.8.2024 20:07:33] Using 0.29.1 as the version number.
[Debug - 29.8.2024 20:07:34] dotnet csharpier --version output: 0.29.1
[Debug - 29.8.2024 20:07:34] Using 0.29.1 as the version number.
[Debug - 29.8.2024 20:07:34] CSharpier at C:\Users\admin\AppData\Local\CSharpier\0.29.1 already exists
[Debug - 29.8.2024 20:07:34] Adding new version 0.29.1 process for D:\VS\AnyProject\AnyProject
[Debug - 29.8.2024 20:07:34] Running C:\Users\admin\AppData\Local\CSharpier\0.29.1\dotnet-csharpier --server
[Warn - 29.8.2024 20:07:36] Spawning the csharpier server timed out.
[Debug - 29.8.2024 20:07:37] Ensure there is a csharpier process for D:\VS\AnyProject\AnyProject
[Debug - 29.8.2024 20:08:52] Ensure there is a csharpier process for D:\VS\AnyProject\AnyProject
[Info - 29.8.2024 20:08:54] Formatting started for D:\VS\AnyProject\AnyProject\Program.cs using CSharpier 0.29.1
[Warn - 29.8.2024 20:08:54] CSharpier process failed to start. Formatting cannot occur.
[Info - 29.8.2024 20:08:54] Formatted in 2ms
[Info - 29.8.2024 20:08:58] Formatting started for D:\VS\AnyProject\AnyProject\Program.cs using CSharpier 0.29.1
[Warn - 29.8.2024 20:08:58] CSharpier process failed to start. Formatting cannot occur.
[Info - 29.8.2024 20:08:58] Formatted in 0ms
[Debug - 29.8.2024 20:17:09] Ensure there is a csharpier process for D:\VS\AnyProject\AnyProject
[Debug - 29.8.2024 20:17:09] Ensure there is a csharpier process for D:\VS\AnyProject\AnyProject
[Debug - 29.8.2024 20:21:26] Ensure there is a csharpier process for D:\VS\AnyProject\AnyProject
Steps to reproduce
I don't know if there are any steps. But, this issue started appearing right after I switched from Visual Studio 2022 Preview (due to some issues (not csharpier)) to the stable version. Since this switch, the issue now appears on both versions.
Expected behavior
After starting Visual Studio 2022, CSharpier process and extension will load successfully and formatting will be available.
Actual behavior
Sometimes (usually once every day, doesn't seem to have any "pattern"), CSharpier process will fail to load and formatting is not available with the following Visual Studio message:
CSharpier could not be set up properly so formatting is not currently supported. Read More
As I said, this usually gets fixed by just restarting the IDE - but this is just a temporary fix and the error appears again after some time (a few hours usually), or sometimes (not always) on another IDE restart.
I tried the steps in Editor Troubleshooting at least twice: reinstalling CSharpier (also with deleting the %localappdata%\CSharpier), reinstalling the extension and checking for updates. Did not help. I will let you know if I manage to fix it without re-installing the whole IDE (I will reinstall soon if this issue does not stop.)