Question

We have build definition in place and it is building the solution and coping the binaries to the output directory as required. But when I added a new project to the solution, the binaries of the new project are not copied to the build output folder.

Do we need to do any changes to the build definition when we add a new project, because if I do any changes to the existing projects the build output is updated correctly as per the changes. Do I need to do any refresh kind of thing to build definition whenever new project is added to the solution?

Was it helpful?

Solution

There are a couple of things you can check.

Is the folder in Source Control mapped to the workspace of your build definition? It could be that the source isn't being brought down to the build server. If none of the other projects in your solution have any dependencies on the missing project you wont see any errors.

The other thing to check is the configuration you've set to build. In your build definition check the configuration in the build process (e.g. "Release", "Any CPU"). Then open your solution in Visual Studio and right click on the Solution in the Solution Explorer, select "Configuration Manager" and make sure that the same configuration exists, if it does make sure that the project is set to build for that configuration.

OTHER TIPS

I think the only way to get the effect you 're having is if you 're actually building another *.sln in your build definition.

If you 're using the same sln & everything is build, there is no reason for the binaries of the new assembly to not get copied.
If for some reason the sources aren't available, your build would fail.

EDIT
(after Comment "We are not building any other solution using this build definition. And it is building the solution successfully")

I think you need to share some additional info.
Are you saying that in your Build Agent you see under Sources both:

C:\Builds\1...\Sources\SolutionName\OldProject\bin\"Config"\OldProject.dll
C:\Builds\1...\Sources\SolutionName\NewProject\bin\"Config"\NewProject.dll

but then under Binaries only

C:\Builds\1...\Binaries\"Config"\OldProject.dll ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top