Getting Dependency Calculation There was an error calculating dependencies for this component. Missing component id {0}

Question Status

Suggested Answer
Arunav Dash asked a question on 26 Feb 2016 1:42 AM

Hi All

while publishing the solution iam getting an error given below:

Dependency Calculation
There was an error calculating dependencies for this component. Missing component id {0}

Even when i tried to export the solution ,iam getting following error:

Unexpected Error

An error has occurred. 

Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization's Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft Support.

Can anyone please help on this 2 issues.

Thanks and Regards

Arunav

Reply
HIMBAP responded on 26 Feb 2016 1:54 AM

You can export the file it you are able to do that other you can try to check event viewer if there is any error register otherwise you can also enable tracing and check trace file to get more details on this issue.

Thanks

Reply
Suggested Answer
Mohit Bansal responded on 26 Feb 2016 2:24 AM

Hi,

Enable the trace and get the error details from logs. You can get more information about enable the trace in the below url

support.microsoft.com/.../907490.

Reply
Jeff Davis responded on 26 Feb 2016 2:59 AM

Have an open case with Microsoft for 6 weeks now on this.  Dependency calculation has lots of issues.  I got around issue by removing the Missing Dependencies from Solution.xml.

Reply
Pierre Joubert responded on 22 Nov 2016 5:09 PM

I have encountered the same error with Microsoft Dynamics CRM 2016 Online.

Removing the offending dependencies allows the import but unfortunately I still cannot publish, has a solution been found?

Reply
Christos Kyrkilis responded on 13 Dec 2016 4:53 AM

Hello,

I have encountered the exact same error with Microsoft Dynamics CRM 2016 On-Premise, latest version v8.1.0.359.

I have no problem importing solutions, but "publish all" fails with the same error:

"Dependency Calculation

There was an error calculating dependencies for this component. Missing component id {0}"

Publish each Entity/element separately is possible but since we're working on major updates and daily deployments via solutions from Dev to UAT environment, I can't handle the overhead time.

Kind Regards

Reply
Suggested Answer
Christos Kyrkilis responded on 15 Dec 2016 3:20 AM

I opened a ticket on Microsoft and I got feedback on the bug.

It is probably a known issue that will be solved in Update Rollup 1 for CRM 2016 SP1 (v8.1), it means, the update from 8.1.0 to 8.1.1. My Customer's version is 8.1.0.

For this issue there is a workaround from Microsoft:

First, verify if exists orphan record in CustomControlDefaultConfigBase:

SELECT * FROM CustomControlDefaultConfigBase WHERE PrimaryEntityTypeCode NOT IN (SELECT ObjectTypeCode FROM Entity)

Note: before continuing, a backup database is recommended.

Delete from the Target environment the CustomControlDefaultConfig records with orphaned Object Type Codes:

DELETE FROM CustomControlDefaultConfigBase WHERE PrimaryEntityTypeCode NOT IN (SELECT ObjectTypeCode FROM Entity)

The above task (delete orphan record) will solve the problem that you already have, and you will be able to Publish All Customizations again, but it will happens again after the next customization or solution deployment from another environment.

The main issue is that you need to add always the primary key field for the entity that you are adding into the solution.

So, to avoid the error again:

Adding the Primary Key of the affected Entity/Entities will prevent this from happening:

1) In the source environment open the Solution being imported

2) Open each Entity and expand Fields

3) Make sure that every entity has its Primary Key added to the solution

Kind Regards

Reply
Cristina Barbu responded on 18 Jan 2017 7:30 AM

Solved our issue. Thanks, Christos :)

Reply
Bojan Borisovski responded on 25 Feb 2017 11:52 AM

Thank you for sharing Christos. It worked for me as well!

Reply
Pierre Joubert responded on 28 Feb 2017 4:23 AM

Thanks Christos

We also logged a call with Microsoft as we experienced this with CRM online, but it was the same process they ran through with our environments based on the feedback I received.

Reply
Daryl LaBar responded on 3 Apr 2017 2:12 PM

@Christos Kyrkilis, I'm online.  Since I don't have access to the DB, will adding the primary key fields to the entities resolve my issue, or does it just prevent it from happening, going forward?

Reply
Suggested Answer
Mohit Bansal responded on 26 Feb 2016 2:24 AM

Hi,

Enable the trace and get the error details from logs. You can get more information about enable the trace in the below url

support.microsoft.com/.../907490.

Reply
Suggested Answer
Christos Kyrkilis responded on 15 Dec 2016 3:20 AM

I opened a ticket on Microsoft and I got feedback on the bug.

It is probably a known issue that will be solved in Update Rollup 1 for CRM 2016 SP1 (v8.1), it means, the update from 8.1.0 to 8.1.1. My Customer's version is 8.1.0.

For this issue there is a workaround from Microsoft:

First, verify if exists orphan record in CustomControlDefaultConfigBase:

SELECT * FROM CustomControlDefaultConfigBase WHERE PrimaryEntityTypeCode NOT IN (SELECT ObjectTypeCode FROM Entity)

Note: before continuing, a backup database is recommended.

Delete from the Target environment the CustomControlDefaultConfig records with orphaned Object Type Codes:

DELETE FROM CustomControlDefaultConfigBase WHERE PrimaryEntityTypeCode NOT IN (SELECT ObjectTypeCode FROM Entity)

The above task (delete orphan record) will solve the problem that you already have, and you will be able to Publish All Customizations again, but it will happens again after the next customization or solution deployment from another environment.

The main issue is that you need to add always the primary key field for the entity that you are adding into the solution.

So, to avoid the error again:

Adding the Primary Key of the affected Entity/Entities will prevent this from happening:

1) In the source environment open the Solution being imported

2) Open each Entity and expand Fields

3) Make sure that every entity has its Primary Key added to the solution

Kind Regards

Reply