2

I have a solution with a web project and two TDS projects. Suddenly since today the TDS package building fails, although I didn't change anything in the project. This is the output message:

1>------ Rebuild All started: Project: SAP HANA, Configuration: KON Any CPU ------
1>  SAP HANA -> C:\Solutions\BTC Microsites\dev\SAP HANA\SAP HANA\bin\SAP HANA.dll
2>------ Rebuild All started: Project: TDS, Configuration: Debug Any CPU ------
2>              TDSVersion: 5.1.0.17
2>              FrameworkVersion: 4
2>              Visual Studio Version: 12.0
2>              \Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll
2>                                      Using TDS project config setting 'Debug' to perform config transforms
2>                                      Using TDS project config setting 'Debug' to perform xml transforms
2>                      Looking for: C:\Solutions\BTC Microsites\dev\SAP HANA\TDS\bin\Debug\\**\*.*
2>                      Building package with files in folder .\bin\Debug\
2>C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets(169,5): error : The package builder failed. Please see the build output log for more details.
2>Done building project "TDS.scproj" -- FAILED.
2>
2>Build FAILED.
3>------ Rebuild All started: Project: TDS_Content, Configuration: Debug Any CPU ------
3>              TDSVersion: 5.1.0.17
3>              FrameworkVersion: 4
3>              Visual Studio Version: 12.0
3>              \Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll
3>                                      Using TDS project config setting 'Debug' to perform config transforms
3>                                      Using TDS project config setting 'Debug' to perform xml transforms
3>                      Looking for: C:\Solutions\BTC Microsites\dev\SAP HANA\TDS_Content\bin\Debug\\**\*.*
========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========

This is where it points me when I click on the error message:

<GeneratePackage
      ProjectFilePath="$(MSBuildProjectFullPath)"
      PackageOutputDirectory="$(_PackageOutputDirectory)"
      ConfigurationToBuild="$(Configuration)"
      CompiledFiles="$(_OutputPath)"
      PackageName="$(PackageName)"
      Author="$(PackageAuthor)"
      Publisher="$(PackagePublisher)"
      Version="$(PackageVersion)"
      SolutionDir="$(SolutionDir)"
      AddDateTimeToPackageName="$(AddDateTimeToPackageName)"
      SeperateFilesAndItems="$(SeperateFilesAndItems)"
      PackageDateTimeFormat="$(PackageDateTimeFormat)"
      RecursiveDeployAction="$(RecursiveDeployAction)"
      SitecoreAssemblyPath="$(SitecoreAssemblyPath)"
      PackageReadme="$(PackageReadme)"
      ExcludeCode="$(PackageExcludeCode)"
      Verbose="true"/>

The error doesn't tell much. Does anyone happen to know what's wrong all of a sudden?

EDIT: Detailed error message:

