views:

187

answers:

4

The problem is that when projects are been built and produced normally without any errors the final packaged msi is missing dependency assemblies that are normally packaged if someone builds the project through visual studio for example. So what happens is that the application is getting installed normally and then crashes on run time by saying that xyz dll is missing.

From what i can tell it either doesn't refresh the dependencies before building the setup project or somehow fails to include all of them.

We build by using devenv and the solution file (Rebuild all)

Has anyone encountered something similar and if yes how did you resolved it?

edit: CruiseControl is running in a different maching that the development one. Moreover we have figured out that this happens with projects referenced within a solution.

IE in a solution with 3 projects, A a library, B an application that references A and C a setup project then after the build what happens is that B is missing A although the build is successfull and the msi produced.

A: 

There's another post with what looks like the same question, but I haven't been able to check if it works yet. You should be able to include an execution task to run the macro created to refresh the dependencies.

http://stackoverflow.com/questions/45593?sort=votes#sort-top

A: 

When you say it builds fine through Visual Studio by hand, do you mean on the same machine? If so then it probably is the fact that your cruisecontrol service is running as a different user, and as such, has differnt paths and environment variables set, maybe it does not have permissions to access the file system these dependencies are on. If you mean it runs fine on a different machine, then I would make sure that those dependencies actually there and that the user the service runs as has permissions to get to them. We have never encountered these issues, sorry, so I am just trying to guess at a few potential setting up CC.NET issues.

Alex
A: 

You might check to see if the missing dlls are in the GAC on the build machine.

I ran into an issue a few months back where the build server was generating an install with one fewer dll than any of the developer boxes. It turns out the missing dll was in the GAC on the build box. For some unknown reason, VS2005 decided it didn't need to include the dll since it was in the GAC - even if we specifically referenced a local copy of the dll in the project.

Pedro
A: 

This situation is a result of MSBUILD not supporting setup projects. So we are forced to use devenv to build the solution with Cruise Control.

The real problem was that projects in the same solution were referenced by the main application and while this was not reproducible in full .NET setup projects it did happened repeatedly in CF setup projects.

We resolved this issue by changing the architecture of our CF solutions to have all related projects in 1 project as folders so there is only 1 exe produced and packaged with the setup project.

It's notable that we didn't had missing assemblies when referencing other dll files but only when we were referencing library projects which existed in the same solution.

After googling about this subject i found out some disturbing details about this subject, which point me to the fact that this bug and the incapability of msbuild to support setup project exist since ~2005 in msdn forum reports and not only.

Konstantinos