I recently took over a web project. The data layer is one auto generated class file separated in an independent project. I have no idea what tool they used to generate the class file.
The problem: The file is a series of partial classes (5000+ class) summed to over 7 million line of code. (DLL file generated is around 70Mb)
Adding to it some custom partial classes in 2 files.
The project does not open in VS2013 or 2015 because VS go out of memory and crash after several minutes. They are using VS 2012 now. Building the project take around 10-20 minutes on an I7 PC with 6G of RAM.
Solution: 1- I was able to create a simple code that separated the partial classes in separated files. So now I have a project with 5000+ file and that is making it a little bit more readable and manageable in VS.
Still the main class is around 80K line of code.
2- I know that 70% of the generated code is not used in the web project so I tried to find a automated way to delete unused code. Unfortunately no tool can handle the big mess I have.
3- Finally I was thinking of separating the auto generated classes in an independent project and pull it out of the solution so other project can just reference the DLL. But my plan failed as the 2 custom files in the data layer project are regularly updated and are also partial classes.
I would appreciate any idea that can solve any of my problems.
Thanks,