error in build - The data at the root level is invalid. Line 1, position 1.

75 views
Skip to first unread message

Richard Slade

unread,
May 7, 2009, 1:44:56 PM5/7/09
to ccnet...@googlegroups.com
Hi All,
 
Hope someone can help.
I hae a .NET 2.0 winforms solution with about 9 projects in it. All has been building fine until I added a Set up project to the solution. I now get a
The data at the root level is invalid. Line 1, position 1 error getting project - build failed message.
 
It seems to be throwing an XML error.
Any help appreciated.
Many thanks
Richard

Ruben Willems

unread,
May 7, 2009, 2:29:43 PM5/7/09
to ccnet...@googlegroups.com
Hi

whre do you get this error?
can you post a stacktrace/ errorlog ?

with kind regards
Ruben Willems

Richard Slade

unread,
May 7, 2009, 2:51:10 PM5/7/09
to ccnet...@googlegroups.com
Hi... Thanks for the quick reply. Will send tomorrow when I'm in the office. 


Richard Slade

unread,
May 8, 2009, 4:11:18 AM5/8/09
to ccnet...@googlegroups.com
Hi Ruben,
 
Error in build log as follows:
 
<failure>
    <builderror>
      <type>NAnt.Core.BuildException</type>
      <message><![CDATA[Error loading project 'C:\Documents and Settings\XXX\My Documents\Visual Studio 2005\Projects\XXX.HeadOffice.Setup\XXX.HeadOffice.Setup.vdproj'.]]></message>
      <stacktrace><![CDATA[   at NAnt.VSNet.ProjectFactory.CreateProject(SolutionBase solution, SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver referencesResolver, DirectoryInfo outputDir, String projectPath)
   at NAnt.VSNet.ProjectFactory.LoadProject(SolutionBase solution, SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver referencesResolver, DirectoryInfo outputDir, String path)
   at NAnt.VSNet.SolutionBase.LoadProjects(GacCache gacCache, ReferencesResolver refResolver, Hashtable explicitProjectDependencies)
   at NAnt.VSNet.WhidbeySolution..ctor(String solutionContent, SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver refResolver)
   at NAnt.VSNet.WhidbeySolutionProvider.GetInstance(String solutionContent, SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver refResolver)
   at NAnt.VSNet.SolutionFactory.LoadSolution(SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver refResolver)
   at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()]]></stacktrace>
      <internalerror>
        <type>System.Xml.XmlException</type>
        <message><![CDATA[Data at the root level is invalid. Line 1, position 1.]]></message>
        <stacktrace><![CDATA[   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(TextReader txtReader)
   at NAnt.VSNet.ProjectFactory.LoadProjectXml(String path)
   at NAnt.VSNet.ProjectFactory.CreateProject(SolutionBase solution, SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver referencesResolver, DirectoryInfo outputDir, String projectPath)]]></stacktrace>
      </internalerror>
    </builderror>
  </failure>




From: Ruben Willems <ruben....@gmail.com>
To: ccnet...@googlegroups.com
Sent: Thursday, 7 May, 2009 19:29:43
Subject: [ccnet-user] Re: error in build - The data at the root level is invalid. Line 1, position 1.

Ruben Willems

unread,
May 8, 2009, 4:20:06 AM5/8/09
to ccnet...@googlegroups.com
Hi

bad news I'm afraid : vdproj files can only be compiled by Visual Studio

http://khurwitz.blogspot.com/2008/08/nant-and-setup-projects-vdproj.html



with kind regards
Ruben Willems


Richard Slade

unread,
May 8, 2009, 4:31:10 AM5/8/09
to ccnet...@googlegroups.com
Hi Ruben,
 
Thanks. I see the point, but don't understand why it won't compile though. Surely all the other projects in my solution are classed as vbproj projects.
 
I've targeted the solution for the build, not the project directly and it copes with all the other project types. Apologies - it's early still. Do I just have to accept that it won't compile SetUp and Deployment projects?
 
Thanks

Sent: Friday, 8 May, 2009 9:20:06

Ruben Willems

unread,
May 8, 2009, 4:36:54 AM5/8/09
to ccnet...@googlegroups.com
Hi

it seems like it, but it is a nant problem, not a ccnet one.

maybe you can call visual studio from nant or so.



with kind regards
Ruben Willems


Richard Slade

unread,
May 8, 2009, 4:38:48 AM5/8/09
to ccnet...@googlegroups.com
Thanks for all your help

Sent: Friday, 8 May, 2009 9:36:54

Phil Sayers

unread,
May 8, 2009, 8:02:17 AM5/8/09
to ccnet...@googlegroups.com

You may want to consider moving to WiX instead of using vdproj projects.  http://wix.sf.net

 

Wix comes from Microsoft, it will integrate with visual studio (using the Votive addon which is provided)

Wix projects are MSBuild files, so you can build using the MSBuild task in nant, or construct the MSBuild command line as part of an exec task in nant.

 

Depending on how much stuff you do in your vdproj file you may or may not have the time to do the conversion.

 

Wix comes with tools to reverse engineer MSI’s and create “wix” assets.  It can be a little clunky if you go this route, but it gets you on the wix bandwagon, and gets it working for you,  you can do clean up later.

Richard Slade

unread,
May 8, 2009, 12:00:14 PM5/8/09
to ccnet...@googlegroups.com
thanks - I'll look into that


From: Phil Sayers <ph...@cds-am.net>
To: ccnet...@googlegroups.com
Sent: Friday, 8 May, 2009 13:02:17
Reply all
Reply to author
Forward
0 new messages