Extending a Web Application will redeploy your solutions ... watch for manual GAC updates

I was helping a customer yesterday that had an unexplained issue in production, a Web Part was behaving as if it had rolled back its code.  As it turns out, the following happened:

  • WSP containing DLLs to install in the GAC was deployed some time ago
  • A bug was discovered in production and there was time constraints in creating the quick fix through a WSP (permission issues)
  • The fix was applied in the DLL and they were manually deployed in the GAC
  • The WSP was also updated but never redeployed in production
  • IT Admins extended the Web Application to debug another non-related situation
  • The original WSPs were redeployed in the farm and the 'old' DLL was brought back

Debugging this obviously took some time, until we could have access to the production server to download the DLL in the GAC and disassemble it, but shows how bad a practice it is to have manually updated DLLs in the GAC that were originally deployed from WSP. 

Unfortunately, Best Practices goes only so far where we recommend using WSPs and sometimes we understand the benefits but not consequences such as this one.  There may be other operations that could redeploy solutions such as adding a farm server or installing a CU or SP but I didn't confirm this.

So all in all, if you have to manually update a deployed-through-WSP-DLL in the GAC, for whatever (political) reasons (which is usually because of permissions or rigid processes), plan to update the WSP as soon as possible.