Import Error: Could not find Entity with Name X when constructing Association with Name Y

You get this error if you specify an incorrect entity name in the SourceEntity or the DestinationEntityName parameter in an Association definition. The SourceEntityName parameter should contain the name of the parent entity; the DestinationEntityName parameter defines the name of the related child entity. To fix this error, ensure you have used the correct Name parameter, and that you have typed the name correctly.

Incorrect Example

  <Associations>
    <Association AssociationMethodEntityName="Customer" AssociationMethodName="GetSalesOrdersForCustomer" AssociationMethodReturnParameterName="SalesOrders" Name="CustomerToSalesOrder" IsCached="true">
      <SourceEntity Name="Cusotmer" />      <!-- Either one of these Name parameters could be wrong -->      <DestinationEntity Name="SalesOrder" />
    </Association>
  </Associations>

Correct Example

  <Associations>
    <Association AssociationMethodEntityName="Customer" AssociationMethodName="GetSalesOrdersForCustomer" AssociationMethodReturnParameterName="SalesOrders" Name="CustomerToSalesOrder" IsCached="true">
      <SourceEntity Name="Customer" />      <DestinationEntity Name="SalesOrder" />
    </Association>
  </Associations>