Plugins - better support for dotnet tool commands
still exists for csharpier v0.24.1 + rider plugin v1.3.7 + macOS + globally installed tool.
since it's hard to set PATH environment variable for macOS GUI apps, the PATH env is default and does not contain dotnet tools install -g dir. ~/.dotnet/tools/
$ which dotnet-csharpier
/Users/magicdawn/.dotnet/tools/dotnet-csharpier
suggestions:
- replace
dotnet csharpier --versionwithsh -c "dotnet csharpier --version"on posix systems (unix & macOS), let shell loadsPATHfrom.bash_profile/.zshenvetc - add search support for
~/.dotnet/tools, since it's the default global install location. see https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install#description
https://github.com/belav/csharpier/blob/rider-1.3.7/Src/CSharpier.Rider/src/main/java/com/intellij/csharpier/CSharpierProcessProvider.java#L161
And a note for other macOS users want to set PATH for GUI apps
launchctl config user path "xxxx1:xxxx2:xxxx3", requires reboot
see https://github.com/hschmidt/EnvPane#why-cant-i-set-path-with-envpane
Originally posted by @magicdawn in https://github.com/belav/csharpier/issues/716#issuecomment-1532178103
Related
Cannot format in Rider. I'm getting SEVERE - #c.i.c.CSharpierLogger - Cannot run program "dotnet": error=2, No such file or directory This is on linux. Seems that adding env DOTNET_ROOT fixed the problem
See if we can use the same option rider uses for finding dotnet if it is not available on the PATH. It is at Settings | Build,Execution,Deployment | and Build | .NET Core CLI executable path Can we retrieve it somehow?