When publishing project you might get the following error:
Error: ReportingProjectChangeMessageFailed (24006) – The INSERT statement conflicted with the FOREIGN KEY constraint
The good news is that Microsoft have now released a hotfix for this.
Preferred Option: This was a known issue which was fixed in the Project Server 2013 August 2014 Hotfix
Installing this hotfix or later update to August 2014 should resolve this issue.
Non Preferred Option
It was found that this happens when the baseline information somehow gets corrupted.
Step 1: Find out the tasks where the Baseline is corrupted
To find which tasks are corrupted run the following query:
Select bp.ProjectName, mt.TaskName, * from MSP_EpmAssignmentBaseline as ba
Inner join MSP_EpmTask as mt on ba.TaskUID = mt.TaskUID
Inner join MSP_EpmProject as bp on ba.ProjectUID = bp.ProjectUID
Where AssignmentUID not in (select AssignmentUID from MSP_EpmAssignment)
Step 2: Re-baseline those tasks by opening the respective projects and re-baselining those tasks
Leave a comment if you have any further questions.
Click here Blogged by Gordon Lewis
….Sharing my personal experience not to be used to setup live environments