I am trying to create sample content type.Created a content type project in Visual Studio 2010.Changed element.xml file as follows.I am getting an error when deploying the project.

Error 1 Error occurred in deployment step 'Activate Features': Invalid field name. {a93394f6-c085-4df0-b6b7-66a581e7c183}

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <Field ID="{A93394F6-C085-4DF0-B6B7-66A581E7C183}" Name="ContactType"    DisplayName="Contact Type" Type ="Choice" >
  <CHOICE>Personal Contact</CHOICE>
  <CHOICE>Official Contact</CHOICE>
  <CHOICE>Other Contact</CHOICE>
<ContentType ID="0x01002e9407b0368e4865936ac2e0ae45b8e8"
           Name="ContentSample - ContentType1"
           Group="Custom Content Types"
           Description="My Content Type"
  <FieldRef ID="{A93394F6-C085-4DF0-B6B7-66A581E7C183}"/>

1 Answer 1


First, add the Name attribute to your FieldRef in the Content Type:

<FieldRef ID="{A93394F6-C085-4DF0-B6B7-66A581E7C183}" Name="ContactType" />
  • OK.I have tried it and working fine
    – anish
    Oct 7, 2013 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.