TFS Database Backup Failed : There is an error in XML document - but which Doc? - tfs

Our Nightly TFS 2012 backup has just started to fail. It also fails when run directly through TFS Express Administration Console.
Which file is the following error actually referring to? If I can find it then I should be able to fix the "Root element is missing" error :)
[13/08/2014 23:00:00] [Info] Full database backup job
[13/08/2014 23:00:00] [Info] Getting backup lock
[13/08/2014 23:00:05] [Error]
Exception Message: There is an error in XML document (0, 0). (type InvalidOperationException)
Exception Stack Trace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at Microsoft.TeamFoundation.Admin.BackupSets.Load(String folder)
at Microsoft.TeamFoundation.Admin.Jobs.FullDatabaseBackupJobExtension.Run(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime jobQueueTime, String& resultMessage)
Inner Exception Details:
Exception Message: Root element is missing. (type XmlException)
Exception Stack Trace: at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBackupSets.Read7_BackupSets()
[13/08/2014 23:00:05] [Info] Full Backups Failed
Thanks.

Dylan answered my original question as to where to find the unspecified xml file that was in error, but in case it helps anyone else...
The Backupsets.xml file was empty. Why this is I do not know...
Attempting to configure backups through TFS Express Administration Console also failed with the same error, so I
Deleted the Backupsets.xml file altogether
Reconfigured Backups using the wizard - Now that it didn't find the xml file at all it created a new one.
Ran a full backup - which was sucessful. Hopefully the scheduled backups will now also work from now on.
NB The newly created Backupsets.xml file (Before the first full backup) :
<?xml version="1.0"?>
<BackupSets xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Version>1</Version>
<BackupSets />
</BackupSets>

Look in the folder where your backups are configured to be placed. there will be an XML file there, can't remember the name, but maybe something like BackupSets.xml

FIX (user workaround):
Rename the file BackupSets.xml in the backup destination folder
Re-run Full Backup*
In TFS Admin Console select Scheduled Backups, then click Take Full Backup Now. Or use command line, PowerShell script, API call as desired.
CAUSE: backupsets.xml in backup destination does not contain valid XML.
Why does this cause failure? Backup wizard opens backupsettings.xml then calls XML deserializer function System.Xml.Serialization.XmlSerializer.Deserialize preparing to add new entry. Invalid XML content including empty/zero byte or text-only content will cause deserialize exception.
PRODUCTS IMPACTED: Repro confirmed in TFS2010 and on 2017-11-25 I had repro with TFS2015 SP3 :-O
Fix is fairly straightforward... once you understand what is going on. -Zephan
MICROSOFT CODE BUGFIX/feature improvement request:
BACKUP Wizard exception handling for backupsets.xml deserialize or parsing exceptions.
If XML deserialization error then close backupsets.xml, rename it to backupsets-YYMMDD-hhmm-corrupt-backup.xml, then jump to backupsets.xml file not found functionality.
SEVERITY: HIGH (data loss)
This is a long-standing problem that can lead to major data loss. I've personally seen over 1 month of data loss due to this issue silently blocking backups and making all earlier restore sets unusable (since parsing BackupSets.xml is VERY finicky I couldn't even hack to restore last successful backup.)

Related

SSIS Truncation in Flat file source

I am new to SSIS, I am importing a flat file data into SQL Server. It throws error while importing data in the flat file source task.
[Flat File Source [60]] Error: Data conversion failed. The data conversion for column "DCN_NAME" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
[Flat File Source [60]] Error: The "Flat File Source.Outputs[Flat File Source Output].Columns[DCN_NAME]" failed because truncation occurred, and the truncation row disposition on "Flat File Source.Outputs[Flat File Source Output].Columns[DCN_NAME]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Flat File Source returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
How to solve this issue. I don't have problem in destination.Is it possible to change the source field length?
I changed the source length in source connection manager. It works fine now.
You have not provided enough information to answer your question. Here is what I can gleam from what you have provided.
Your SSIS package is read a flat file and it assumes DCN_Name is data DT_STR
(type char). Confirm the origin and the destination have the same data type. If they do not, use a [Data Conversion] function which is found on the left side on the screen under Data Flow.
Be mindful that while SQL uses varchar and nvarchar, SSIS uses DT_WSTR and DT_STR. It can get confusing. In the link below you will find a SSIS to SQL Data Type Conversion
enter link description here
The errors generated by SSIS are counter intuitive.
The solution was use a data conversion because the source and destination were different data types.

Xamarin Error XA0009 - Format of Executable or Library is invalid

