csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

Rider: versions greater than 1.8.4 not working

Open aaron-manning opened this issue 11 months ago • 6 comments

Environments

  • IDE Version: JetBrains Rider 2024.2.7
  • Extension Version: > 1.8.4
  • CSharpier Version: 0.30.6 will NOT be the same as the extension version
  • Operating System: Windows
  • .csharpierrc Settings:
  • .editorconfig Settings:

Log Output There's nothing in the log, surprisingly

Steps to reproduce Install any version of csharpier > 1.8.4 and 'Reformat with CSharpier' is no longer available. If 'show disabled actions' is selected, it will be displayed but cannot be used.

Expected behavior It works just like 1.8.4, I had to roll back and now there are no problems.

aaron-manning avatar Jan 31 '25 19:01 aaron-manning

I haven't been able to reproduce this. I am using rider 2024.3.4, not sure if that would matter. I tested using the extension version 2.0.0 and csharpier 0.30.6

Did you enable the debug logs in rider? here I think a lot of the initial logs are debug logs, so maybe that would explain why you aren't seeing anything.

belav avatar Feb 02 '25 17:02 belav

Same problem. Rider 2024.3.5 with the extension version 2.1.1

The log reports:

SEVERE - #c.i.c.CSharpierLogger - Cannot run program "C:\Users\MyUser\AppData\Local\CSharpier\0.30.6\dotnet-csharpier" (in directory "C:\Users\MyUser\AppData\Local\CSharpier\0.30.6"): CreateProcess error=2, The system cannot find the file specified

SEVERE - #c.i.c.CSharpierLogger - JetBrains Rider 2024.3.5 Build #RD-243.24978.27 SEVERE - #c.i.c.CSharpierLogger - JDK: 21.0.5; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o. SEVERE - #c.i.c.CSharpierLogger - OS: Windows 11 SEVERE - #c.i.c.CSharpierLogger - Plugin to blame: csharpier version: 2.1.1 SEVERE - #c.i.c.CSharpierLogger - Last Action: WelcomeScreen.Plugins

...

BTW: The csharpier tool version 0.25.0 was initially installed globaly and worked fine with the above version of the plugin. The trouble began after the tool was globaly upgraded to the latest version (0.30.6).

weaver76 avatar Feb 19 '25 07:02 weaver76

Just to follow up on my previous post:

I have managed to work around the problem by manually creating the folder structure expected in AppData and copying required files from the actual location the tool was installed to.

It looks like the global installation put the files in the %UserProfile%/.dotnet/tools, which was not what the plugin expected.

BTW: The version of .NET SDK used is 9.0.103

Hope it helps.

weaver76 avatar Feb 19 '25 09:02 weaver76

One more update.

Just dug deeper into the logs and found out that at one point the dotnet tool utility failed to perform a "tool-path" global installation into the AppData folder, and so afterwards the plugin was unable to locate and start the executable, which was not there. The blame for that goes to the local nuget store infrastructure, which did not work properly. So, in my case, the culprit was the infrastructure, not the tooling itself.

weaver76 avatar Feb 19 '25 11:02 weaver76

Just tried the latest version of Rider + CSharpier plugin + CSharpier global install Seems to be working OK. Can anyone else confirm fixed?

aaron-manning avatar May 15 '25 18:05 aaron-manning