Xavalon / XamlStyler

Visual Studio extension to help format your XAML source code
Apache License 2.0
1.18k stars 128 forks source link

Installing XamlStyler.Console as Local Tool doesn't work #376

Open michael-hawker opened 2 years ago

michael-hawker commented 2 years ago

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):

skaman commented 1 year ago

any news on this? Problem is still here with 3.2206.4

skaman commented 1 year ago

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