We've had a couple of merge issues that have resulted in bugs escaping early detection. Most recently, this is (presumed) our failure case:

  • A developer commits code including ASPX, codebehind, and designer
  • During a merge, the ASPX wasn't merged correctly, and new changes were lost
  • New controls in the ASPX were lost, but they were still declared in the designer file, and thus the codebehind compiled correctly.

Manually regenerating the designer files would have broken the build, as the controls the codebehind references would be missing. Unfortunately, they are still declared in the designer file and thus the only way to detect the problem was to use the page at runtime and realize functionality was missing.

Sometimes this is subtle and is not immediately noticed, leading to QA (or customers) discovering the issue instead of developers.

This specific problem can be eliminated by forcing the designer files to regenerate either at build time (ideally since we have a CI server), or at least when the solution is opened or built. Problem is, the designer tooling seems to be really baked into Visual Studio with few possibilities for automation.

Has anyone been able to force regenerate their designer files, or found a workflow that eliminates silent merge errors?

Related posts

Recent Viewed