Open sm-g opened 6 years ago
Thanks for reporting the issue, I am unable to reproduce it. A couple things to check:
I use solution specific settings:
I use 4.6.1 for development and also have 4.7.1
I found that issue gone after I switch menu item:
Should it overwrite solution-specific settings?
When you toggle the menu item, it should toggle the setting at the same level as if you opened the dialog and selected the toggle. So yes if you have solution-specific settings active it will toggle at the solution-specific level. If you close the solution it will toggle at the user level.
I have found this bug too. I have Automatic Cleanup on Save activated and it does not work.
EDIT: After toggling the option off and on, it suddenly started working. Appears to be a bug with the UI and not with the feature itself.
Interesting, can you consistently reproduce the issue?
I have had it multiple times when I open an existing solution that didn't contain that CodeMaid settings file.
If you export your user settings, can you confirm that automatic cleanup on file save is present?
Hello. I have the same issue here. I'm running VS Pro 2019 (16.11.9). CodeMaid version is V 12. I've tried uninstalling CodeMaid, updating Visual Studio, resetting default CM settings and no luck. If I manually navigate to the format setting or use the hotkey (CTRL + M, Space), it works. It only appears to not work when saving.
Here are my export settings:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="SteveCadwallader.CodeMaid.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
</configSections>
<userSettings>
<SteveCadwallader.CodeMaid.Properties.Settings>
<setting name="Feature_SettingCleanupOnSave" serializeAs="String">
<value>True</value>
</setting>
</SteveCadwallader.CodeMaid.Properties.Settings>
</userSettings>
</configuration>```
If you turn on diagnostics mode (CodeMaid->Options->Diagnostics mode) does that provide any helpful information in the Output window?
@codecadwallader I actually uninstalled and then pulled the extension off of the marketplace as opposed to using the extension manager in VS 2019 and it fixed my issue.
I still have the same problem. On several machines. Reinstalling the extension does not help and Automatic Cleanup on Save is activated.
This feature of automatic formatting is unfortunately one of the most important for me while working. I hope there will be a fix soon. I'm using the current Visual Studio 2022 version 17.7.4. But maybe it came from the VS update https://github.com/codecadwallader/codemaid/issues/1014
If you turn on diagnostics mode (CodeMaid->Options->Diagnostics mode) does that provide any helpful information in the Output window?
I have no output when saving a file if I enable the diagnostics mode. Even when I manually click Cleanup Active Document (which by the way works normally).
@codecadwallader I had the same issue, but not anymore. I described what I did in detail in my reply to #1014, here
Diagnostics mode didn't issue any meaningful output to the very end, when saving the current document. It did, though, output all debug info on manual call to Cleanup Active Document, in constrast with the above comment.
Since VS 15.6.1 CodeMaid 10.4 Widnows 7
after update VS - saving file does not trigger CodeMaids's Cleanup action. It works when I manually hit "Cleanup active document"