You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extensions for regular VS2022 are built on the .net framework, so I assume that they are not compatible with VS2022 for Mac.
Assuming there is demand it would be nice to have one built for VS2022 for Mac. It can probably be based on the existing VS2022 extension. I don't have a Mac to do the work however.
The text was updated successfully, but these errors were encountered:
I've made an AppleScript to save with csharpier. It works but you might have to save twice for it to apply. You have to make a workflow and map it to the save cmd. It is better than nothing but a proper extension would be nice.
It is made for VS Preview and some path might not work for you. You can follow this explanation for Xcode that use the same technique : https://luisramos.dev/xcode-format-and-save
on run {input, parameters}
tell application "System Events"
tell process "Visual Studio (Preview)"
set frontmost to true
set solution to value of attribute "AXDocument" of front window
set solution to ((characters 8 thru -1 of solution) as string)
set reversesolution to reverse of solution's items as text
set solution to text 1 thru -(offset of "/" in reversesolution) of solution
set filepath to name of front window
set filepath to text ((offset of " – " in filepath) + 3) thru -1 of filepath
set filepath to text 1 thru ((offset of " – " in filepath) - 1) of filepath
set filepath to text 1 thru ((offset of "*" in filepath) - 1) of filepath
set cmd to "/bin/zsh -c 'source ~/.zshrc && /usr/local/share/dotnet/dotnet csharpier \"" & solution & filepath & "\"'"
set reversefilepath to reverse of filepath's items as text
set filename to text (-(offset of "/" in reversefilepath) + 1) thru -1 of filepath
try
click menu item ("Save " & filename) of menu "File" of menu bar 1
delay 1
on error errorMessage number errorNumber
log ("errorMessage: " & errorMessage & ", errorNumber: " & errorNumber)
end try
do shell script cmd
end tell
end tell
return input
end run
Extensions for regular VS2022 are built on the .net framework, so I assume that they are not compatible with VS2022 for Mac.
Assuming there is demand it would be nice to have one built for VS2022 for Mac. It can probably be based on the existing VS2022 extension. I don't have a Mac to do the work however.
The text was updated successfully, but these errors were encountered: