# FB6 +TFS =&gt; error on "Read Text File " to variable

**URL:** https://www.finalbuilder.com/forums/t/fb6-tfs-gt-error-on-read-text-file-to-variable/1178
**Category:** Discussion
**Created:** [April 22, 2009, 1:31am UTC](https://www.finalbuilder.com/forums/t/fb6-tfs-gt-error-on-read-text-file-to-variable/1178 "2009-04-22T01:31:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 22, 2009, 1:31am UTC](https://www.finalbuilder.com/forums/t/fb6-tfs-gt-error-on-read-text-file-to-variable/1178/1 "2009-04-22T01:31:05Z")

</div>

Hello,

I am using Finalbuilder V6.2 and TFS 2008 with Visual Studio 2008 SP1

I have an TFS build that runs a Finalbuilder script. The script runs fine, except for an&nbsp; error "while reparsing log output", see buildlog part at the end.

After several test I found out that the error occurs on when using the "put file contents into variable" option of the&nbsp; "Read Text File " FB action.

The error does not occur when running the script/action without TFS build.

I hope you can help,

quirrel

&nbsp;&nbsp;&nbsp; Action List Succeeded : Main  
SWEPUpdate.fbp6 : FinalBuilder warning Invalid Output Format: - BugFix: developer update of small talk packages did not work correctly  
SWEPUpdate.fbp6 : FinalBuilder warning Invalid Output Format: - BugFix: window and dialogs went out of screen if saved position is no longer in view (multiple screens)  
C:\build\SWEPFramework\SWEPFrameWork-LatestTrunk\BuildType\TFSBuild.proj(214,5): error : An unexpected error occured while re-parsing log output  
C:\build\SWEPFramework\SWEPFrameWork-LatestTrunk\BuildType\TFSBuild.proj(214,5): error : Element 'Category' was not found. Line 1, position 57978.  
C:\build\SWEPFramework\SWEPFrameWork-LatestTrunk\BuildType\TFSBuild.proj(214,5): error :&nbsp;&nbsp;&nbsp; at System.Xml.XmlReader.ReadStartElement(String name)  
C:\build\SWEPFramework\SWEPFrameWork-LatestTrunk\BuildType\TFSBuild.proj(214,5): error :&nbsp;&nbsp;&nbsp; at FinalBuilder.TeamBuildLogShim.DeferredMessage.ReadString(XmlReader reader, String elementName)  
C:\build\SWEPFramework\SWEPFrameWork-LatestTrunk\BuildType\TFSBuild.proj(214,5): error :&nbsp;&nbsp;&nbsp; at FinalBuilder.TeamBuildLogShim.DeferredMessage.ReadFromXML(XmlReader reader)  
C:\build\SWEPFramework\SWEPFrameWork-LatestTrunk\BuildType\TFSBuild.proj(214,5): error :&nbsp;&nbsp;&nbsp; at FinalBuilder.TeamBuildLogShim.Finalise(Boolean success)  
&nbsp; Copied FinalBuilder project and log files to "\\fe20049s\BuildResult\SWEPFramework\LatestTrunk\SWEPFrameWork-LatestTrunk\_20090422.10\FinalBuilder"  
Done executing task "FBCmd".

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [April 23, 2009, 2:37am UTC](https://www.finalbuilder.com/forums/t/fb6-tfs-gt-error-on-read-text-file-to-variable/1178/2 "2009-04-23T02:37:31Z")

</div>

Hi Tobias,   
  
 We haven’t been able to reproduce the problem here using the ‘Read Text File’ action, would you be able to send in your project as well as the text file that is being read into support at [finalbuilder.com](http://finalbuilder.com) so we can try and reproduce it here?   
  
 Thanks,   
 Paul.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 27, 2009, 1:59am UTC](https://www.finalbuilder.com/forums/t/fb6-tfs-gt-error-on-read-text-file-to-variable/1178/3 "2009-04-27T01:59:23Z")

</div>

Hello Paul,

I sent the files to Finalbuilder support.  
I hope you find the reason for my problems.

Best regards,

Tobias

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [September 9, 2009, 1:21am UTC](https://www.finalbuilder.com/forums/t/fb6-tfs-gt-error-on-read-text-file-to-variable/1178/4 "2009-09-09T01:21:33Z")

</div>

Hello Paul,   
  
 we are encountering the same problem, but we use a different action.   
 The problem occured firstly with “Read Text File” (but without the option “Put file contents into Variable” checked, in contrast to Tobias). Then we tried to replace this action with a “Set Variable”, setting the variable to the file content (copy & paste of content). However, the same problem occured again. At least we can confirm that this problem only occurs when building on TFS, but not locally.   
 Since we use “Set Variable” in various builds without errors, it might be a problem with the actual content (which is a simple c++ header file in the error case).   
 Any ideas?   
  
 Best regards,   
 Hans

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [September 9, 2009, 2:13am UTC](https://www.finalbuilder.com/forums/t/fb6-tfs-gt-error-on-read-text-file-to-variable/1178/5 "2009-09-09T02:13:14Z")

</div>

We looked a little bit deeper into this, and we found the following:

Action "Read Text File": if the file contains empty lines, the error occurs.

The same problem seems to occur when using "Set Variable" to a content which contains empty lines.

&nbsp;

Best regards,

Hans

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [September 9, 2009, 3:02am UTC](https://www.finalbuilder.com/forums/t/fb6-tfs-gt-error-on-read-text-file-to-variable/1178/6 "2009-09-09T03:02:44Z")

</div>

This is quite an issue for us, since the Microsoft ressource compiler requires an empty line at the end of this header file. Otherwise it won’t compile.   
 Do you have any ideas for a workaround or how can this issure be fixed?   
  
 Thanks in advance,   
 best regards,   
 Hans
