csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

"CSharpier must be installed globally" yellow bar in VS

Open jods4 opened this issue 1 year ago • 3 comments

Context:

  • CSharpier is installed as a local dotnet tool in my projects that use it.
  • I have the VS extension installed, with Format on Save activated.
  • I also work on projects that don't have CSharpier installed, for which I don't want auto-formatting.

Any time I open a file that is not inside a project with a local CSharpier tool (e.g. a global file, or a project without CSharpier), the yellow bar appears at the top of VS to tell me CSharpier must be globally installed to format such files.

I suggest that you only display this notification once, then never again.

jods4 avatar Jan 18 '24 12:01 jods4

I thought I made it work that way, but maybe it is specific to a running instance. IE you close VS and re-open it, you will get the bar again.

belav avatar Jan 31 '24 18:01 belav

I did a quick bit of testing, it seems that indeed the gold bar doesn't re-appear in the VS instance that I'm working in. It does as soon as I open a new VS instance.

jods4 avatar Jan 31 '24 20:01 jods4

Would it be appropriate to only show the banner when "Reformat with CSharpier on Save" is enabled (or at least not disabled)?

I have one repository I use CSharpier for (at least, so far), and have Reformat with CSharpier on Save disabled globally but enabled for that repository. I would like to only see the banner in the repository where it's enabled, and only if CSharpier is not installed there.

klylesatepic avatar Aug 09 '24 21:08 klylesatepic