Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Export solution with ExportSolutionRequest throw error if it has a patch

(0) ShareShare
ReportReport
Posted on by 152

Hello Guys.

I'm trying to export an unmanaged solution which contain a patch. When i execute the Request, the following error is thrown:

"Cannot modify solution because it has the following patches"

Here is the code I'm using to export the solution:

                    ExportSolutionRequest exportSolutionRequest = new ExportSolutionRequest();
                    exportSolutionRequest.Managed = false;
                    exportSolutionRequest.SolutionName = solution;

                    ExportSolutionResponse exportSolutionResponse = (ExportSolutionResponse)service.Execute(exportSolutionRequest);

*This post is locked for comments

  • Suggested answer
    Dilip Kumar - CRM Profile Picture
    67 on at
    RE: Export solution with ExportSolutionRequest throw error if it has a patch

    This is the expected behaviour. Once the patch is created, the base solution becomes a parent and will be locked. So in order to export and import the parent solution, first you have to clone the solution. So that the patch solution will be merged with the base solution and then becomes unlocked.

    Please refer to the below blog,

    365withoutcode.blogspot.com/.../managing-solutions-in-dynamics-365-part_11.html

  • Suggested answer
    Radu Chiribelea Profile Picture
    6,667 on at
    RE: Export solution with ExportSolutionRequest throw error if it has a patch

    Hi Leonardo,

    This is expected behavior docs.microsoft.com/.../use-segmented-solutions-patches-simplify-updates

    After you have created the first patch for a parent solution, the solution becomes locked, and you can’t make any changes in this solution or export it. However, if you delete all of its child patches, the parent solution becomes unlocked.

    Once you have a patch, you can export the patch

  • Leonardo Mizikami Profile Picture
    152 on at
    RE: Export solution with ExportSolutionRequest throw error if it has a patch

    Updating.

    The error is happening in UI too.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans