Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In a VS Setup project, how can I exclude the dependencies of a project from the MSI?

I'm working in C#. I have a small VS Solution with 4 projects:

  1. a DLL
  2. an EXE that references the DLL
  3. a merge project, that does nothing more than ILMerge on the assemblies from the prior two steps
  4. a setup project, that packages the .EXE output of the Merge project. (I've added the "Primary Output of a Project" to the setup, specifying the Merge project here)

The problem is, the setup project automatically detects the projects #1 and #2 as dependencies for project #3. When I include the primary output of the 3rd project into the MSI (Setup project), the dependencies are automatically dragged in as well. I don't want this.

How can I stop it?

I tried specifying an "Exclude Filter" but couldn't get that to work. No matter what I tried, the dependencies always got dragged in.

alt text

I tried manually modifying the Setup.vdproj, to remove the auto-detected dependency projects, but when I re-loaded the .vdproj in VS, the auto-detected dependencies came back.

help?

like image 343
Cheeso Avatar asked Nov 21 '09 17:11

Cheeso


2 Answers

I hate when that happens. I figured it out 3 minutes after I asked the question.

You can just right click on the detected dependencies, and in the properties window, specify "Exclude = True"

alt text

like image 144
Cheeso Avatar answered Nov 19 '22 19:11

Cheeso


Awesome Cheeso that worked for me. Just be careful that if one of your projects or sub projects gets a new project reference then that dependancy will appear in the setup project. You will have to be aware of this and exclude the dependancy as you have done.

like image 28
Domc Avatar answered Nov 19 '22 21:11

Domc