Solution Dependencies

When importing a managed solution into a new Power Platform environment, you might experience obscure solution dependency errors that prevent the import completing successfully. The errors, typically reference component called GUIDs, and often without much further information.

visual studio code banner

This can be frustrating because you get very little information in the error message about what may be causing the issue.

Dataverse dependency error banner

Finding the component that a particular GUID refers to can be like looking for a needle in a haystack. There is no easy in-built way to do this with the Power Platform. But don’t despair – you have freely available tools to help you out.

This guide shows how to use AI to narrow down your search. If that isn’t successful, I’ll explain how to use Microsoft’s Visual Studio Code to search unpacked solution files to track down a specific GUID.

Step A. ChatGPT (or your AI choice)

Your first option should be to use ChatGPT or your favourite large language model (LLM). Sometimes just cutting and pasting the error message into the LLM with an appropriate prompt, may give you enough of a pointer. Sometimes, this is all you need to do to track down the component and fix the issue.

If this doesn’t work, click on the ‘Download log’ at the right of the banner (in the above image), and save the full log locally to your downloads folder. The file will be in XML format and depending on the size of your solution, it could be a very lengthy file. Don’t bother trying to read and interpret it! If the file isn’t too large, you can copy and paste it direct into your favourite LLM. If it is large, instead directly upload the file to the LLM. With either approach, type an appropriate prompt explaining the issue and what you want help with, as I have done below:

chat gpt prompt to track down missing dependencies

So this takes us a little further forward. It’s pointing toward a Dataverse view that is being referenced in a form, but can’t tell us which table or form. This is because GUIDs are random numbers and letters assigned to components, and don’t mean anything to ChatGPT.

It would be great if the Power Platform natively gave us more useful information, but it doesn’t. We need to move the investigation to the next level!

Step B. Use Visual Studio Code (VS Code)

With Visual Studio Code you can download and unpack solutions to your local machine. Think of unpacking as unzipping a zip file – it is basically the same thing.

Power Platform solution files (after unpacking) contain component definitions as individual XML files. This includes tables, flows, forms and views. XML is a readable markup language and the files retain hardcoded GUIDs as references from one component to another.

Having the GUIDs in the XML allows you to search on the GUID to track it down in the unpacked solution, which in turn gives you much more info on what component a GUID relates to.

I’m going to assume that you have downloaded and installed VS Code and that you have connected it to your Microsoft tenant and environment. If you’ve not done this yet, I’d definitely recommend doing so. Give it a google. There are many benefits to working with VS Code when building and deploying apps with the Power Platform.

Once VS Code is installed and configured, follow the steps below:

1. Download the Solution

Use the Power Platform CLI (terminal) in VS Code to download an unmanaged version of the solution called ‘MySolution’ to a local folder

Pac solution export --name MySolution --managed false
VS Code CLI to download a solution

2. Unpack the Solution

Now the solution has been downloaded, unpack it to a sub-folder, in this case called ‘unpack’:

pac solution unpack --zipfile MySolution.zip --folder ./unpack

3. Open the Unpack Folder

In VS Code, open the unpack folder (File > Open Folder)

4. Search for the GUID

‘Ctrl + Shift + f’ opens the VS Code seach dialogue box, allowing you to search through all the files and subfolders in your current folder.

Paste the GUID that you want to find into the search and hit enter. In our case the GUID is:

10504807-14a7-ef11-b8e9-000d3a0c23b9

All the instances where the GUID exists in the unpacked solution will be displayed. In our case, throughout the whole solution, this GUID is referenced just once.

We now have a lot more information!

VS Code search results

The issue is with a view used on the main form in the CustomerOrder table. We also now know that the form uses the Account_CustomerOrder relationship to access the view, so the view is on the Account table.

This is great as it really pinpoints where we need to be looking in order to fix things!

If you want more help interpreting the XML code, just copy and paste the VS Code search results into ChatGPT and you will get a clear explanation.

5. Address the Issue in the Maker Portal

Now we know where the issue lies, we go to the CustomerOrder table in the environment from which you are exportng the file. Open and visually inspect the form to identify what the issue is. Additionally, go to the Account table and inspect the view.

When you get dependency issues importing a solution, usually, the issue is that a component is missing from the solution and needs to be added. The app will work fine in the Development environment as the component is already there. However, because the missing component isn’t transferred with the solution, it isn’t moved to the target environment. That is what creates the dependency error.

In this particular case, it wasn’t a missing component, but a view embedded in a form had somehow become corrupted. Removing the view from the form and re-adding it solved the problem

6. Re-Export and Import the Solution

Once you feel confident the issue had been identified and addressed, export the solution again and import the new version into your target environment. Fingers crossed this time it will complete just fine. If it doesn’t, you know what you need to do to continue the investigation.

Summary

Searching an unpacked solution using VS Code is a fast, reliable and remarkably easy way to find and fix broken GUID references in Power Platform solutions. This is particularly true when combined with AI to guide you in the right direction. Using VS Code and AI together saves time and frustration.

No more hunting through many components manually — just search on the GUID in VS Code to pinpoint and fix!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top