views:

88

answers:

1

I'm working on some stuff I've inherited that has a slightly untidy project structure. Some of the projects reference a Primary Interop Assembly (PIA) that it expects to be installed in the GAC. There is a note in the solution folder that says (in summary) "Before building this project, first build X, Y and Z and manually install them in the GAC". Well, that's not really conducive to automation or continuous integration, is it?

I want to make this build work on a TeamCity build server, the build agent will run on a machine that doesn't have the PIAs installed in the Global Assembly Cache (GAC). So the build will fail. I don't want to have to install these PIAs on every build agent machine, I need the build to be self-contained, so it can build from a clean source code checkout, soup to nuts. So the question is twofold.

  1. How can I structure the build so that it is self contained and doesn't break if there are any dependencies on the GAC?
  2. If (1) is successful, how will this affect deployment to end-user desktops, where the PIAs must be installed to the GAC?

I would appreciate the expert advice of the Stack Overflow community.

A: 

I would simply add a build step that installs X, Y, and Z to the GAC, and then finishes the build, runs unit tests, etc.

After that is complete, it uninstalls from the GAC.

The only way to have your build be 'self-contained' - is to stop depending on GAC installed assemblies. This isn't a build server config issue, it is a assembly architecture issue. If possible make those just regular assembly references that copied to the other project's bin folder when they are built.

That makes things a lot easy for end-user deployment - you can probably take advantage of Click-Once deployment without GAC installs.

Adam
Thanks for your thoughts Adam. Unfortunately the components need to be deployed in the GAC on the end user systems as they are true shared components that will be used by many systems developed externally. So, at least for deplyment, I have to use the GAC.
Tim Long