Trying to reference projects to force build order with TFS 2012. TFS is building correctly with the following setup but when debugging or building my Web Applications locally I get odd results.
Setup a solution with four projects
Project A = a Class library (this is plugin project for my website)
Project B = a project containing a reference to project A (this is used to for the build order)
Project C = a web Application containing a reference to project B with copy local set to false
Project D = a web Application containing a reference to project B with copy local set to false
Project E = a console Application containing a reference to project B with copy local set to false
When building the solution everything builds fine. The binaries for project A are only in project A's output and project B's output.
When performing a rebuild on project C the binaries for project A are copied into the bin for project D.
When performing a rebuild on project D the binaries for project A are copied into the bin for project C.
Project E does not experience the same issue as the Web Applications.
I have tried using ReferenceOutputAssembly = false in the reference to Project B and this had the same results.
- Moved by Jack Zhai - MSFTMicrosoft contingent staff Tuesday, May 21, 2013 5:29 AM Move to a more appropriate forum.
I create 4 projects in my computer as you said and I can't reproduce this issue. In my solution, when I set the CopyLocal as False, the dll of project A is not include in the bin folder. I guess that you reference the project A in the project C and project D, do you?
I am using Visual Studio 2012.
I do not reference Project A in C or D.
In order to reproduce this you have to make sure projects C and D are web Applications. I am using MVC 3 web apps.
I oddest behavior of this is when you build D the references are not copied into D as expected but there are copied into C. This also happens in revers when building C.
When you build the solution all DLL are where the are supposed to be.
- Edited by PC Super Hero Tuesday, May 21, 2013 7:35 PM
I created a MVC project and I can't reproduce this issue.
To analyze what cause this issue, please collect the build log via the way as the link below said:
After you get the log, please post it here.
I would send the log but this does not happen when building via command line.
Here is a link to a sample project.
- Open the solution in Visual Studio
- Right Click on Project C and select Rebuild
- Open the bin folder for Project D
- You should see the binaries for projects A and B
I can reproduce this issue via your steps. If we just rebuild the solution, we can't get this issue. So I think it is a bug when build in VS IDE. I am suggesting you submit this issue as a bug to:
Please post the link of connect here after you submitted it.
Here is the link to the bug I submitted.