I’m new to using continuous integration and have decided to go with TeamCity. One issue I have is that my code is not compiling due to a missing dependency.
(8, 7): error CS0246: The type or namespace name ‘CrystalDecisions’ could not be found (are you missing a using directive or an assembly reference?)
So, I’m not quite sure what is the proper thing to do here.
- Do I install the Crystal Reports
redistributable and just let it sit there forever? - Do I set up my
build so that it installs Crystal
Reports before compiling and
uninstalls after all the tests are
complete? - Some other option I
don’t know about?
Option (1) seems like it might be an issue since I could have multiple projects that need different versions of Crystal Reports and perhaps I can’t have them all installed. Option (2) seems like it might be possible through the command line. I’m guessing this is the normal way to do this?
Thanks
To answer your question succinctly, you should install the redistributable on every box that is expected to compile the codebase, including TeamCity build agents, and leave it there indefinitely (you should, from that point, only have to touch that package again to update it to a later version as your application may require).
Usually, the TeamCity server (and/or its build agents if using a distributed CI model) needs to be set up with a simplistic development environment and/or an installation of the software. Put another way, the build agent will need the same resources that the dev environment would need in order to compile the application, except for a full install of the IDE (you’re probably using msbuild or nant instead), for exactly the same reasons that the dev environment needs the resources. Such resources include, but are not limited to:
The easiest way to ensure this is all present is to build it into your solution architecture where possible.