Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 178233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:11:43+00:00 2026-05-11T14:11:43+00:00

I am trying to convert my shop from using VSS to TFS. Our current

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:11:44+00:00Added an answer on May 11, 2026 at 2:11 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to convert SVG images to PNG using C#, without having to
I'm trying to convert an incoming sting of 1s and 0s from stdin into
I am trying to convert an access datetime field to a mysdl format, using
I'm trying to convert an XML file into the markup used by dokuwiki, using
i´m using subsonic 3 trying convert a SQL2008 project to MySQL. when the projects
I am trying to convert the following SQL into Subsonic syntax using the SqlQuery
I am trying convert the following Collatz Conjecture algorithm from: public class CollatzConjexture {
I am trying convert the following Collatz Conjecture algorithm from: public class CollatzConjexture {
Trying to convert a JSON string into an object in C#. Using a really
I'm trying to convert old QuickTime framework code to the 64-bit Cocoa-based QTKit on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.