XamlStyler icon indicating copy to clipboard operation
XamlStyler copied to clipboard

Visual Studio 2022 for Mac

Open roughiain opened this issue 2 years ago • 19 comments

Include support for Visual Studio 2022 for Mac RC1

roughiain avatar May 01 '22 12:05 roughiain

This is the only thing missing before I can move to the new version

timahrentlov avatar May 04 '22 09:05 timahrentlov

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.

nicjay avatar May 12 '22 21:05 nicjay

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.

roughiain avatar May 13 '22 14:05 roughiain

This is highly requested! @grochocki When should we expect support for VS For Mac 2022?

HL-Tech avatar Jun 21 '22 09:06 HL-Tech

any updates on this??

waletoye avatar Jun 23 '22 10:06 waletoye

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.

tamasszadvari avatar Aug 12 '22 08:08 tamasszadvari

Not optimal, but you can use both VS external tool feature and a script

image

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

rudyspano avatar Aug 16 '22 14:08 rudyspano

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.

NicoVermeir avatar Aug 17 '22 05:08 NicoVermeir

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 `

Saccomani avatar Aug 21 '22 19:08 Saccomani

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

roughiain avatar Aug 26 '22 08:08 roughiain

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 avatar Sep 02 '22 06:09 NicoVermeir

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 avatar Sep 03 '22 12:09 Saratsin

@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 avatar Sep 05 '22 05:09 NicoVermeir

@NicoVermeir yes, publish please your changes to the separate branch, I will check how it is working there

Saratsin avatar Sep 08 '22 07:09 Saratsin

@Saratsin great! here it is: https://github.com/Xavalon/XamlStyler/tree/feature/vs4mac2022

NicoVermeir avatar Sep 12 '22 07:09 NicoVermeir

Hey guys any updates, I am getting restless 😀

FreakyAli avatar Sep 22 '22 16:09 FreakyAli

@FreakyAli still working on it, it's not an easy upgrade :)

NicoVermeir avatar Sep 22 '22 16:09 NicoVermeir

@NicoVermeir Wish I could somehow show you my appreciation to you...

FreakyAli avatar Sep 22 '22 16:09 FreakyAli

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.

NicoVermeir avatar Oct 03 '22 05:10 NicoVermeir

Any news regarding VSMac2022 version?

bcaceiro avatar Jan 21 '23 08:01 bcaceiro

@bcaceiro I'm still looking for help since I have limited access to a mac, and limited knowledge about vs4mac

NicoVermeir avatar Jan 23 '23 09:01 NicoVermeir

@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?

EmilAlipiev avatar Feb 25 '23 15:02 EmilAlipiev

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

roughiain avatar Feb 25 '23 17:02 roughiain

Guess we can close this now with VSMac being EOL

roughiain avatar Aug 31 '23 15:08 roughiain