codemaid
codemaid copied to clipboard
CodeMaid doesn't start automatically for CMake projects
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.
I've always had this issue across multiple versions of both VS2019 and VS2022.
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?
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.
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