I am struggling to make an Android App, but it always seems to end in this particular failure:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Exception while loading assemblies: Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA0009: Error while loading assembly: bin/Debug/(projectname).dll ---> System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Mono.Cecil.PE.ImageReader.ReadImage () [0x0002d] in <1b827dd2cbec4ef6829dffcefdcd3b01>:0
at Mono.Cecil.PE.ImageReader.ReadImage (Mono.Disposable1[T] stream, System.String file_name) [0x0000a] in <1b827dd2cbec4ef6829dffcefdcd3b01>:0
at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00007] in <1b827dd2cbec4ef6829dffcefdcd3b01>:0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00073] in <1b827dd2cbec4ef6829dffcefdcd3b01>:0
--- End of inner exception stack trace ---
at Java.Interop.Tools.Diagnostics.Diagnostic.Error (System.Int32 code, System.Exception innerException, System.String message, System.Object[] args) [0x0000a] in :0
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Load (System.String fileName) [0x00045] in <9ca47d05131d4b8c85910dacd818f0c6>:0
at Xamarin.Android.Tasks.ResolveAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver resolver) [0x00123] in <3f37ea95794e430e91f10accab4cf241>:0 ((projectname))
I am wondering what on earth might be causing the error, as I have tried multiple solutions to avoid the error and it often turns up in such random ways.
Last time I got the error it occurred as follows:
I had a project with only two Activity-files and two Layout files.
I created a gridview in the other layout and tested it on the Android emulator -> all was working well.
I resized the gridview and tested the app with the emulator -> error mentioned above occurred.
I deleted the solution, restored a manual backup saved in an other location, and tested it -> it was working.
I repeated the procedure with the gridview -> error occurred.
Now, as I deleted the project and tried to restore the backup again, even the backup did not work anymore. I tried to build it, then clean it and build but every attempt to build it resulted now as an error.
I seem to get mystic errors from time to time ( like Emulator image stopped working after all I did was just add a button with the designer) but every time troubleshooting eventually comes down to this error and I have to scrap the project. I have been working with Xamarin now 18 hours this weekend and 4 hours have been coding and the rest trying to fix the never-ending errors.
I am using MacBook Pro and have tried running the solution from the default directory and external drive.
So in a nutshell: What causes the error mentioned above and can it be fixed or at least avoided?
I tried to google ( long and hard) but could not find a solution that would be of any help.
Ps. Sorry if the post was not correct, it is my first. Would not have posted in the first place but I am desperate.
Thank you for your patience to read all the way to here.

error in running transformation:indexoutofrangeexception - petapeco

as per suggestion for by #CreativeManix I started investigating petaPeco
Retrieving large number of rows (more than 10 mil) in asp.net mvc application
After adding exact system.data.oracleclient + putting web.config in the bin where mvc is getting compiled in .dll I got following error:
Error 3
Running transformation: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Array.InternalGetReference(Void* elemRef, Int32 rank, Int32* pIndices)
at System.Array.GetValue(Int32 index)
at Microsoft.VisualStudio.TextTemplating5F4490FB7AE018243DBB4DF6250E7211.GeneratedTextTransformation.GetCurrentProject()
at Microsoft.VisualStudio.TextTemplating5F4490FB7AE018243DBB4DF6250E7211.GeneratedTextTransformation.GetConnectionString(String& connectionStringName, String& providerName)
at Microsoft.VisualStudio.TextTemplating5F4490FB7AE018243DBB4DF6250E7211.GeneratedTextTransformation.InitConnectionString()
at Microsoft.VisualStudio.TextTemplating5F4490FB7AE018243DBB4DF6250E7211.GeneratedTextTransformation.LoadTables()
at Microsoft.VisualStudio.TextTemplating5F4490FB7AE018243DBB4DF6250E7211.GeneratedTextTransformation.TransformText()
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result)
This error shows up when i run the transformation after installation of petaPoco.
One thing I do know the error is coming from "GetCurrentProject" - and probably - "(Array)dte.ActiveSolutionProjects"
I think something is wrong in the way petaPoco is set up with my project! somehow it can't find the activesolution project. I am not too sure how to fix it.
I investigated this.
In my question section I asked few questions:
I was not sure about how to fire transformation/or process of generating Database.CS. So initially I was installing petapoco from the command prompt- I
To do that you just click "Run Custom Tool" by right clicking on the "Database.tt". If your connection string is correct + you are referencing correct Oracle/SQL server data provider + that provider is available in GAC + (if it is oracle and you have the password for the default schema user of the database you are trying to access)- then that should generate the Database.cs
To enable Oracle data client to read the schema out of oracle database I needed to take out following entry:
cmd.GetType().GetProperty("BindByName").SetValue(cmd, true, null);
And everything worked.
Connection string can look like:
connectionString="Data Source=PXWREG;Persist Security Info=True;User ID=XWREG_ACDS_T;password=isacdst"

