How can I force VS 2008 Deployment Project to install two different versions of the same file in two different places?
Some Background: I have a VS 2008 Deployment project I am not using the project output, I am adding assembly files directly because we have third party licensing and obfuscation tools that we run on the assemblies after building them. Also included in this deployment project is a Help directory with examples.
One of the Examples is a C# project that references some of the assemblies from the main program. We include the bin\Release folder for this example project so that an end user can easily run the example with out having to run the example through a debugger or anything. This may have older versions of the main project assemblies because this will depend on when the Example project was last built.
The issue: The main project assemblies referenced by the example project are included in the bin\Release folder for the example, and an assembly with the same name but different version is in the Application Directory in the deployment project. It seems that VS 2008 is trying to minimize space by recognizing that these files have the same names so it stores one copy. However开发者_Go百科 it is using the file from the example not the file from the main project. Is there a way to tell VS to use the specified file every time even if there may be another file with the same name?
So it turns out when you add an assembly to a deployment project VS automatically adds its dependencies. However, when rebuilding those dependencies never get updated (it will always use the same version as when you first added the assembly that required those dependencies).
I had to exclude the dependencies (as VS will not let you delete them) and manually add those same files. Now every time I make a build I get the latest version of those files.
精彩评论