I have a simple problem. I want to exclude some of the dll dependencies (in the detected dependencies folder) in my setup project so they don't get copied into the users install folder. I solved it by setting the 'exclude' property to true on the assemblies I don't want, and then building the msi file. It works fine, the assemblies are excluded.
However, if I close visual studio and reload it, only one of the 'exclude' properties (of 4 in my case that I set) stays set to true. I checked the vdproj file and there are 4 lines in there like this:
"Exclude" = "11:TRUE"
... one for each of the assemblies I wanted excluded.
So it seems VS2010 is not correctly loading the settings from the vdproj file. I'm mystified. Does anyone have a workaround?
It's because the dependency analyzer always adds DLLs to the deployment project when their Copy Local properties are set to true. See the section titled "Previously excluded files are included again when the solution is re-opened" in the MSDN article, Troubleshooting Setup and Deployment Projects. You'll have to choose between using Visual Studio's Copy Local and using your deployment project to install files in the right place, especially in a complex solution.