By default WSPBuilder puts all referenced assemblies from the Setup project into GAC. I use the following to control that behaviour:
- Set the output directories of the dependent assemblies to either 80\bin or GAC in the setup project.
- The assemblies that some where referenced in a dependent assembly that should not be deployed: Reference in Setup project and set ‘copy local’ to false.
- Post build script to do delete the bin folder of the Setup project. This will delete the assembly created for the Setup project. I never put any code in the Setup project.
I use the following post build script that does different things on what configuration you are building:
if $(ConfigurationName) == Debug $(ProjectDir)PostBuildDebug.bat $(ProjectDir)
rem Provide the project directory as parameter.
echo Clean-up of files for WSP builder.
rmdir %1\bin /s /q