Activation error occured while trying to get instance of type LogWriter, key ""

I am getting this error while loggin into eventviewer. I am looging the exception in event viewer as well as rolling flat file. If i remove the eventviewer section then rolling flat file works perfectly, but only when i add this it gives the exception
{"Resolution of the dependency failed, type =
\"Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter\", name =
\"(none)\".\r\nException occurred while: while resolving.\r\nException
is: InvalidOperationException - The type TraceListener cannot be
constructed. You must configure the container to supply this
value.\r\n-----------------------------------------------\r\nAt the
time of the exception, the container was:\r\n\r\n Resolving
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterImpl,LogWriter.default
(mapped from Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter,
(none))\r\n Resolving parameter \"structureHolder\" of constructor
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterImpl(Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder
structureHolder,
Microsoft.Practices.EnterpriseLibrary.Logging.Instrumentation.ILoggingInstrumentationProvider
instrumentationProvider,
Microsoft.Practices.EnterpriseLibrary.Logging.ILoggingUpdateCoordinator
updateCoordinator)\r\n Resolving
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder,LogWriterStructureHolder.default
(mapped from
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder,
(none))\r\n Resolving parameter \"traceSources\" of constructor
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder(System.Collections.Generic.IEnumerable1[[Microsoft.Practices.EnterpriseLibrary.Logging.Filters.ILogFilter,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35]] filters,
System.Collections.Generic.IEnumerable1[[System.String, mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
traceSourceNames,
System.Collections.Generic.IEnumerable1[[Microsoft.Practices.EnterpriseLibrary.Logging.LogSource,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35]] traceSources,
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource
allEventsTraceSource,
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource
notProcessedTraceSource,
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource
errorsTraceSource, System.String defaultCategory, System.Boolean
tracingEnabled, System.Boolean logWarningsWhenNoCategoriesMatch,
System.Boolean revertImpersonation)\r\n Resolving
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource,General\r\n
Resolving parameter \"traceListeners\" of constructor
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource(System.String
name,
System.Collections.Generic.IEnumerable1[[System.Diagnostics.TraceListener,
System, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]] traceListeners,
System.Diagnostics.SourceLevels level, System.Boolean autoFlush,
Microsoft.Practices.EnterpriseLibrary.Logging.Instrumentation.ILoggingInstrumentationProvider
instrumentationProvider)\r\n Resolving
System.Diagnostics.TraceListener,Event Log Trace Listener\r\n"}
I had the same problem and it was due to an error in my configuration file. I referenced trace listeners from my categorySources section which did not exist in my listeners section. I removed the categories and the mappings (i did not use them anyway) and then it worked. I guess you can validate your configuration file in the configuration console and then it will tell you what the problem is.
1 - Make sure you are referencing the correct DLLs
Microsoft.Practices.EnterpriseLibrary.Logging
Microsoft.Practices.EnterpriseLibrary.Common
2 - Make sure your configuration file is in the right location (in the same project or in a references project)
3 - Make sure your configuration file is correct. Editing it with the Enterprise Library Configuration Tool, nothing should be in red. Try expanding all trace listeners, categories, etc. The most common error is that one of the Special Categories is pointing to a non existing Listener.
I had a similar experience with ExceptionHanlder., I switched over to using Unity container directly after playing around with intro material re: logging.
I basically just copied the examples from the Help files and briefly wondered why it wasn't working and errored on Type Resolution; Could not resolve.
The answer was simple enough. I had only "played" with logging prior to switching to Unity container but the examples I was using/copying were using both Logging and Exception Handling injection.
Since I hadn't "played: with Exception Handling in 5.0, there were no entries for this in the configuration file, hence the reason why Unity could not resolve.
Solution: take 5 seconds to add the ExceptionHandling block into the config file using the tools and I was good to go and keep on "playing".
Unity needs the entries for each resolved block in the config file even if they are not Named / customised. This is rediculously obvious but easily overlloked if you are hacking away with example code for learning purposes.
I got this error because a database listener was set with a connection string that didn't exist.
To help diagnose, comment out the listener lines and then add them again one by one.
I got this error when moving the app to another server, and in my case, it was the initializeData field, which sets the path for the log file, was not valid, and it was not able to create the log file at startup.
When i edited and put a valid path for the log to be created, it worked ok.
Hope it helps someone.

Troubleshooting MSBuild failures

I am trying to convert my shop from using VSS to TFS.
Our current codebase consists of a large number of Visual Studio 2008 solutions and I've noticed some of them seem to cause MSBuild to fail, but I cannot figure out why. The actual solutions themselves and the projects they hold build correctly, but the overall build still fails.
The ErrorsAndWarnings.txt and Release.txt file show no errors, just warnings (various little things in the code we need to clean up)
The BuildLog.txt file is, of course, enormous and has tons and tons of difficult-to-comprehend text in it. As best I can tell though, when it gets to one of these SLN files that give it problems, MSBuild just flat out crashes and dies.
Task "MSBuild"
Global Properties:
Configuration=Release
Platform=Any CPU
OutDir=C:\TFS\REPOSITORY\Full\Binaries\Release\
PublishDir=C:\TFS\REPOSITORY\Full\Binaries\Release\
SkipInvalidConfigurations=true
RunCodeAnalysis=false
VCBuildOverride=C:\TFS\REPOSITORY\Full\Sources\Code\Solution\Solution.sln.Release.vsprops
VCBuildAdditionalLibPaths=
VCBuildAdditionalOptions=
VCBuildToolPath=
VCBuildUseEnvironment=
TeamBuildConstants=_TEAM_BUILD_
TargetsNotLogged=GetTargetPath;GetNativeManifest;GetCopyToOutputDirectoryItems
C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(1008,5):
error MSB4018: The "MSBuild" task failed unexpectedly.
error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
error MSB4018: at Microsoft.Build.BuildEngine.SolutionWrapperProject.AssignDependencyLevel(ProjectInSolution project, SolutionParser solution, Dictionary`2 projectsByDependencyLevel)
error MSB4018: at Microsoft.Build.BuildEngine.SolutionWrapperProject.AssignDependencyLevel(ProjectInSolution project, SolutionParser solution, Dictionary`2 projectsByDependencyLevel)
error MSB4018: at Microsoft.Build.BuildEngine.SolutionWrapperProject.AssignDependencyLevels(SolutionParser solution, Dictionary`2 projectsByDependencyLevel)
error MSB4018: at Microsoft.Build.BuildEngine.SolutionWrapperProject.CreateSolutionProject(SolutionParser solution, Project msbuildProject, BuildEventContext projectBuildEventContext, String wrapperProjectToolsVersion, Engine parentEngine, String solutionProjectCache)
error MSB4018: at Microsoft.Build.BuildEngine.SolutionWrapperProject.Generate(SolutionParser solution, Project msbuildProject, String toolsVersionOverride, BuildEventContext projectBuildEventContext)
error MSB4018: at Microsoft.Build.BuildEngine.Project.Load(String projectFileName, BuildEventContext buildEventContext, ProjectLoadSettings projectLoadSettings)
error MSB4018: at Microsoft.Build.BuildEngine.Engine.GetMatchingProject(Project existingProject, String projectFullPath, BuildPropertyGroup globalPropertiesToUse, String toolsVersion, String[] targetNames, BuildEventContext buildEventContext, Boolean toolsVersionPeekedFromProjectFile)
error MSB4018: at Microsoft.Build.BuildEngine.Engine.BuildProjectFileInternal(BuildRequest buildRequest)
error MSB4018: at Microsoft.Build.BuildEngine.Engine.EngineBuildLoop(BuildRequest terminatingBuildRequest)
error MSB4018: at Microsoft.Build.BuildEngine.TaskExecutionModule.BuildProjectFile(Int32 handleId, String[] projectFileNames, String[] targetNames, IDictionary[] globalPropertiesPerProject, IDictionary[] targetOutputsPerProject, EngineLoggingServices loggingServices, String[] toolsVersions, Boolean useResultsCache, Boolean unloadProjectsOnCompletion, BuildEventContext taskContext)
error MSB4018: at Microsoft.Build.BuildEngine.EngineProxy.BuildProjectFilesInParallel(String[] projectFileNames, String[] targetNames, IDictionary[] globalProperties, IDictionary[] targetOutputsPerProject, String[] toolsVersions, Boolean useResultsCache, Boolean unloadProjectsOnCompletion)
error MSB4018: at Microsoft.Build.Tasks.MSBuild.ExecuteTargets(ITaskItem[] projects, Hashtable propertiesTable, ArrayList targetLists, Boolean stopOnFirstFailure, Boolean rebaseOutputs, IBuildEngine2 buildEngine, TaskLoggingHelper log, ArrayList targetOutputs, Boolean useResultsCache, Boolean unloadProjectsOnCompletion, String toolsVersion)
error MSB4018: at Microsoft.Build.Tasks.MSBuild.BuildProjectsInParallel(Hashtable propertiesTable, ArrayList targetLists, Boolean success, Boolean[] skipProjects)
error MSB4018: at Microsoft.Build.Tasks.MSBuild.Execute()
error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
Done building target "CoreCompileSolution" in project "TFSBuild.proj" -- FAILED.
Done Building Project "C:\TFS\REPOSITORY\Full\BuildType\TFSBuild.proj" (CompileSolution target(s)) -- FAILED.
Done executing task "MSBuild" -- FAILED.
Done building target "CoreCompileConfiguration" in project "TFSBuild.proj" -- FAILED.
Done Building Project "C:\TFS\REPOSITORY\Full\BuildType\TFSBuild.proj" (CompileConfiguration target(s)) -- FAILED.
Done executing task "MSBuild" -- FAILED.
Done building target "CoreCompile" in project "TFSBuild.proj" -- FAILED.
Done Building Project "C:\TFS\REPOSITORY\Full\BuildType\TFSBuild.proj" (CoreCompile target(s)) -- FAILED.
Done executing task "MSBuild" -- FAILED.
Done building target "CallCompile" in project "TFSBuild.proj" -- FAILED.
I know pasting incredibly verbose error messages in Stack Overflow is lame but the core thing to take from the above is MSBuild is crashing and I can't figure out why. It gives the usual "Object reference not set..." error, which is pretty much universally useless when it's not your code or program you're troubleshooting.
I see that it's referencing TeamFoundation.Build.targets. I look up that file that file but it doesn't really jump out at me what the problem could be. (the line after the comment is the (1008,5) referenced above)
<!-- Build using MSBuild task -->
<MSBuild BuildInParallel="$(BuildSolutionsInParallel)"
Projects="$(Solution)"
Properties="Configuration=$(Configuration);Platform=$(Platform);$(OutDirOption);$(PublishDirOption);SkipInvalidConfigurations=$(SkipInvalidConfigurations);$(FxCopDirOption);$(ReferencePathOption);$(CodeAnalysisOption);
VCBuildOverride=$(VsPropsFile);VCBuildAdditionalLibPaths=$(VCBuildAdditionalLibPaths);VCBuildAdditionalOptions=$(VCBuildAdditionalOptions);VCBuildToolPath=$(VCBuildToolPath);VCBuildUseEnvironment=$(VCBuildUseEnvironment);
TeamBuildConstants=$(TeamBuildConstants);TargetsNotLogged=$(TargetsNotLogged);$(CustomPropertiesForBuild);$(CustomProperties)"
Targets="$(Targets)"
StopOnFirstFailure="$(StopOnFirstFailure)">
<Output TaskParameter="TargetOutputs" ItemName="CompilationOutputs" />
</MSBuild>
At first I thought this was telling me that one of the items that need to be substituted in the node was missing, but the other solutions which don't have issues have similar/identical setups.
I notice some of the items in the call stack of the MSBuild deal with targets and the issue seems to stem from the TeamFoundation.Build.targets file but I'm stuck as to what to do next to troubleshoot it.
Has anyone run into this before?
I believe the solution file is corrupt, and VS is being more tolerant. (If I remember correctly this crash can be caused by an unmatched curly parenthesis)
If it's feasible, I would recreate the solution file from within VS.
Dan (msbuild team)
When you said:
The actual solutions themselves and the projects they hold build correctly
do you mean that they build correctly within the IDE, or that you can go to those solution directories on the command line and run 'msbuild foo.proj' or 'msbuild bar.sln'?
Anyway, things I would try are first narrow down the offending solution/project, by telling TFS not to build in parallel, turn off multi-CPU support (e.g. '-maxcpucount:1'), do a binary search by trimming away solutions/projects. Once you get to the offending set, build with the '-v:diag' parameter to get even more details about the state of the MSBuild engine.
Alternately, you can write a small C# app that invokes the MSBuild engine directly and debug that application by catching first chance exceptions and having Reflector handy. See
sample code in MSBuild Engine Class.
Hmmm. You get a NullReferenceException, meaning that one of the parameters into that task is a null when it shouldn't be. Dumb question, but have you set up your TFSBuild.proj file with the solutions you want to build? IE. the stuff you put into the
- Itemgroup.
If you have, I would suggest adding message tasks to the Teambuild targets file just above the failing task to write out diagnostic information, like so:
That should spew some diagnostics info into your buildlog just above the log exerpt you pasted on your next build.
You may want to give the MSBuild-Sidekicks a try. They have a nifty little debugger for MSBuild included and offer a 14-day trial version: http://www.attrice.info/msbuild/

Resources