Question

I have a VS installer copying several files. I need to maintain 2 differnt installers 1 with specific files included and the other without. I want to use the same installer project. I thought maybe this can be done - getting the differnt result according to some define parameter how can I do this?

Was it helpful?

Solution

Found a way to do so. using the MSBuild conditional dependencies and then using the output of some project. MS Build conditional referencing

OTHER TIPS

I do believe you can do this by putting code into the Pre-build and Post-build events of the installer project.

Use a compiler directive for each of the builds and then you put DOS command line stuff into the pre/post build event command line box depending on what you need to do. Then you just perform 2 builds with 2 difference compiler directives.

It's actually pretty simple, a simple copy of a file would be like:

copy /Y "$(TargetDir)$(ProjectName).dll" "$(SolutionDir)lib\$(ProjectName).dll"

Obviously, you would probably have more stuff than this in there but you get the picture. They're basic DOS batch file commands.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top