cookiekhanh


Hello,

I am attempting to use Visual Studio Extensions for Windows SharePoint Services (VSeWSS) to deploy custom content types as features.

These are the steps I followed:

1. Create Empty SharePoint project.
2. Add Content Type called "Client", this creates a "Client" folder with the files Client.Fields.xml and Client.xml
3. Added 2 Custom Site Columns/Fields to be associated with the Client Content Type. The Client.Fields.xml file looks like this:
< xml version="1.0" encoding="utf-8" >
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- _filecategory="ContentType" _filetype="File" _filename="fields.xml" _uniqueid="8c10823b-8f22-4c56-8602-f4d53e81326b" -->
<Field
ID="{3EABF79A-0A2F-4481-BD60-68DD4E89D586}"
Name="ClientName"
SourceID="http://schemas.microsoft.com/sharepoint/v3"
StaticName="ClientName"
Group="NDEx Columns"
Type="Text"
Sealed="FALSE"
ReadOnly="FALSE"
Hidden="FALSE"
DisplayName="Client Name"
ColName="ClientName"
>
</Field>
<Field
ID="{1B301B3C-235C-4914-9F75-4A9184546072}"
SourceID="http://schemas.microsoft.com/sharepoint/v3"
Type="Text"
MaxLength="255"
Group="NDEX Columns"
Name="AuthorizedSigners"
DisplayName="Authorized Signers"
StaticName="AuthorizedSigners"
Hidden="FALSE"
ReadOnly="FALSE"
Sealed="FALSE"
ColName="AuthorizedSigners"
>

</Elements>

4. Link the Custom Site Column to the Client Content Type. The Client.xml file looks like this:
< xml version="1.0" encoding="utf-8" >
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- _filecategory="ContentType" _filetype="Schema" _filename="contenttype.xml" _uniqueid="b03c0cba-8a8d-4983-a3d5-fd1f6c4ece42" -->
<ContentType ID="0x010061423b716ea6476d98569734882cef59"
Name="Client"
Group="NDEx Content Types"
Description="NDEx Client"
Version="0">
<FieldRefs>
<FieldRef ID="{3EABF79A-0A2F-4481-BD60-68DD4E89D586}" Name="ClientName" Required="TRUE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
<FieldRef ID="{1B301B3C-235C-4914-9F75-4A9184546072}" Name="AuthorizedSigners" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
</FieldRefs>
</ContentType>
</Elements>

5. Hit F5.

At this point, the Client Content Type shows up under the Site Content Types Section (Site Settings>Site Content Types), but with only the field "Client Name". Also, the Site Columns gallery is broken with an "Unknown Error" message.

I changed some settings to make the unknown error show more debug information and now it says:
Object reference not set to an instance of an object. at Microsoft.SharePoint.ApplicationPages.FieldListRenderer.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)





Has anyone seen this behavior Or, have you successfully been able to use VSeWSS to deploy Custom Content Types

Sometimes, the deployment will work , but most times it does not. I have a feeling it has something to do with the GUIDs generated for the content type when it's deployed from Visual Studio.

Any help/insight would be appreciated!

Thanks,
Kim


Re: Deploying Custom Content Types as Features using VSeWSS

obhayes


Hi Kim,

Did you manage to work out what the problem was As i have a similar problem with the fact that my site columns gallery is also broken with the exact same message. Unfortunately its a very big wss solution with lots of content types that I have not got my head round at this point but if you have any progress / updates on this problem i would be interested to hear. Like you said I guess it could be GUID related

thanks

Brad





Re: Deploying Custom Content Types as Features using VSeWSS

vdepeyre

Hello,

I have the same error message when i activate my feature deploying with a solution.

Features deployed contains fields, content tpes, libraries definition...

The following message is displayed on page "/site setting/site columns" (_layouts/mngfield.aspx)

error message detail:

Object reference not set to an instance of an object. at Microsoft.SharePoint.ApplicationPages.FieldListRenderer.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Please help...

I'm interresting by the problem solution







Re: Deploying Custom Content Types as Features using VSeWSS

vdepeyre

I solve this probleme with the following actions.

In the site collection settings.

deactivate feature custom fields

re-activate feature custom fields

The Site Columns gallery is OK






Re: Deploying Custom Content Types as Features using VSeWSS

simimol S

I think if u try the same in a new application for the first time it will work...Then same problem will come ...I think u need to reinstall vsewss and try.