codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

Reorganizing not working in Shared Project

Open seangifford opened this issue 7 years ago • 4 comments

Environment

  • Visual Studio version: [2017 Professional 15.8.4]
  • CodeMaid version: [10.5.119]
  • Code language: [C#]

Description

Running Cleanup or Reorganize does nothing in a C# file that belongs to a Shared Project. Seems similar to #2 as Spade does not seem able to process the file either.

Steps to recreate

Create a Shared Project with a C# file View with Spade - will not be able to load Attempt to Clean or Reorganize - nothing will be reorganized, and Output will show no errors

seangifford avatar Sep 12 '18 20:09 seangifford

Thanks for reporting the issue, I can confirm that I see the same. I'll see if the same technique that worked on #2 will work here.

codecadwallader avatar Sep 16 '18 14:09 codecadwallader

Unfortunately no, it's not that easy. It reports as a generic C# project and while attempting to lookup the project items via the same similar routine as universal projects works, there is no underlying FileCodeModel on that item so there's nothing to report/process.

codecadwallader avatar Sep 16 '18 14:09 codecadwallader

I found a weird workaround. I turned on "Run reorganize at start of cleanup" in CodeMaid options under Reorganizing->General. Then, if i right click on one of the "real" projects that references the shared project, CodeMaid ran reorganization on all the code in my shared project.

cmjacobs avatar Aug 20 '20 21:08 cmjacobs

Even with the workaround - it does not reorganize my classes...