Warren Ayen

Warren Ayen

  • NA
  • 1
  • 1.1k

Constant Designer Errors (Unable to design/load)

Dec 16 2013 12:10 PM
We have a large enterprise-wide Point of Sale system (in production finally, yay) that is comprised of 4 solutions: Backend, Frontend, Services, and Plugins. The Backend solution is where virtually all classes and shared controls are, culminating in a project called "Shared". Every project in all four solutions references Shared. All backend projects build into a project called BackendMaster and all frontend, plugin, and services projects reference the dll's in the bin\debug folder of BackendMaster. All solutions are 3.5 and all projects are set to build to x86 (due to an x86-specific check scanning driver).

The problem we're encountering is this: when we first open frontend in Visual Studio 2010, most designers will fail with a wide range of exceptions, usually saying xxx control was never declared. Ignoring will, of course, delete these controls from the designer. The only way around it is to build back end and then build front end, then open the designer. Most of the time they will work from that point on. However, if you make a change to the designer (or any number of changes), save it, build front end and run the program, when you return you will never be able to edit the designer again. It will tell you that it couldn't find Shared 1.0.0.0. The only solution is to close Visual Studio, start it up again, build back end and build front end, and then open the designer again. I believe all of the exceptions are stemming from being unable to load Shared, though why it can't is beyond me. I've had limited success removing Shared from the references and adding it back in but that's frustrating and more time-consuming than reloading the solution.

That's not the only one. All of the sale items are user controls with this chain of inheritance: UserControl > PUserControl > CESalesItemType > Sales Item. I can open PUserControl's designer fine. I can open CESalesItemType's designer fine. But I can't open any that inherit from CESalesItemType; I get an error saying than none of the classes (CESalesItemType) can be designed. Nothing works. Nothing fixes it. No matter how many cleans or rebuilds, it won't allow us to view the designers any more for any class inheriting from CESalesItemType.

None of us have been able to figure this out and it adds hours every day to our development time when the smallest designer change is five minutes of reloading and rebuilding the solutions.