views:

41

answers:

1

Hi,

In Visual Studio 2008, I have a c# app, that depends on multiple other projects. I want to deploy to customers: 1) binaries only - I use an installer project for that 2) binaries only, but the top level app as source code (for customer's integration purposes)

For 1) I need the app project to have dependencies on the other projects For 2) I need the same app project to link against the binaries from the other projects.

How do I manage this in VS2008?

Joop

A: 

You can change the "references" of your top-level application to binary references: just remove the references and add them again by browsing to the compiled assembly instead of selecting a project in the same solution.

The same project file can now be used in two solutions:

  • app-fullbuild.sln can build everything at once.
  • app-minimal.sln builds only the top-level application. Obviously, this requires that the dependencies have already been build and are available in some expected location. This is easier to achieve if all projects were build to the same output folder.

The only gotcha is that for app-fullbuild.sln visual studio will no longer automatically know that the dependencies need to be build first. This can be fixed by right-clicking the application project in the solution and editing "project dependencies". Fortunately these "extra manual dependencies" between projects are saved in the solution file, not in the project file.

Wim Coenen

related questions