CruiseControl.NET does not increment label - cruisecontrol.net

I am running the ccnet server on a windows Server 2003 Operating system. The builds for my product happen fine. But the label remains "1.0.1.0" always. If I do a force build through the web dashboard the version is incremented, but otherwise, the version does not get incremented.
Can anybody tell me if there is something I am missing. Is it a known issue? Are there workarounds?
The cruise control configuration file for the product (project_config.xml) looks like the this:
<cb:config-template xmlns:cb="urn:ccnet.config.builder">
<project name="MyProduct">
<workingDirectory>$(MyProductRootDir)</workingDirectory>
<artifactDirectory>$(MyProductRootDir)\build</artifactDirectory>
<webURL>http://local/ccnet/server/local/project/MyProduct/ViewProjectReport.aspx</webURL>
<modificationDelaySeconds>900</modificationDelaySeconds>
<sourcecontrol type="clearCase">
<viewPath>$(MyProductRootDir)</viewPath>
<branch>main</branch>
<autoGetSource>true</autoGetSource>
<useLabel>false</useLabel>
</sourcecontrol>
<triggers>
<scheduleTrigger time="06:00" name="6AM_build">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
<scheduleTrigger time="09:00" name="9AM_build">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
<scheduleTrigger time="12:00" name="12PM_build">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
<scheduleTrigger time="15:00" name="3PM_build">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
<scheduleTrigger time="18:00" name="6PM_build">
<weekDays>
<weekDay>Monday</weekDay>
<weekDay>Tuesday</weekDay>
<weekDay>Wednesday</weekDay>
<weekDay>Thursday</weekDay>
<weekDay>Friday</weekDay>
</weekDays>
</scheduleTrigger>
</triggers>
<labeller type="assemblyVersionLabeller">
<major>1</major>
<minor>0</minor>
<incrementOnFailure>true</incrementOnFailure>
</labeller>
<tasks>
<msbuild>
<executable>$(msbuildexe)</executable>
<workingDirectory>build</workingDirectory>
<projectFile>build.targets</projectFile>
<buildArgs>/p:Configuration=Debug /fileLoggerParameters:LogFile=build_log.txt</buildArgs>
<targets>Build</targets>
<timeout>1200</timeout>
<logger>FileLogger,Microsoft.Build.Engine</logger>
</msbuild>
</tasks>
<publishers>
<xmllogger logDir="E:\ccnet\logs\MyProduct" />
<statistics />
</publishers>
<externalLinks>
<externalLink name="build_output" url="http://local/builds/MyProduct" />
</externalLinks>
</project>
</cb:config-template>
and my ccnet.config file looks like this
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<cb:define msbuildexe="C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe"/>
<cb:define cyraftframeworkrootdir="E:\myProduct"/>
<cb:include href="project_config.xml" xmlns:cb="urn:ccnet.config.builder"/>
</cruisecontrol>

This was because of a bug in the assembly version labeller that incremented only if the build condition was 'ForceBuild'. So if a build was triggered because of modifications to source code in which case, the build condition of the trigger would be 'IfModificationExists', the version number would not be incremented.
This has been fixed. Details of the bug is here:
http://jira.public.thoughtworks.org/browse/CCNET-1762

Related

WSO2 BPS: How to pass Header values as a part of a Message in BPEL Invoke

