MSBuild target _CopyWebApplication does not copy all the expected binaries
-
Monday, July 16, 2012 12:00 PM
Hi...
I can't explain why some binaries are not copied as expected, by MSBuild, on one of our Build Server.... Maybe someone can help me to find the issue?
On Team Build server 2010, the target "_CopyWebApplication" is called to copy the binaries issued from a web application into the _publishedWebSite folder... This target is defined in "\\SPTFSB02\C$\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets". I.e.: that's the default behaviour of MSBuild on a TeamBuild .
We have two build servers here. On the first one, named "B", we have installed Biztalk. Biztalk is however not installed on the other server, named "N" (I.e.: Biztalk projects are only foreseen to be built on the server "B" while other projects can be built on both servers).
Another difference between "B" and "N": on the server "N", we only have Visual Studio 2010 while on "B", Visual Studio 2003, 2005 and 2008 have been installed as part of the "BizTalk kit". There is no other differences (I.e.: SP, fix, etc...) as far as I know/see.
It appears however that for a web application, some binaries are not copied into the _publishedWebSite folder when built on the server "B", although those binaries have well been produced (I.e.: they are in the "binaries" fdolder and later copied in the Build' drop folder... but they are missing in the "_publishedWebSite\bin" subfolder of that drop folder). Everything is fine on the server "N".
This is a major issue as we deploy the content of the _publishedWebSite folder and not the whole content of the drop folder....
Using Beyond Compare, I didn't notice any difference between the MSBuild target files of "B" and "N" expect in the Microsoft.Data.Schema.TSqlTasks.targets (to support Azure on the "N" server.. no idea where this difference comes from).
The difference can be noticed in the Builds' logs, where the list of dll copied by the task "_CopyWebApplication" is not the same on "B" and "N"... There is however no related warning or error in those logs...
I am lost :/
Valéry Letroye
- Edited by Valéry Letroye Monday, July 16, 2012 12:22 PM
All Replies
-
Tuesday, July 17, 2012 5:51 AMModerator
Hi Valéry,
Thank you for your question.
I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Thank you for your understanding and support.
Best regards,
Lily Wu [MSFT]
MSDN Community Support | Feedback to us
-
Tuesday, July 17, 2012 5:25 PM
hi Lily,
i too have the same issue..4-5 .dll binaries are not copied into published files.
-
Wednesday, July 18, 2012 7:16 AM
I am really happy to not be alone in the dark :)
Valéry Letroye
-
Thursday, July 19, 2012 8:29 PMOwner
Good day.
So, the copy works on the "N" server and fails the copy on the "B" server.
Can you check for any custom tasks per this post?
http://social.msdn.microsoft.com/Forums/en-IE/tfsbuild/thread/aa26fd7b-a623-4b3a-ae34-155730f566a1
If you do a Process Monitor trace on the server that works and the server were the copy fails, do you see any errors? Do a trace that monitors file activity. Get Process Monitor from this link:http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
Is this project converted for an earlier version of TFS?
Has this ever worked on the "B" server?
Does server "B" have any difference in permissions for any of the pertinent build or TFS accounts or it is running a different version of antivirus software? (These are possible causes of a failed copy.)Trevor Hancock (Microsoft)
Please remember to "Mark As Answer" the replies that help. -
Friday, July 20, 2012 8:55 AM
I am so sorry (and going to kill some BizTalk developers or architects here :).
I did compare again the MSBuild logs with Beyond Compare (~1600 lines) and finally found that the assemblies are not copied (even if they are flagged as "Copy Local = True") on the biztalk server ("B") because they are in the GAC...
I didn't see that before because it's single lines (for the only 2 assemblies not copied) : This reference is not "CopyLocal" because it's registered in the GAC. (TaskId:70).
I did remove unimportant differences with Beyond Compare and finally found that difference remaining.
Unfortunatelly, those two assemblies are core services for all Biztalk projects here, reason why they are deployed on those servers. Well, usually, we never deploy anything in the GAC of the Build Servers but we use MSBuild's ReferencePath option to solve the references. Hoewver, due to BizTalk limitation, those assemblies must be in the GAC :(
That's the reason why the problems only occurs with that VS solution...
Valéry Letroye
- Marked As Answer by Valéry Letroye Friday, July 20, 2012 8:56 AM
- Unmarked As Answer by Valéry Letroye Friday, July 20, 2012 8:56 AM
- Marked As Answer by Valéry Letroye Friday, July 20, 2012 8:56 AM
- Edited by Valéry Letroye Friday, July 20, 2012 8:57 AM
- Edited by Valéry Letroye Friday, July 20, 2012 9:04 AM

