Hello thanks for your response
I triple checked- the solution is a Managed solution in Production and i am exporting a managed solution. I never make changes in Production environment. only in Development and then export and Import into Production.
I did some more digging and it looks like the error message is misleading.
I selected the Solution and then looked at the History. There was more information on the error. It showed:
Error code:
8004F01D
Exception message
Solution dependencies exist, cannot uninstall. DependencyCount : 1
So I selected the SOlution and checked the dependencies. I get the same message that cannot uninstall solution because of dependencies. It shows a component library that i am using in 2 different solutions as the dependency.
I did a search and found this article which looked promising
Cannot Uninstall Solution error when removing solutions - Dynamics 365 Sales | Microsoft Learn
However, I tried to follow the steps, and delete one of the solutions, however, i always get the same message. Cannot delete the solution because of the dependency. SO I modified the solution that I am trying to delete and removed the component library, and tried to import this new version into Production, but still get the same message. Cannot upgrade the solution because cannot delete the old version because of the dependency.