Exclude application config file

Sep 8, 2015 at 2:08 PM
This package works perfectly.

Just one issue:
My application, say MyApp.exe, has an app.config file which contains custom application settings that the user of the app is supposed to adjust to his needs. Before using MSBuild.ILMerge.Task VisualStudio created a MyApp.exe.config file in the output directory that I included in my release. Now that I merge the app this config file is gone.
Can I somehow tell MSBuild.ILMerge.Task to not touch this file?

Many thanks for this great work!
Nicolas
Sep 30, 2015 at 12:54 PM
Hi,
I had the same problem and found a fix.

The problem is that the IlMerge msbuild target (packages\MSBuild.ILMerge.Task.1.0.2\build\MSBuild.ILMerge.Task.targets) overwrites the CopyFilesToOutputDirectory without including the copy of the config file.
The fix is to add at the end of the task a call to the _CopyAppConfigFile target at the end of the CopyFilesToOutputDirectory task in this way:
<CallTarget Targets="_CopyAppConfigFile"/>

Hope this helps.
Coordinator
Dec 11, 2015 at 10:07 AM
Fixed in 1.0.5-rc1.