Subject: Error building a Setup project using TFS Build 2008
- Hi all,
I am setting up TFS Build in our new TFS system, We have customized the standard build with what we needed to meet our needs and for all standard projects it works fine giving us more time to develop spending less time to produce compiled version for test and deploy.To be able to compile setup projects we have customized the After Compile target launching the setup build through a call to devenv.
This works fine for most projects, but last friday we had one of our setups refusing to compile on server, while compiling it on all development machines the result was fine.The message on the Build Log was "Build exited with Error 1" - a very useless message.
We searched the network to find answers and tried various ways to obtain more informations.First we checked the whole setup to verify if we did something wrong, but everything looked correct.
Then we had a little result in changing the call to devenv from the devenv.exe to the devenv.com executable.
The devenv.com gave some more informations on the error output, precisely the following:EXEC : error : 'activeds.tlb' should be excluded because its source file 'C:\WINDOWS\system32\activeds.tlb' is under Windows System File Protection.The guilty for all this mess is a Dll we use to query Active Directory for Users and Groups.activeds.tlb is not directly referenced in our project, which has a reference to the interop.activeds dll that Visual Studio built for us when we referenced the activeds.dll.
Not having a direct reference in the project means activeds.tlb is not one of the dependencies of the setup, so we had no way to Exclude it as it was requested by the Build system.soWe then tried various things to resolve the problem:First we put the tlb in our main project as content and set it in the setup as a file to be added.This had no result, maybe it was not the right approach.Then we tried adding in directly the c:\windows\system32\activeds.tlb to the setup project and set in its properties that it was excluded.
but the result was not different.We also tried to set some other properties like setting the vital flag for the file to false, but setup ignored any setting on that file.This means that also add directly the file to the setup is wrong.Now the fact that on developers machines all work is (we suppose) because of our accounts being administrators of the local machine, while the TFS Build service is not.
So I think it is a problem of permissions, have you any idea on what to do on the TFS Build to solve this issue?It also come to my mind that maybe the activeds has to be set as a prerequisite, to avoid the problem, but I'm not sure and I never had the need to set a custom prerequisite in a setup, just the standard ones (framework and installer).if you have any idea, on how to solve this,
thank you in advance
Sabrina
Answers
Hi Sabrina,
When you add TFSBuild account to local administrator, will this issue occur?Though it is suggested that the build account Should not be an administrator on Team Foundation Server computers, but for some scenarios, Team Foundation Build service account must be an administrator on the build computer, for example if you are running tests as part of the build process.
Ruiz Yi
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi- Marked As Answer byRuiz YiModeratorMonday, November 09, 2009 2:03 AM
All Replies
Hi Sabrina,
When you add TFSBuild account to local administrator, will this issue occur?Though it is suggested that the build account Should not be an administrator on Team Foundation Server computers, but for some scenarios, Team Foundation Build service account must be an administrator on the build computer, for example if you are running tests as part of the build process.
Ruiz Yi
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi- Marked As Answer byRuiz YiModeratorMonday, November 09, 2009 2:03 AM


