If the only excuse for recovery is a name change, can you just use something in common in the first place? Imagine that you need to plan 50 identical DLLs and build / deploy each separately, because they should all be called different. Even if it will be only for a few clients, I would not want to support it. The top can also be a problem.
If you do this, I would probably go with the build task ( which can perform fairly complex operations). You mentioned that you “packaged the solution”; the viability of the build task will depend on how it is packaged.
In response to your comment about EXE names with client-specific names ... My obvious assumption is that these applications will contain as little code as possible.
The simplest integration of the assembly that I can think of would be to create a post-build task that was executed when the compilation was successful in release mode. Then the task could read the configuration file that defined the unique names and copy the successfully created EXE into the output directory.
Some operations can be performed only from the task configuration file: http://msdn.microsoft.com/en-us/library/ms171466 .
Alternatively, you may need to create a small application to do all the work for you and simply pass configuration keys to it.
For example, here is a small post-build command that I run to minimize my JavaScript / CSS when building a web application successfully. The concept is similar:
- to build
- execute the application (e.g. msbuild.exe or your custom application)
- transfer data to an executable file (for example, paths, switches, etc.).
- executable file writes files
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe "$(ProjectDir)Properties\build\minify.xml" /p:SourceLocation="$(ProjectDir)client" /p:CssOutputFile="$(ProjectDir)client\final\final-full.css" /p:JavaScriptOutputDirectory="$(ProjectDir)client\final"
source share