web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Solution failed to imp...
Power Automate
Unanswered

Solution failed to import: Solution Upgrade action failed after import as holding. InnerException is: Solution dependencies exist, cannot uninstall.

(3) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I'm trying to understand how to import an updated solution, but I tend to run into this same error with different projects.

 

Initially, I imported my solution from my dev environment to my prod environment as a managed solution. Then, I modified my dev solution, which includes removing an environment variable that is no longer necessary. When I try to import this updated solution into prod, I choose the Upgrade option:

Jsalaz1989_0-1636977952410.png

This option explicitly states that "any objects not present in the newest solution will be deleted". Yes, that is precisely what I'm hoping for, I don't want to see that old environment variable in prod, since it is no longer necessary.

 

However, when I try to upgrade, I get this error:

Jsalaz1989_1-1636978116517.png

 

As far as I understand, it's complaining that "Solution dependencies exist, cannot uninstall." and specifically mentions a certain EnvironmentVariableDefinition. But isn't that exactly what Upgrade claimed to do? I know that variable currently exists, the whole point is to detect that it exists in prod but not in dev and therefore get rid of it.

 

You can also see that it creates a new solution, tacking on "_Upgrade" to the name, instead of replacing the old one.

 

This has happened often with other solutions so in prod I just end up erasing the old solution and importing the new one as if it were the first time prod ever sees this solution. However, this doesn't feel right. There is either something I'm misunderstanding about the Upgrade option, or something is not working right on Microsoft's side. Maybe I should always be using Update instead, idk, but it's not clear by the import wizard.

 

Also, in time I would like to automate this headache-y and manual devops flow I currently use (there are other issues or quirks that arise when doing this manually it seems). Perhaps when I do get some ALM going, then this error will no longer appear, but for now I would really like to understand what's happening as I step through this manually.

 

Thanks

Categories:
  • Nievechica24 Profile Picture
    20 on at

    I am getting the exact same error. Am I importing the solution incorrectly or is this a known issue?

  • Mikael Andersen Profile Picture
    46 on at

    @Anonymous Running into the same issue however for us it's dropping a column.

     

    Did you find a solution or are we left with deleting the solution first - that seems very wrong to me.

     

    As a side note we have ALM up and running, but that makes not difference. Actually fails more often than manually exporting and importing.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have not found a better workaround than deleting the prod solution and re-importing it. I agree that it seems quite wrong.
    And of course we get no input from Microsoft here. I've even tried contacting our company's MS support people directly and they just ignored me. And that Tata Consultancy group they use was copied as well, but nobody replied.

  • SynapticSci Profile Picture
    on at

    Having the same problem today. Anyone know a workaround? 

  • Daved5 Profile Picture
    54 on at

    I am having the same problem.  I am nervous to delete the Solution in Production.  I assume, that this will not delete the tables that are part of the solution ?  Can someone confirm that i will not lose the data in the tables of the solution in production ?

  • Mikael Andersen Profile Picture
    46 on at

    @Daved5 You should be nervous. If you uninstall/delete the solution that data will be lost, so in most cases is not an option. See this link https://learn.microsoft.com/en-us/power-platform/alm/maintain-managed-solutions where they state below:

    mikael_andersen_0-1664788585980.png

     

  • Nievechica24 Profile Picture
    20 on at

    After working with Microsoft Support, they had us delete the existing solution, go into the solution called "Default Solution" within that environment, delete all of the connection references and custom connector connections we had and then re-import. It worked for us after that. Not sure if this would help you.

  • Mikael Andersen Profile Picture
    46 on at

    We also engaged with Microsoft support and they ended up running some scripts to delete attribute maps that caused some kind of circular dependency. Below is what they wrote as a hint to avoid it in the future.

     

    --- From Microsoft support ----

    Cause:

    An attribute mapping was present in source and target both as unmanaged / as part of the active layer; expectation was that in target the component is managed. And since we cannot delete the attribute mappings directly from UI, the only way found to delete it from target was through a script mitigation.

     

    Mitigation:

    Run custom mitigation scripts to: delete the entity map for the 2 entities, delete the 2 entity relationships and then proceed with deleting the lookup attribute.

     

    Note:

    In order to avoid this from happening in the future we recommend to refrain from creating/importing unmanaged attribute mappings in target (in a managed environment). What we saw was a very particular situation where an attribute mapping was present in source and target both as unmanaged / as part of the active layer; expectation was that in target the component is managed. And since we cannot delete the attribute mappings directly from UI, the only was found to delete it from target was the above method – script mitigation.

     

    -----

     

    Hope this can help others in a similar situation.

  • Mikael Andersen Profile Picture
    46 on at

    We also engaged with Microsoft support and they ended up running some scripts to delete attribute maps that caused some kind of circular dependency. Below is what they wrote as a hint to avoid it in the future.

     

    --- From Microsoft support ----

    Cause:

    An attribute mapping was present in source and target both as unmanaged / as part of the active layer; expectation was that in target the component is managed. And since we cannot delete the attribute mappings directly from UI, the only way found to delete it from target was through a script mitigation.

     

    Mitigation:

    Run custom mitigation scripts to: delete the entity map for the 2 entities, delete the 2 entity relationships and then proceed with deleting the lookup attribute.

     

    Note:

    In order to avoid this from happening in the future we recommend to refrain from creating/importing unmanaged attribute mappings in target (in a managed environment). What we saw was a very particular situation where an attribute mapping was present in source and target both as unmanaged / as part of the active layer; expectation was that in target the component is managed. And since we cannot delete the attribute mappings directly from UI, the only was found to delete it from target was the above method – script mitigation.

     

    -----

     

    Hope this can help others in a similar situation.

  • ADPerkin Profile Picture
    46 on at

    Just had exact same issue - interestingly for us importing with Replace rather then the default Upgrade option works. When we try Upgrade, we also get a partly imported solution left behind, which has to be manually deleted before you can attempt a re-import.

    Our issue definitely related to Power Automate, and connection references like Nievachica24 whereas it looks like Mikael's issue related to table lookups.

    My suspicion was an unmanaged solution layer. I checked all objects referred to in the solution and it was an unmanaged layer on one of the flows. Deleted it and solution imported fine.

    I really dont like the way that some elements remain editable in managed solutions, (This is a very old issue from Dynamics on-prem) particulary workflows and flows. It should always be a solution migration process that updates the target.

    Hope that helps someone.



Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 317 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 247

#3
Henil Profile Picture

Henil 117

Last 30 days Overall leaderboard