What a good approach for white dll marking

What is a good approach for white marking dll and exe with visual studio?

In essence, we want to be able to change the name of the dll and exe based on the client that we are packaging for the solution, for example:

Instead of myCompany.exe and myCompany.db.dll, I would like yourComany.exe and yourComany.db.dll or acme.exe and acme.db.dll, etc.

Edit:

We are currently using the direct process of creating a visual studio with a wix project to create msi.

+4
source share
3 answers

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" 
+3
source

You can use ILMerge in any process after the assembly that you want to receive on all your assemblies (dll and exe) to create a one-time created by the customer.

 ilmerge /out:CustomerName.exe internalName.dll internalName.exe 
+1
source

I do not know that there is a good way to do this without creating a project as an XYZ company. You can try something like this , which will give you the desired result, but it will also change the physical name of the assembly, which can cause dependency problems.

0
source

All Articles