codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

CodeMaid doesn't start automatically for CMake projects

Open Trider12 opened this issue 1 year ago • 3 comments

Environment

  • Visual Studio version: 2019/2022 Community
  • CodeMaid version: 12.0
  • Code language: C++

Description

If you open a CMake project, the extension doesn't start working until you press Options or About. After that everything works fine.

image

I've always had this issue across multiple versions of both VS2019 and VS2022.

Trider12 avatar Apr 14 '23 22:04 Trider12

Thanks for reporting the issue. All extensions (starting in VS2019) are now asynchronously loaded by the IDE in order to improve the startup experience. If you wait a few moments until the IDE fully loads (e.g. status bar quiets down about background loading), do you still see this behavior?

codecadwallader avatar Apr 29 '23 19:04 codecadwallader

No, it cannot be fixed by waiting. Again, I've been having this issue for a very long time across multiple VS versions and different machines.

Trider12 avatar May 01 '23 12:05 Trider12

Ok, I'm able to reproduce the issue. We explicitly auto load the extension once a solution is opened so that we have context about what kind of solution (e.g. C#, C++) is being utilized. It looks like CMake projects are a specific type of project that do not use the solution concept, which is why this automatic load doesn't happen. It may be possible to setup additional auto load conditions based on folder opens, but I'm not sure if that has any undesirable side effects.

https://github.com/codecadwallader/codemaid/blob/dev/CodeMaidShared/CodeMaidPackage.cs#L46

codecadwallader avatar May 06 '23 13:05 codecadwallader