Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS 2022 "Ensure there is a csharpier process for ..." #1260

Open
dlgombert opened this issue May 16, 2024 · 1 comment
Open

VS 2022 "Ensure there is a csharpier process for ..." #1260

dlgombert opened this issue May 16, 2024 · 1 comment

Comments

@dlgombert
Copy link

Environments

  • IDE Version: Visual Studio Community 2022 (64-bit) Version 17.10.0 Preview 7.0
  • Extension Version: 1.7.3
  • CSharpier Version: 0.28.2
    will NOT be the same as the extension version
  • Operating System: Windows 10 Pro (64-bit) 10.0.19045 Build 19045
  • .csharpierrc Settings: n/a
  • .editorconfig Settings: Will include on request. It's a pretty big file. It doesn't appear to be related to this issue though.

Log Output

[Debug - 5/16/2024 9:25:41 AM] Ensure there is a csharpier process for C:\Directory
[Info - 5/16/2024 9:25:50 AM] Formatting started for  C:\Directory\File.txt using CSharpier 0.28.2
[Warn - 5/16/2024 9:25:50 AM] CSharpier process failed to start. Formatting cannot occur.
[Info - 5/16/2024 9:25:50 AM] Formatted in 0ms

(The above repeats automatically every time I save or try to format a file)

This message: [Debug - 5/16/2024 9:25:41 AM] Ensure there is a csharpier process for C:\Directory repeats every time I activate a tab and C:\Directory is whatever directory the file is in.

Steps to reproduce
I just noticed this yesterday, and I'm not aware of having done anything different prior to seeing the message. I closed Visual Studio and followed the debugging steps and installed csharpier as specified as well as installing it globally and locally with the dotnet tool. When I restarted VS all was working again. When I fired up VS this morning, it was back to not working, just like before the reinstall yesterday.

Expected behavior
It should format my file when I save or execute format command.

Actual behavior
The document isn't formatted and errors are logged to the output panel.

@belav
Copy link
Owner

belav commented Jun 7, 2024

There is a good chance you are running into CSharpier trying to use a port that windows has reserved. See #1249 (comment)

For now you can use the DisableCSharpierServer option if you don't want to screw with the port settings. I'm hoping to have the extensions updating soon to only use CSharpierServer for 0.29+ along with actually releasing 0.29.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants