XamlStyler
XamlStyler copied to clipboard
Visual Studio 2022 for Mac
Include support for Visual Studio 2022 for Mac RC1
This is the only thing missing before I can move to the new version
Yes, please!
My "workaround" on 2022 right now is just opening up 2019 to re-save all my XAML when I'm ready to make a commit.
Edit: in the meantime, the below suggestion to use the cli tool manually has worked very well so far.
Install the cli tool per wiki and run xstyler -f *.xaml. Wrap that up in gulp or grunt script to look for xaml file changes and auto formatting.
This is highly requested! @grochocki When should we expect support for VS For Mac 2022?
any updates on this??
Are there any update on this? Using VS for Mac 2022 is almost mandatory on M1 chip Macbook's, so it's really important to have the XAML Styler for that IDE too.
Not optimal, but you can use both VS external tool feature and a script
![image](https://user-images.githubusercontent.com/21014908/184908942-42b71bd4-bcf7-42dd-a48f-7e56851c998e.png)
Script example to adapt:
#!/usr/bin/env bash
xaml_styler=$HOME/.nuget/packages/xamlstyler.console/3.0.0/tools/xstyler.exe
filename=$1
if [ ! -f $xamlstyler ]; then
echo "XamlStyler not found ($xamlstyler)"
exit 1
fi
mono $xaml_styler -f $filename
Sorry for the long silence on this everyone. I have been looking into the extension story for VS4Mac and it's all very confusing. It looks like no documentation exists, can't find an SDK and I'm reading several reports on how publishing is not possible right now either. I have reached out to Microsoft for more information and will keep you posted.
I am using this script, working great!
`#!/usr/bin/env bash
xaml_styler=$HOME/.nuget/packages/xamlstyler.console/3.2206.4/tools/net6.0/any/xstyler.dll filename=$1
if [ ! -f $xamlstyler ]; then echo "XamlStyler not found ($xamlstyler)" exit 1 fi
dotnet $xaml_styler -f $filename `
not sure why the need to wrap it in a script.
Replace {macUser} with your user folder
External Tool settings
Command: /Users/{macUser}/.dotnet/tools/xstyler
Arguments: -f ${FileDir}/${FileName} -c /Users/{macUser}/projects/settings/xstyler.json
I'm passing a config file with custom settings
KeyBinding: ctrl shift f
update on this: thanks to the MFractor team we now have an idea on where to start and are actively working on porting the VS4mac extension to VS 2022. Since there are quite a few breaking changes in the extension SDK this will however take a while.
Should anyone be interested in helping out, let me know and hopefully we can get a working version out soon.
update on this: thanks to the MFractor team we now have an idea on where to start and are actively working on porting the VS4mac extension to VS 2022. Since there are quite a few breaking changes in the extension SDK this will however take a while.
Should anyone be interested in helping out, let me know and hopefully we can get a working version out soon.
@NicoVermeir , I am the author of the initial version of Visual Studio for Mac extension, maybe I can help with this port. But I definitely will need help of the MFractor team, they have much greater expertise and Microsoft has drastically changed Visual Studio for Mac 2022
@Saratsin would love your help! I'm at the point where it builds but when I run the extension I get a file not found exceptions on the Irony library. Any ideas on that one? If you want I can publish the branch already so you can take a look
@NicoVermeir yes, publish please your changes to the separate branch, I will check how it is working there
@Saratsin great! here it is: https://github.com/Xavalon/XamlStyler/tree/feature/vs4mac2022
Hey guys any updates, I am getting restless 😀
@FreakyAli still working on it, it's not an easy upgrade :)
@NicoVermeir Wish I could somehow show you my appreciation to you...
quick update on this: basic functionality is working, but I'm having trouble getting the options panel in VS4mac. I'm not an experienced Mac UI developer so I could use some help here if anyone's up for it.
Any news regarding VSMac2022 version?
@bcaceiro I'm still looking for help since I have limited access to a mac, and limited knowledge about vs4mac
@roughiain can you please explain little bit more how this should work? do you have to download on the path /Users/{macUser}/.dotnet/tools/xstyler ? what i am supposed to have it here?
Install as a global tool
dotnet tool install --global XamlStyler.Console
More info as using it as script here https://github.com/Xavalon/XamlStyler/wiki/Script-Integration
Guess we can close this now with VSMac being EOL