codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.91k stars 359 forks source link

Visual Studio Message box "Organizing Document...Waiting for background work to finish..." #776

Open mirrorleo opened 3 years ago

mirrorleo commented 3 years ago

Environment

codecadwallader commented 3 years ago

Thanks for reporting the issue. I have not been able to reproduce it yet. A few things to check:

  1. If you wait a minute between steps 1 and 2 to make sure the IDE is fully loaded, does the issue still occur? This could help rule out some asynchronous loading issues.
  2. Can you take a screenshot of the message box? That doesn't sound familiar so I'm not sure if it's coming from another extension.
  3. Can you include a minimal solution that exhibits the issue and your CodeMaid settings? Perhaps there is a combination of settings that is leading to this issue.
mirrorleo commented 3 years ago

Thank you very much for your reply.

  1. I wait a few minutes after opening the Solution to make sure that all IDEs are fully loaded,but the issue still occur.

image

2. I'm not sure if "CodeMaid" is in conflict with other extensions;  The only extensions installed in My VS are (XAML Styler) and (Productivity Power Tools 2017/2019).   The vs message box like this:

image

3. On my PC, any solution can reproduce the issue.  At present, I just created a new Windows Forms project. 
4. It is very important to open the solution without any files being opened. ( This means that the last time closed the solution, should closed all the files first. Then open the solution again.)

image

codecadwallader commented 3 years ago

Thanks for passing along that information and the screenshots. I think it is a conflict between CodeMaid and the operation that is doing the Organizing (not sure the source) where they're probably both triggering save events leading to a loop.

Something you can check within CodeMaid's configuration that may help:

  1. Under CodeMaid->Options->Cleaning->Visual Studio make sure that "Skip during automatic cleanup on save" is selected. This is the default but if it has been disabled it can lead to loop situations with other extensions.

A second thing to try if that doesn't help is to disable the other extensions and see if the issue still occurs.