My web service operation is defined like below. Where I have a header parameter as well.
public void method(#WebParam(name="OrderNo", mode=WebParam.Mode.IN) String order_no_,
#WebParam(name="user", mode=WebParam.Mode.IN, header=true) String user)
Now when I deploy this service I get a WSDL which looks like this.
<?xml version="1.0" ?>
<wsdl:definitions ... >
<wsdl:types>
</xs:schema>
...
<xs:element name="method" type="tns:method"></xs:element>
<xs:complexType name="method">
<xs:sequence>
<xs:element minOccurs="0" name="OrderNo" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
...
<xs:element name="user" nillable="true" type="xs:string"></xs:element>
...
</xs:schema>
</wsdl:types>
...
<wsdl:message name="method">
<wsdl:part element="tns:method" name="parameters" />
<wsdl:part element="tns:user" name="user" />
</wsdl:message>
...
<wsdl:portType name="CustomerOrderService">
<wsdl:operation name="method">
<wsdl:input message="tns:method" name="method" />
<wsdl:output ... />
<wsdl:fault ... />
</wsdl:operation>
</wsdl:portType>
...
<wsdl:binding name="OrderSoapBinding" type="tns:OrderService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="method">
<soap:operation soapAction="" style="document" />
<wsdl:input name="method">
<soap:header message="tns:method" part="user" use="literal" />
<soap:body parts="parameters" use="literal" />
</wsdl:input>
<wsdl:output name="...">
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="...">
...
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
As you can see the header is part of the message used as input for the service request. Hwen I use soap UI to test this WSDL it generated a proper soap message with the "user" property as part of the header.
When I use this service as a partner link in a Carbon BPEL process, and assign a value to the "user" part in the invoke message, the value is not included in the header.
<bpel:variable name="method_Input" messageType="ns0:method" />
<bpel:assign name="...">
...
<bpel:copy>
<bpel:from>$input.payload/tns:TaskReceiver</bpel:from>
<bpel:to>$method_Input.user</bpel:to>
</bpel:copy>
</bpel:assign>
You can see that the message part is assigned the proper value,
The problem is this message part which is bound to the header of of the soap message is never included in the soap header.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<method xmlns="http://customerorder.service.test/">
<OrderNo xmlns="">ORD00011</OrderNo>
</method>
</soapenv:Body>
</soapenv:Envelope>
Thanks in advance to any help provided.

WF Service on Azure, need to change/increase maxStringContentLength on basicHttpBinding

Somewhat of a newbie with this, but I've spent the whole day trying to figure this out.. I have a WF Service1.xamlx in an Azure WebRole, with a web.config ServiceModel section that includes:
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" >
<serviceActivations>
<add relativeAddress="~/Service1.xamlx" service="Service1.xamlx" factory="System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory"/>
</serviceActivations>
</serviceHostingEnvironment>
In my client app, when I add the service reference to Service1.xaml, this is what I get for the binding (all default settings for the basicHttpBinding):
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
I need to increase the maxStringContentLength="8192" value in the binding. How do I do that??
Thanks for looking at this and any help you can provide.

The maximum string content length quota (8192) has been exceeded while reading XML data.

I am getting the error below
The server encountered an error processing the request. The exception
message is 'The formatter threw an exception while trying to
deserialize the message: There was an error while trying to
deserialize parameter http://tempuri.org/:commentText. The
InnerException message was 'There was an error deserializing the
object of type System.String. The maximum string content length quota
(8192) has been exceeded while reading XML data. This quota may be
increased by changing the MaxStringContentLength property on the
XmlDictionaryReaderQuotas object used when creating the XML reader.'.
Please see InnerException for more details.'. See server logs for more
details. The exception stack trace is:
at System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader
reader, PartInfo part) at
System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeParameter(XmlDictionaryReader
reader, PartInfo part) at
System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeParameters(XmlDictionaryReader
reader, PartInfo[] parts, Object[] parameters, PartInfo returnInfo,
Object& returnValue) at
System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeBodyCore(XmlDictionaryReader
reader, Object[] parameters, Boolean isRequest) at
System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader
reader, MessageVersion version, String action, MessageDescription
messageDescription, Object[] parameters, Boolean isRequest) at
System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message
message, Object[] parameters, Boolean isRequest) at
System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message
message, Object[] parameters) at
System.ServiceModel.Dispatcher.DemultiplexingDispatchMessageFormatter.DeserializeRequest(Message
message, Object[] parameters) at
System.ServiceModel.Dispatcher.UriTemplateDispatchFormatter.DeserializeRequest(Message
message, Object[] parameters) at
System.ServiceModel.Dispatcher.CompositeDispatchFormatter.DeserializeRequest(Message
message, Object[] parameters) at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&
rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
isOperationContextSet)
And thease are my web.config
<services>
<service behaviorConfiguration="Frontiers.WCF.Services.MyHomeServiceBehavior" name="Frontiers.WCF.Services.MyHomeService">
<endpoint address="" behaviorConfiguration="EndpBehavior" binding="webHttpBinding" contract="Frontiers.WCF.Services.IMyHomeService" />
</service>
<service behaviorConfiguration="Frontiers.WCF.Services.NetworkServiceBehavior" name="Frontiers.WCF.Services.NetworkService">
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="EndpBehavior" contract="Frontiers.WCF.Services.INetworkService" >
</endpoint>
</service>
<service behaviorConfiguration="Frontiers.WCF.Services.WidgetServiceBehaviour" name="Frontiers.WCF.Services.WidgetService">
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="EndpBehavior" contract="Frontiers.WCF.Services.IWidgetService">
</endpoint>
</service>
<service behaviorConfiguration="Frontiers.SharePoint.Site.Navigation.NavigationServiceBehaviour" name="Frontiers.SharePoint.Site.Navigation.NavigationService">
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="EndpBehavior" contract="Frontiers.SharePoint.Site.Navigation.INavigationService">
</endpoint>
</service>
<service behaviorConfiguration="Frontiers.WCF.Services.UserProfileServiceBehavior" name="Frontiers.WCF.Services.UserProfileService">
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="EndpBehavior" contract="Frontiers.WCF.Services.IUserProfileService">
</endpoint>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="ContactsImporterSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="819200" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="JournalActivityReportSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="eUtilsServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="eUtilsServiceSoap1" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="eUtilsServiceSoap2" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="eUtilsServiceSoap3" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
Can anybody please help me out?
You should increase your maxStringContentLength="8192", the error says that it tries to read a string taller as 8192 chars.
Set the maxStringContentLength="8192" in the service host's app.config.

Nillable SOAP headers