Building .\bin\Debug\..\Package_Debug\TDS_SAPHANA_Package_20150929_0938.update
2>                      Inner Exception '', hexidezimaler Wert 0x0B, ist ein ungltiges Zeichen.(System.ArgumentException):
2>                         bei System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)
2>                         bei System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)
2>                         bei System.Xml.XmlUtf8RawTextWriter.WriteString(String text)
2>                         bei System.Xml.XmlUtf8RawTextWriterIndent.WriteString(String text)
2>                         bei System.Xml.XmlRawWriter.WriteValue(String value)
2>                         bei System.Xml.XmlWellFormedWriter.WriteValue(String value)
2>                         bei Sitecore.Update.Utils.XmlHelper.SerealizeField(SyncField syncField, XmlWriter writer, SerializationContext context)
2>                         bei Sitecore.Update.Utils.XmlHelper.SerializeVersion(SyncVersion syncVersion, XmlWriter writer, SerializationContext context)
2>                         bei Sitecore.Update.Utils.XmlHelper.SerializeItem(SyncItem syncItem, XmlWriter writer, SerializationContext context)
2>                         bei Sitecore.Update.Commands.AddItemCommand.SerializeCommand(XmlWriter writer, SerializationContext context)
2>                         bei Sitecore.Update.Commands.BaseItemCommand.Serialize(XmlWriter writer, SerializationContext context)
2>                         bei Sitecore.Update.Commands.SerializationCommandFactory.SerializeCommand(ICommand command, XmlWriter writer, SerializationContext context)
2>                         bei Sitecore.Update.Installer.CommandToEntryConverter.PlainConvert(ICommand entry)
2>                         bei Sitecore.Update.Installer.CommandToEntryConverter.Convert(ICommand entry)
2>                         bei Sitecore.Update.Installer.CommandToEntryConverter.InternalConvert(ICommand entry, IProcessingContext context)
2>                         bei Sitecore.Install.Framework.BaseConverter`1.Convert(T entry, IProcessingContext context)
2>                         bei Sitecore.Install.Framework.BaseSource`1.InternalSink.Put(T entry)
2>                         bei Sitecore.Install.Framework.FilteringSink`1.Put(T entry)
2>                         bei Sitecore.Update.Installer.CommandSource.InternalPopulate(ISink`1 sink)
2>                         bei Sitecore.Install.Framework.BaseSource`1.Populate(ISink`1 sink)
2>                         bei Sitecore.Install.PackageProject.InternalPopulate(ISink`1 sink)
2>                         bei Sitecore.Install.Framework.BaseSource`1.Populate(ISink`1 sink)
2>                         bei Sitecore.Install.Utils.EntrySorter.Populate(ISink`1 sink)
2>                         bei Sitecore.Install.PackageGenerator.GeneratePackage(PackageProject solution, ISink`1 writer)
2>                         bei Sitecore.Update.Engine.PackageGenerator.GeneratePackage(DiffInfo diff, String licenseFile, String outputPath)
2>                      Exception Cannot generate package: '', hexidezimaler Wert 0x0B, ist ein ungltiges Zeichen.(System.Exception):
2>                         bei Sitecore.Update.Engine.PackageGenerator.GeneratePackage(DiffInfo diff, String licenseFile, String outputPath)
2>                         bei HedgehogDevelopment.SitecoreProject.PackageBuilder.PackageBuilder.d(d ?)
2>                         bei HedgehogDevelopment.SitecoreProject.PackageBuilder.y.d(String[] ?)
2>C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets(169,5): error : The package builder failed. Please see the build output log for more details.
2>Done building project "TDS.scproj" -- FAILED.
SpaceJump
  • 483
  • 6
  • 24
  • Can you try to close the solution. Delete your .suo file (if you have one). Reopen and try again? – nsgocev Sep 29 '15 at 07:17
  • Gave that a try, but the problem remains. Thanks anyway! – SpaceJump Sep 29 '15 at 07:20
  • 1
    Well there might be another cause of the issue then. Can you try to increase the verbosity level of your output console ( you can check how it is done from here - http://sedodream.com/2008/06/16/ChangingBuildVerbosityInVisualStudio.aspx) and paste the detailed exception :) – nsgocev Sep 29 '15 at 07:31
  • Ok, the increased verbosity level for the output console revealed a more detailed error message. I added that to the first post. – SpaceJump Sep 29 '15 at 07:41
  • No. I use Team Foundation Server. But I haven't checked anything in or out since yesterday. But I just remembered, the only thing I did was changing some text in the rich editor of an item. Could that have something to do with the issue? – SpaceJump Sep 29 '15 at 07:46
  • The exception is that there is an invalid character in the rich text area which makes the item not serialize. Check the content of the rich text for Invalid Characters (according to the exception it should be 0x0B) – nsgocev Sep 29 '15 at 07:52

1 Answers1

6

As it seems the exception is caused by and Invalid Line Ending in a Rich Text Field(check the comments section of the original answer). As the Sitecore Serialization is pretty strict about line ending (check this article for reference) it causes TDS to be unable to generate a package. If the invalid line ending is removed - everything should work well :)

nsgocev
  • 4,390
  • 28
  • 37
  • I looked up 0x0B, it's the + character. How can this be the problem. It is in there for weeks now and everything was building fine until yesterday. I gave it a chance and removed the + characters from the rich text fields anyway, but still no build success. – SpaceJump Sep 29 '15 at 08:24
  • 0x0B should be a line ending. Try to fully remove the content of the item and resync again. Maybe something got pasted out if you populated the value recently. Try to check the item content in some text editor - it should be broken. You can also try to clear it as it is shown here - http://stackoverflow.com/questions/29301248/hexadecimal-value-0x0b-is-an-invalid-character-issue-in-xml – nsgocev Sep 29 '15 at 08:26
  • 3
    Ok, I found the invalid character. It was in a single line text field. Some strange character I coudn't even read. Must be a copy paste job from MS Word by an editor. Anyway, thanks for helping :) – SpaceJump Sep 29 '15 at 09:01