XamlStyler icon indicating copy to clipboard operation
XamlStyler copied to clipboard

Installing XamlStyler.Console as Local Tool doesn't work

Open michael-hawker opened this issue 3 years ago • 2 comments

Describe the bug Wanted to use dotnet tool restore to easily install all tools required by our CI and manage them all via a manifest vs. specific install commands everywhere (as we also wanted to use in git hooks as well).

Trying to run XamlStyler.Console as a dotnet local tool is failing to run properly (tried in PowerShell and in commandline). Validated that using a global install works, so problem seems to be specific to trying to run as a local tool.

To Reproduce Steps to reproduce the behavior:

  1. Install XamlStyler.Console as a local tool: https://github.com/Xavalon/XamlStyler/wiki/Script-Integration#install-as-a-local-tool dotnet tool install XamlStyler.Console
  2. Try running tool as a local tool: dotnet tool run xstyler -r -d . -p -c .\settings.xamlstyler -l Debug
  3. See error: Error: Must specify file(s) or directory

Note: if you install the global tool and just run xstyler -r -d . -p -c .\settings.xamlstyler -l Debug with the same line, it works fine.

Expected behavior Xstyler still able to run as a dotnet local tool.

Screenshots If applicable, add screenshots to help explain your problem.

Global tool installed and runs: image

Local tool installed and doesn't run: image

External Configuration If you are using an external configuration, please attach to help reproduce the issue.

Version Info (please complete the following information):

  • OS: Win 10 21H2 19044.1586
  • Visual Studio: VS 2022
  • XAML Styler: Console 3.2008.4

michael-hawker avatar Mar 30 '22 23:03 michael-hawker

any news on this? Problem is still here with 3.2206.4

skaman avatar Mar 12 '23 23:03 skaman

After some test, i ended up that using --directory instead of -d it work.

skaman avatar Mar 12 '23 23:03 skaman