I would like to allow some of my SOAP header elements to be nillable. This is possible for body elements, but I am not sure if it is allowed from header elements.
In the sample message below, I would like to allow the MessageDateTime to be null.
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://mycompany.com/repositoryservice">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://mycompany.com/repositoryservice">
<element name="MessageDateTime" type="dateTime" />
<element name="SaveRequest">
<!-- complexType -->
</element>
</schema>
</types>
<message name="SaveRequest_Headers">
<part name="MessageDateTime" element="tns:MessageDateTime" />
</message>
<message name="SaveRequest">
<part name="parameters" element="tns:SaveRequest" />
</message>
<binding name="RepositoryServiceBinding" type="tns:IRepositoryService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="Save">
<soap:operation soapAction="http://mycompany.com/repositoryservice/Save" style="document" />
<input name="SaveRequest">
<soap:header message="tns:SaveRequest_Headers" part="MessageDateTime" use="literal" />
<soap:body use="literal" />
</input>
</operation>
</binding>
<!-- service, portType -->
</definitions>
It is allowed as long as the definition allows for it. In your case, all you have to do is add the nillable="true" to the element's definition. The result on .NET w/ WCF would look something like this:
[System.ServiceModel.MessageHeaderAttribute(Namespace="...")]
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public System.Nullable<System.DateTime> MessageDateTime;

XmlDocuments Element ignored in Content Type?

I have a content type defined in Elements.xml and I want to add an Event Receiver. My Elements.xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Announcement (0x0104) -->
<ContentType ID="0x0104008a424de98660457481eb7d8ddb5161ee"
Name="News Posting"
Group="News"
Description="$Resources:NewsCTypeDescription"
Inherits="TRUE"
Version="1"
Sealed="TRUE"
>
<FieldRefs>
<FieldRef ID="{7EBC5918-CB79-440A-8DF3-480C6951C4EB}" Name="NewsExcerpt"/>
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/events">
<spe:Receivers xmlns:spe="http://schemas.microsoft.com/sharepoint/events">
<Receiver>
<Name>ItemAdded</Name>
<Type>ItemAdded</Type>
<Class>MyAssembly.NewsItemEventReceiver</Class>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<SequenceNumber>10000</SequenceNumber>
<Synchronization>Synchronous</Synchronization>
<Data />
<Filter />
</Receiver>
</spe:Receivers>
</XmlDocument>
</XmlDocuments>
</ContentType>
</Elements>
The weird thing is that the Event Receiver never executes. I've checked the Schema with SharePoint Manager 2010, and it seems that the XmlDocuments element is ignored completely?
Here's the content type SchemaXml according to SharePoint Manager:
<?xml version="1.0" encoding="utf-16"?>
<ContentType ID="0x0104008A424DE98660457481EB7D8DDB5161EE" Name="News Posting" Group="News" Description="A News Posting" Sealed="TRUE" Version="1">
<Folder TargetName="_cts/News Posting" />
<Fields>
<Field ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ContentType" Group="_Hidden" Type="Computed" DisplayName="Content Type" Sealed="TRUE" Sortable="FALSE" RenderXMLUsingPattern="TRUE" PITarget="MicrosoftWindowsSharePointServices" PIAttribute="ContentTypeID" Customization="">
<FieldRefs>
<FieldRef ID="{03e45e84-1992-4d42-9116-26f756012634}" Name="ContentTypeId" />
</FieldRefs>
<DisplayPattern>
<MapToContentType>
<Column Name="ContentTypeId" />
</MapToContentType>
</DisplayPattern>
</Field>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" Group="_Hidden" Type="Text" DisplayName="Title" Required="TRUE" FromBaseType="TRUE" Customization="" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
<Field ID="{7662cd2c-f069-4dba-9e35-082cf976e170}" Name="Body" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Body" Group="_Hidden" Type="Note" RichText="TRUE" RichTextMode="FullHtml" IsolateStyles="TRUE" DisplayName="Body" Sortable="FALSE" NumLines="15" Customization="" />
<Field ID="{6a09e75b-8d17-4698-94a8-371eda1af1ac}" Name="Expires" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Expires" Group="_Hidden" Type="DateTime" DisplayName="Expires" Format="DateOnly" Customization="" />
<Field ID="{7EBC5918-CB79-440A-8DF3-480C6951C4EB}" Group="News" Name="NewsExcerpt" DisplayName="Excerpt of the Article" Description="165 Characters maximum" MaxLength="165" Type="Text" Customization="" />
</Field>
</Fields>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>
</XmlDocuments>
</ContentType>
I have tried adding a FormTemplates XmlDocument as well, just to see if that works, but even this is ignored (I've changed the ListForm to ListForm2, but the SchemaXml is unchanged.
I've deleted the entire Web Application and Content Database to make sure there was nothing stale/stuck, but the result is still the same.
Is XmlDocuments depreciated in SharePoint 2010? What are the alternatives?
You should add your event receiver as a feature, maybe even as a part of the same feature that installs the content type. We always do it this way and it works perfectly

Resources