title: Permissions in windows forms
body: <p>We have developed an ERP system in Windows Forms,  users need to have granular permissions throughout the system. To achieve this, each form is pretty much its own exe. We have a main menu where we add a MenuItem to the database and we can then give users permission to access this.  We will then pass a  Guid through to each exe as an id for the "Session". Permissions are checked before the exe is launched not by the exe itself. </p>
  
  <p>So our "Main Menu" is built up of these exe's the table is "Id, Title, Exe,..,..). </p>
  
  <p>So over the years the project has grown, we now have one solution with over 800 small projects in it and  4 shared dll's (Data, BL,UI,Printing).  Our VS solution really struggles with performance. </p>
  
  <p>I was thinking of combining the forms into a few projects, using a custom attribute to use reflection to build the menu. I guess then, instead of launching an exe we would use reflection to instantiate the form and display it? Would this be the best way to go about this? Or is there some framework designed for Windows Forms that can handle this? </p>
  
  <p>Also would this improve VS performance? same amount of code just less projects? </p>
  
  <p>Aside from this we also have in-app permissions used to enable/disable controls. Though i don't think they would be affected by this. </p>