For the life of me, I can't seem to get my .NET 4 application merging properly with ILMerge. Even after setting /targetplatform, /lib, /ndebug and adding a custom ILMerge.exe.config file the output file doesn't work properly (it doesn't seem to be able to "find" the merged libraries).
I've tried this and this to no avail. I can't even get it to build unless I use the config file, but when I do it doesn't work. Without the config file, I consistently get the error message "Unresolved assembly reference not allowed: PresentationFramework".
Here is the current state of my ILMerge command being used as a post build event:
ilmerge.exe /out:C:\Users\Logan\Development\Projects\OrangeNote\OrangeNote\bin\Release\OrangeNote.exe
/ndebug /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319
/lib:"C:\Windows\Microsoft.NET\Framework\v4.0.30319"
/lib:"C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies"
"C:\Users\Logan\Development\Projects\OrangeNote\OrangeNote\obj\Release\OrangeNote.exe"
"C:\Users\Logan\Development\Projects\OrangeNote\OrangeNote\..\..\..\Libraries\Lucene.Net\src\Lucene.Net\bin\Release\Lucene.Net.dll"
"C:\Users\Logan\Development\Projects\OrangeNote\OrangeNote\..\..\..\Libraries\Ookii.Dialogs\src\Ookii.Dialogs.Wpf\bin\Release\Ookii.Dialogs.Wpf.dll"
"C:\Users\Logan\Development\Projects\OrangeNote\OrangeNote\..\..\..\Libraries\SharpZipLib\bin\ICSharpCode.SharpZipLib.dll"
"C:\Users\Logan\Documents\Visual Studio 2010\Projects\HumanInterfaceProject\HumanInterfaceProject\bin\Release\HipLib.dll"
Any thoughts on what I'm doing wrong??