During feature activation of my SharePoint 2010 project, built and deployed using Visual Studio 2012, I receive this error:
A dependent lookup field does not support relationships
I've played around a bit with the sequence in which items are listed within my feature files. Of the dozen lists definitions I'm installing and an instance of each I'm creating, reviewing what has actually been created before the error stops activation indicates the problem may be with a specific list. The list will be involved in a linked-list relation with another list. Depending upon the sequence in which list instances are placed within the feature files, the related list may or may exist at the time the error occurs.
However, the lookup field which relates the lists is not created until my feature receiver's feature activation code is executed. And the dependant lookup fields are not created until after the primary lookup field exists. All done via code and none within the declarative XML. Further, the error occurs before the feature activated event handler is called.
Any suggestions on what to look for? Any ideas what might be causing this error? Should I look into the other lists as well?
In it's declarative XML, the suspect list has one multiple-lookup field to link with zero-to-many child elements on the linked table. It has previously gone through deployment and activation with this field, so I'd be surprised if it is causing a problem now - though with SharePoint ...
FeatureActivated event handler:
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPSite site = (SPSite)properties.Feature.Parent;
using (SPWeb web = site.OpenWeb())
{
web.AllowUnsafeUpdates = true;
SPList itcoExportRequests = web.Lists["ITCO Export Requests"];
SPList itcoExportRequestRecipients = web.Lists["ITCO Export Request Recipients"];
if (itcoExportRequests != null && itcoExportRequestRecipients != null)
{
// Create a lookup column on the Recipients list from the Export Requests list
const string fromRequestFKTitle = "Request ID";
string fromRequestFKInternalName = SPEncodeName(fromRequestFKTitle);
if (!itcoExportRequestRecipients.Fields.ContainsField(fromRequestFKTitle))
{
fromRequestFKInternalName = itcoExportRequestRecipients.Fields.AddLookup(fromRequestFKTitle, itcoExportRequests.ID, true);
}
SPFieldLookup fromRequestFK = (SPFieldLookup)itcoExportRequestRecipients.Fields.GetFieldByInternalName(fromRequestFKInternalName);
fromRequestFK.LookupField = itcoExportRequests.Fields["ID"].InternalName;
fromRequestFK.IsRelationship = true;
fromRequestFK.RelationshipDeleteBehavior = SPRelationshipDeleteBehavior.Cascade; // Deleting a request should delete related recipients
fromRequestFK.Indexed = true;
fromRequestFK.Update();
// Create a lookup column on the Export Requests list from the Recipients list
const string fromRecipientsFKTitle = "Recipient IDs";
string fromRecipientsFKInternalName = SPEncodeName(fromRecipientsFKTitle);
if (!itcoExportRequests.Fields.ContainsField(fromRecipientsFKTitle))
{
fromRecipientsFKInternalName = itcoExportRequests.Fields.AddLookup(fromRecipientsFKTitle, itcoExportRequests.ID, false);
}
SPFieldLookup fromRecipientsFK = (SPFieldLookup)itcoExportRequests.Fields.GetFieldByInternalName(fromRecipientsFKInternalName);
fromRecipientsFK.LookupField = itcoExportRequestRecipients.Fields["ID"].InternalName;
fromRecipientsFK.AllowMultipleValues = true;
fromRecipientsFK.Indexed = false;
fromRecipientsFK.RelationshipDeleteBehavior = SPRelationshipDeleteBehavior.None;
fromRecipientsFK.Update();
// dependant lookup columns
const string fromRecipientRecipientTitle = "Recipient";
string fromRecipientRecipientInternalName = SPEncodeName(fromRecipientRecipientTitle);
if (!itcoExportRequests.Fields.ContainsField(fromRecipientRecipientTitle))
{
fromRecipientRecipientInternalName = itcoExportRequests.Fields.AddDependentLookup(fromRecipientRecipientTitle, fromRecipientsFK.Id);
}
const string fromRecipientCountryTitle = "Recipient Country";
string fromRecipientCountryInternalName = SPEncodeName(fromRecipientCountryTitle);
if (!itcoExportRequests.Fields.ContainsField(fromRecipientCountryTitle))
{
fromRecipientCountryInternalName = itcoExportRequests.Fields.AddDependentLookup(fromRecipientCountryTitle, fromRecipientsFK.Id);
}
const string fromRecipientAddressTitle = "Recipient Address";
string fromRecipientAddressInternalName = SPEncodeName(fromRecipientAddressTitle);
if (!itcoExportRequests.Fields.ContainsField(fromRecipientAddressTitle))
{
fromRecipientAddressInternalName = itcoExportRequests.Fields.AddDependentLookup(fromRecipientAddressTitle, fromRecipientsFK.Id);
}
}
EnsureWorkflowAssociation(web);
LoadPropertyBag(web);
#region Event Receivers
SPList taskList = web.Lists["Tasks"];
//taskList.EventReceivers.Add(SPEventReceiverType.ItemAdded, Assembly.GetExecutingAssembly().FullName, "LMENT.MFC.ITCO.WorkflowTaskEventReceivers.WorkflowTaskEventReceivers");
//taskList.EventReceivers.Add(SPEventReceiverType.ItemUpdated, Assembly.GetExecutingAssembly().FullName, "LMENT.MFC.ITCO.WorkflowTaskEventReceivers.WorkflowTaskEventReceivers");
#endregion
web.AllowUnsafeUpdates = false;
}
}
Schema.xml of suspected problem list:
<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="ITCO Export Requests" DisableAttachments="TRUE" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/ITCO Export Requests" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE">
<MetaData>
<ContentTypes>
<ContentType ID="0x0100DEF7BC5FF5B44246ABFF4AAE7C751CE8" Name="ITCO Export Request Content Type" Group="ITCO Content Types" Inherits="FALSE" Version="0">
<FieldRefs>
<FieldRef ID="{fd92202e-941d-4358-b511-6b6c5e9451e4}" DisplayName="Request Number" Required="TRUE" Name="Request Number" ReadOnly="TRUE" />
<FieldRef ID="{cf4a6b47-a040-4a75-9ce5-60a73cfc8325}" DisplayName="Approval Date" Required="FALSE" Name="Approval Date" ReadOnly="TRUE" ShowInNewForm="FALSE" />
<FieldRef ID="{64fd3feb-5460-45f9-a3b2-5564733b2442}" DisplayName="Requestor" Required="TRUE" Name="Requestor" />
<FieldRef ID="{674f3ad7-0a8c-47f6-b592-ec213e8405f0}" DisplayName="Request Title" Required="TRUE" Name="Request Title" />
<FieldRef ID="{d073bbdb-2735-4993-88cd-2c93d32b4ab5}" DisplayName="Unclassified Acknowledgement" Required="TRUE" Name="Unclassified Acknowledgement" />
<FieldRef ID="{63767861-8b11-4644-8fda-1fb044f0d7cf}" DisplayName="ITAR or EAR" Required="TRUE" Name="Request Class" />
<FieldRef ID="{325d142d-b100-445e-b4cd-0c639efdcff6}" DisplayName="Export Type" Required="TRUE" Name="Request Type" />
<FieldRef ID="{8512dcea-9c59-4a9c-94d7-8fef912b024d}" DisplayName="Document Contains Technical Data" Required="FALSE" Name="Document Contains Technical Data" />
<FieldRef ID="{32530a2c-f610-4cce-9265-356074f55bd5}" DisplayName="Export Location" Required="TRUE" Name="Export Location" />
<FieldRef ID="{6ae393ef-b628-4b8e-b5c2-e2087816bf4e}" DisplayName="Program" Required="TRUE" Name="Program" />
<FieldRef ID="{b8c6f875-e59a-440e-9154-80bc3bfbdc57}" DisplayName="Agreement or License Number" Required="FALSE" Name="Document Number" />
<FieldRef ID="{8c19b14d-7cf6-423a-a88d-5b3f17c61375}" DisplayName="Initial Use" Required="FALSE" Name="Initial Use" />
<FieldRef ID="{a76a8fb4-3f35-4b81-aab2-92b7bfa2e1e2}" DisplayName="Exemption or Exception Number" Required="FALSE" Name="Exemption or Exception Number" />
<FieldRef ID="{984cec2d-b1a6-4a6a-a4c7-fbbf8f30232a}" DisplayName="Authorized Recipients" Required="TRUE" Name="Authorized Recipients" />
<FieldRef ID="{b0815589-e18f-46aa-b477-b5eb8da4f0d4}" DisplayName="Authorization Site" Required="FALSE" Name="Authorization Site" />
<FieldRef ID="{19595412-14fc-425d-bbea-990b8ad3fa5b}" DisplayName="Method of Transfer" Required="FALSE" Name="Method of Transfer" />
<FieldRef ID="{46c596ce-65a6-4b29-9e9f-0ed26f2c9b75}" DisplayName="Export Data Description" Required="FALSE" Name="Export Data Description" />
<FieldRef ID="{67df98f4-9dec-48ff-a553-29bece9c5bf4}" DisplayName="$Resources:core,Attachments;" Name="Attachments" />
<FieldRef ID="{6DF9BD52-550E-4a30-BC31-A4366832A87E}" DisplayName="Comments" Name="V3Comments" Sortable="FALSE" />
<FieldRef ID="{6ca1981d-2398-4440-9e8c-71962aae3dd9}" DisplayName="Export Policy Acceptance (Requestor)" Required="TRUE" Name="Requestor Export Policy Acceptance" />
<FieldRef ID="{12ef2114-7428-4834-a38f-5d612c7eecc5}" DisplayName="Empowered Official" Required="TRUE" Name="Empowered Official" />
<FieldRef ID="{728219ae-90ee-43b3-a9f1-c5cc53e10e9d}" DisplayName="Documents are Properly Marked (EO)" Required="FALSE" Name="EO Documents are Properly Marked" ShowInNewForm="FALSE" />
<FieldRef ID="{279c1c68-616a-4f41-bc90-bf9d0c4d38e7}" DisplayName="Exemption or Exception is Properly Used" Required="FALSE" Name="Exemption or Exception is Properly Used" ShowInNewForm="FALSE" />
<FieldRef ID="{61AE5E1D-9A24-4DF3-A394-1A2C83DE4FBD}" DisplayName="Export Policy Acceptance (EO)" Required="TRUE" Name="EO Export Policy Acceptance" ShowInNewForm="FALSE" />
<FieldRef ID="{0ea3fd1e-b861-4956-ad23-c65d50af7ec1}" DisplayName="EO has Approved" Required="FALSE" Name="EO has Approved" ShowInNewForm="FALSE" />
<FieldRef ID="{5ecaa824-b25e-4195-a42b-b2a3d5fb3c18}" DisplayName="Technology Transfer Controller" Required="TRUE" Name="Technology Transfer Controller" />
<FieldRef ID="{06D66AB1-57E4-4843-BC70-67C55E14CD09}" DisplayName="Documents are Properly Marked (TTC)" Required="FALSE" Name="TTC Documents are Properly Marked" ShowInNewForm="FALSE" />
<FieldRef ID="{2BF29126-15F9-4058-BA6A-BFC4D9E1BB7C}" DisplayName="Export Policy Acceptance (TTC)" Required="TRUE" Name="TTC Export Policy Acceptance" ShowInNewForm="FALSE" />
<FieldRef ID="{8C8C943F-9B84-41E3-A18B-BB849668A800}" DisplayName="TTC has Approved" Required="FALSE" Name="TTC has Approved" ShowInNewForm="FALSE" />
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<FormUrls xmlns:spv3FormUrl="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<New>_Layouts/$(ProjectName)/ITCO%20Export%20Request%20Form.aspx?mode=new</New>
<Edit>_Layouts/$(ProjectName)/ITCO%20Export%20Request%20Form.aspx?mode=edit</Edit>
<Display>_Layouts/$(ProjectName)/ITCO%20Export%20Request%20Form.aspx?mode=display</Display>
</FormUrls>
</XmlDocument>
</XmlDocuments>
</ContentType>
</ContentTypes>
<Fields>
<Field ID="{fd92202e-941d-4358-b511-6b6c5e9451e4}" Type="Counter" Name="Request Number" DisplayName="Request Number" Required="TRUE" Group="ITCO Site Columns" AllowDuplicateValues="FALSE" ReadOnly="TRUE" ReadOnlyEnforced="TRUE"></Field>
<Field ID="{cf4a6b47-a040-4a75-9ce5-60a73cfc8325}" Type="DateTime" Name="Approval Date" DisplayName="Approval Date" Required="FALSE" Group="ITCO Site Columns" ReadOnly="TRUE" ReadOnlyEnforced="TRUE" ShowInNewForm="FALSE" StorageTZ="UTC"></Field>
<Field ID="{64fd3feb-5460-45f9-a3b2-5564733b2442}" Type="User" Name="Requestor" DisplayName="Requestor" Required="TRUE" Group="ITCO Site Columns" Presence="TRUE" UserSelectionMode="0"></Field>
<Field ID="{674f3ad7-0a8c-47f6-b592-ec213e8405f0}" Type="Text" Name="Request Title" DisplayName="Request Title" Required="TRUE" Group="ITCO Site Columns"></Field>
<Field ID="{d073bbdb-2735-4993-88cd-2c93d32b4ab5}" Type="Boolean" Name="Unclassified Acknowledgement" DisplayName="Unclassified Acknowledgement" Required="TRUE" Group="ITCO Site Columns"></Field>
<Field ID="{63767861-8b11-4644-8fda-1fb044f0d7cf}" Type="Choice" Name="Request Class" DisplayName="ITAR or EAR" Required="TRUE" Group="ITCO Site Columns">
<CHOICES>
<CHOICE>ITAR</CHOICE>
<CHOICE>EAR</CHOICE>
</CHOICES>
</Field>
<Field ID="{325d142d-b100-445e-b4cd-0c639efdcff6}" Type="Choice" Name="Request Type" DisplayName="Export Type" Required="TRUE" Group="ITCO Site Columns">
<CHOICES>
<CHOICE>Agreement</CHOICE>
<CHOICE>License</CHOICE>
<CHOICE>Exemption</CHOICE>
<CHOICE>Exception</CHOICE>
</CHOICES>
</Field>
<Field ID="{8512dcea-9c59-4a9c-94d7-8fef912b024d}" Type="Boolean" Name="Document Contains Technical Data" DisplayName="Document Contains Technical Data" Required="FALSE" Group="ITCO Site Columns"></Field>
<Field ID="{32530a2c-f610-4cce-9265-356074f55bd5}" Name="Export Location" DisplayName="Export Location" Type="Text" Required="TRUE" Group="ITCO Site Columns"></Field>
<Field ID="{6ae393ef-b628-4b8e-b5c2-e2087816bf4e}" Type="Text" Name="Program" DisplayName="Program" Required="TRUE" Group="ITCO Site Columns"></Field>
<Field ID="{b8c6f875-e59a-440e-9154-80bc3bfbdc57}" Type="Text" Name="Document Number" DisplayName="Agreement or License Number" Required="FALSE" Group="ITCO Site Columns"></Field>
<Field ID="{8c19b14d-7cf6-423a-a88d-5b3f17c61375}" Type="Boolean" Name="Initial Use" DisplayName="Initial Use" Required="FALSE" Group="ITCO Site Columns"></Field>
<Field ID="{a76a8fb4-3f35-4b81-aab2-92b7bfa2e1e2}" Type="Text" Name="Exemption or Exception Number" DisplayName="Exemption or Exception Number" Required="FALSE" Group="ITCO Site Columns"></Field>
<Field ID="{984cec2d-b1a6-4a6a-a4c7-fbbf8f30232a}" Type="LookupMulti" Name="Authorized Recipients" DisplayName="Authorized Recipients" Required="TRUE" Group="ITCO Site Columns" Mult="TRUE" EnableLookup="TRUE" IsRelationship="TRUE" ShowField="Company" List="Lists/ITCO Export Request Recipients" FieldRef="ID"></Field>
<Field ID="{b0815589-e18f-46aa-b477-b5eb8da4f0d4}" Type="Text" Name="Authorization Site" DisplayName="Authorization Site" Required="FALSE" Group="ITCO Site Columns" HTMLEncode="TRUE"></Field>
<Field ID="{19595412-14fc-425d-bbea-990b8ad3fa5b}" Type="Choice" Name="Method of Transfer" DisplayName="Method of Transfer" Required="FALSE" Group="ITCO Site Columns">
<CHOICES>
<CHOICE>Hand Carry</CHOICE>
<CHOICE>Meeting</CHOICE>
<CHOICE>Mail</CHOICE>
<CHOICE>Upload to SharePoint</CHOICE>
</CHOICES>
</Field>
<Field ID="{46c596ce-65a6-4b29-9e9f-0ed26f2c9b75}" Type="Note" Name="Export Data Description" DisplayName="Export Data Description" Required="FALSE" Group="ITCO Site Columns" HTMLEncode="TRUE"></Field>
<Field ID="{6DF9BD52-550E-4a30-BC31-A4366832A87E}" Type="Note" RichText="TRUE" AppendOnly="TRUE" Name="V3Comments" DisplayName="Comments" Sortable="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="V3Comments" Group="$Resources:core,Base_Columns;" />
<Field ID="{6ca1981d-2398-4440-9e8c-71962aae3dd9}" Type="Text" Name="Requestor Export Policy Acceptance" DisplayName="Export Policy Acceptance (Requestor)" Required="TRUE" Group="ITCO Site Columns"></Field>
<Field ID="{12ef2114-7428-4834-a38f-5d612c7eecc5}" Name="Empowered Official" DisplayName="Empowered Official" Type="User" Required="TRUE" Group="ITCO Site Columns" Presence="TRUE" UserSelectionMode="0"></Field>
<Field ID="{728219ae-90ee-43b3-a9f1-c5cc53e10e9d}" Type="Choice" Name="EO Documents are Properly Marked" DisplayName="Documents are Properly Marked (EO)" Required="FALSE" Group="ITCO Site Columns" ShowInNewForm="FALSE">
<CHOICES>
<CHOICE>Yes</CHOICE>
<CHOICE>No</CHOICE>
<CHOICE>No Attachment</CHOICE>
</CHOICES>
</Field>
<Field ID="{279c1c68-616a-4f41-bc90-bf9d0c4d38e7}" Type="Boolean" Name="Exemption or Exception is Properly Used" DisplayName="Exemption or Exception is Properly Used" Required="FALSE" Group="ITCO Site Columns" ShowInNewForm="FALSE"></Field>
<Field ID="{61AE5E1D-9A24-4DF3-A394-1A2C83DE4FBD}" Type="Text" Name="EO Export Policy Acceptance" DisplayName="Export Policy Acceptance (EO)" Required="TRUE" Group="ITCO Site Columns" ShowInNewForm="FALSE"></Field>
<Field ID="{0ea3fd1e-b861-4956-ad23-c65d50af7ec1}" Type="Boolean" Name="EO has Approved" DisplayName="EO has Approved" Required="FALSE" Group="ITCO Site Columns" ShowInNewForm="FALSE"></Field>
<Field ID="{5ecaa824-b25e-4195-a42b-b2a3d5fb3c18}" Type="User" Name="Technology Transfer Controller" DisplayName="Technology Transfer Controller" Required="TRUE" Group="ITCO Site Columns" Presence="TRUE" UserSelectionMode="0"></Field>
<Field ID="{06D66AB1-57E4-4843-BC70-67C55E14CD09}" Type="Boolean" Name="TTC Documents are Properly Marked" DisplayName="Documents are Properly Marked (TTC)" Required="FALSE" Group="ITCO Site Columns" ShowInNewForm="FALSE">
<CHOICES>
<CHOICE>Yes</CHOICE>
<CHOICE>No</CHOICE>
<CHOICE>No Attachment</CHOICE>
</CHOICES>
</Field>
<Field ID="{2BF29126-15F9-4058-BA6A-BFC4D9E1BB7C}" Type="Text" Name="TTC Export Policy Acceptance" DisplayName="Export Policy Acceptance (TTC)" Required="TRUE" Group="ITCO Site Columns" ShowInNewForm="FALSE"></Field>
<Field ID="{8C8C943F-9B84-41E3-A18B-BB849668A800}" Type="Boolean" Name="TTC has Approved" DisplayName="TTC has Approved" Required="FALSE" Group="ITCO Site Columns" ShowInNewForm="FALSE"></Field>
</Fields>
<Views>
<View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE">
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<RowLimit Paged="TRUE">30</RowLimit>
<ViewFields>
<FieldRef Name="LinkTitleNoMenu"></FieldRef>
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="Modified" Ascending="FALSE"></FieldRef>
</OrderBy>
</Query>
<ParameterBindings>
<ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" />
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" />
</ParameterBindings>
</View>
<View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
<Toolbar Type="Standard" />
<XslLink Default="TRUE">main.xsl</XslLink>
<RowLimit Paged="TRUE">30</RowLimit>
<ViewFields>
<FieldRef Name="Attachments"></FieldRef>
<FieldRef Name="Request Number" />
<FieldRef Name="Approval Date" />
<FieldRef Name="Requestor" />
<FieldRef Name="Request Title" />
<FieldRef Name="Unclassified Acknowledgement" />
<FieldRef Name="Request Class" />
<FieldRef Name="Request Type" />
<FieldRef Name="Document Contains Technical Data" />
<FieldRef Name="Export Location" />
<FieldRef Name="Program" />
<FieldRef Name="Document Number" />
<FieldRef Name="Initial Use" />
<FieldRef Name="Exemption or Exception Number" />
<FieldRef Name="Authorized Recipients" />
<FieldRef Name="Authorization Site" />
<FieldRef Name="Method of Transfer" />
<FieldRef Name="Export Data Description" />
<FieldRef Name="V3Comments" />
<FieldRef Name="Requestor Export Policy Acceptance" />
<FieldRef Name="Empowered Official" />
<FieldRef Name="EO Documents are Properly Marked" />
<FieldRef Name="Exemption or Exception is Properly Used" />
<FieldRef Name="EO Export Policy Acceptance" />
<FieldRef Name="EO has Approved" />
<FieldRef Name="Technology Transfer Controller" />
<FieldRef Name="TTC Documents are Properly Marked" />
<FieldRef Name="TTC Export Policy Acceptance" />
<FieldRef Name="TTC has Approved" />
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="ID"></FieldRef>
</OrderBy>
</Query>
<ParameterBindings>
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
</ParameterBindings>
</View>
</Views>
<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
</MetaData>
</List>
After some messing around with the lists, I commented out this line and the associated field reference from the content type Elements.xml and list Schema.xml files.
Though the presence of this multi-valued lookup column did not previously cause deployment or activation errors, its removal fixed the activation errors that lead to my question. If I still need the offending column, I'll add it using code within my FeatureActivation event.
I am guessing that on my previous deployments, the two lists already existed and the primary lookup field linking them together prevented Visual Studio from deleting and recreating the lists during deployment. Thus, when the feature was activated, all the prerequisite objects already existed. See my other question for the issues I'm having with my pre-deployment scripts and why those lists are not being automatically unlinked: Cannot load SharePoint powershell cmdlets in visual studio pre-deployment script