"The programs file contains invalid XML. '<path>\Programs.xml' ---> System.Xml.XmlException:" error when deploying an Alchemy Compatibility Package

Save to PDF

Applies to: Alchemy

14/10/2022 Cliff Hobbs   ID: 602495

Resolution

To fix this issue, make sure the contents of the Programs.xml file in the root folder of the Cloudhouse Alchemy Compatibility Package are valid.

Tip

The cause of the error (of which there could be many) is shown after the "---> System.Xml.XmlException:" text. 

For example, in the following 

Cloudhouse.Container.Core.Exceptions.InvalidConfigurationFileException: The programs file contains invalid XML. '<path>\Programs.xml' ---> System.Xml.XmlException: Root element is missing.

the key text to look for is "Root element is missing" which means ???

If you still encounter problems, please contact your Cloudhouse Partner in the first instance (if relevant), otherwise contact Cloudhouse Support for further assistance.

Symptoms

When deploying a Compatibility Package I receive the following error:

ERROR Cloudhouse.Container.Deployment.Program - Failed:
Cloudhouse.Container.Core.Exceptions.InvalidConfigurationFileException: The programs file contains invalid XML. '<path>\Programs.xml' ---> System.Xml.XmlException:

For example:

ERROR Cloudhouse.Container.Deployment.Program - Failed:
Cloudhouse.Container.Core.Exceptions.InvalidConfigurationFileException: The programs file contains invalid XML. '<path>\Programs.xml' ---> System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
   at Cloudhouse.Container.Core.Serialization.XmlConvert.DeserializeFromFile[T](String path)
   at Cloudhouse.Container.Core.RunProgram.ProgramsFile.DeserialisePrograms(String programsFilePath)
   --- End of inner exception stack trace ---
   at Cloudhouse.Container.Core.RunProgram.ProgramsFile.DeserialisePrograms(String programsFilePath)
   at Cloudhouse.Container.Core.PackageDirectory.Validate()
   at Cloudhouse.Container.Core.PackageDirectory.get_SourcePackage()
   at Cloudhouse.Container.Deployment.DeploymentCommandFactory.Deploy()
   at Cloudhouse.Container.Deployment.Program.Main(String[] args)
ERROR Cloudhouse.Container.Deployment.Program - Exiting with code: -9


Cause

This error is caused if the contents of the Programs.xml file in the root folder of the Compatibility Package are invalid and cannot be parsed.

Source:
Was this article helpful?

Table of Contents

    Can't find what you're looking for?

    Contact Support