It isn't a bug, the debugger will stop on all errors even errors that would be handled. If you rebuild the entire solution first, then you can just click continue on each error in the debugger, the error will be handled and it will redirect to /Setup/Default.aspx to run the needed upgrade script. Or instead of launching the debugger, just rebuild the solution, then right click the Default.aspx page in the root and choose "View in Browser". This is much faster than running it in the debugger and it won't break on every error like in the debugger. I only use the debugger when I really need to step through the code.