Error Message during solution export:
The attribute with AttributeId = <GUID> was not found in the MetadataCache.
A field is deleted from CRM and the field is removed. But the related solution component reference is left behind somehow.
Find the component related to the field and remove it.
Note: Make sure to have a back-up of DB or the Org before performing below operations. Need developer level knowledge to perform this!
Step 1: Find the missing component. Get the solutioncomponentid and componenttype by executing the following fetchxml query after replacing the guid with the attributeid from the error message.
Note: You can XRM toolbox or C# console app to retrieve the record
Step 2: Get the "solutioncomponentid" and "componenttype" from the result of above fetchxml query and use "RemoveSolutionComponentRequest" to remove the component.
Hope this helps!