We have a solution that was recently changed from being globally deployed to deployed by web application in order to move binding redirects into the solution manifest (instead of using WebConfigModifications). The assemblies have DeploymentTarget="GlobalAssemblyCache"; there are farm scoped features within this solution.
This seemed to be fine in my initial tests, but now I am running into lots of "Could not load file or assembly" issues on different VMs. This is a scenario where an old version of the solution has been installed, retracted, and then I am installing the new version.
In particular, there's 2 assemblies in the .wsp, and there's a feature receiver in AssemblyA that uses a class in AssemblyB, and I get errors like:
Feature receiver assembly 'assemblyA', class 'FeatureReceiver', method 'FeatureInstalled' for feature 'GUID' threw an exception: System.IO.FileNotFoundException: Could not load file or assembly 'AssemblyB' or one of it's dependencies.
I've verified that AssemblyA and AssemblyB are in the GAC and their full names are correct. I tried re-signing the assemblies (and changing the full name in the feature xml) and changing the feature IDs but I think that's made it worse if anything (and now it can't load AssemblyA).
So - I'm left wondering: Is it OK to have a farm scoped feature inside of a solution with web application resources? Or could changing to web application resources have messed something up with something cached in SharePoint?