aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

TFS Build builds solution and its projects in wrong order

Open tmarinov opened this issue 9 years ago • 1 comments

I have Asp.Net core (Framework 4.6.1) solution with the following structure:

API sln | -- WebApi.Project_1

         | -- Project_2 (Core library, referencing Framework 4.6.1)
                    references Project_4 (Core Library, referencing Framework 4.6.1)

         | -- Project_3 (Core library, referencing Framework 4.6.1)
                     references Project_4 (Core Library, referencing Framework 4.6.1)

See the "sanitized" project.json files attached. Some notes:

  • there is a number of classic (4.6.1 .net) libraries added to the solution but not referenced yet by any other core projects.
  • I created the core libraries and manually referenced .net framework 4.6.1 from their json files
  • they use x86 platform, specified in project.json -> buildOptions

Everything is built and run OK by using VisualStudio 2015 (either on my local machine or locally on the same build agent server)

The solution build fails when it is built in CI build by TFS 2015 build engine with the following error: "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(265,5): Error: D:\tfsAgent_work\folder\folder\Project_2\error CS0006: metadata file '\folder\folder\bin\debug\net461\Project_4.dll' could not be found"

Same error, but for Project_3, referencing Project_4 as well.

By looking at the build log I see that Project_4 is built after the Projects 2 and 3, thus the file is not there yet. I tried different options:

  • adding the references in project.json
  • using Project references
  • Solution properties -> Project dependencies...
  • manually reorder the projects in API.sln file. No difference.

WebApi_Project_1.json.txt Project_2.json.txt Project_3.json.txt Project_4.json.txt

tmarinov avatar Dec 09 '16 10:12 tmarinov

This issue is being closed because it has not been updated in 3 months.

We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.

aspnet-hello avatar Dec 30 '17 23:12 aspnet-hello