1

I am going through tidying up my WPF application and it's installer and was wondering if there is a way to reduce the number of included files by embedding / bundling the DLL and associated XML files with the EXE?

Some examples of the references I have are:

"EntityFramework.dll"                   
"EntityFramework.SqlServer.dll"         
"EntityFramework.SqlServer.xml"         
"EntityFramework.xml"                   
"Quartz.dll"                            
"Quartz.xml"                            
"Google.Protobuf.dll"                   
"Google.Protobuf.xml"                    
"INIFileParser.dll"                     
"INIFileParser.xml"                     
"MySql.Data.dll"                        
"MySql.Data.xml"                        
"MySql.Data.Entity.EF6.dll"             
"MySql.Data.Entity.EF6.xml"             
"Newtonsoft.Json.dll"                   
"Newtonsoft.Json.xml"                   

There isn't any functional reason to bundle it other than reducing the number of files in the directory, kinda feeling a little OCD about cleaning house ATM.

Alan
  • 2,046
  • 2
  • 20
  • 43
  • https://github.com/dotnet/ILMerge – Kevin Gosse Feb 07 '19 at 16:30
  • The xml files are totally unnecesary. They only provide help for Visual Studio to provide tooltips for intelisense, they don't need to be shipped. – Alejandro Feb 07 '19 at 16:34
  • Possible duplicate of [Embedding DLLs in a compiled executable](https://stackoverflow.com/questions/189549/embedding-dlls-in-a-compiled-executable) – Alejandro Feb 07 '19 at 16:35
  • It's not worth the added complication IMO. Once you ilmerge then it makes it harder to see what dll are used. That can be a significant maintenance downside. For what benefit? – Andy Feb 07 '19 at 16:35
  • @Andy The project will still have all full dependencies and be unmodified, only the final exe is affected, hardly a mainteinance problem. As for the benefits, I can see making it easier to copy the program (a single file versus many, more "portable") and making it harder to reverse enginer, to name a few. Of course, the exact program being made is what makes that difference worthy or useless. – Alejandro Feb 07 '19 at 16:59
  • @KevinGosse did you try yourself ILMerge? – Zam Feb 07 '19 at 18:04
  • I used the Microsoft ILMerge using this command and it worked with the exception of the Quartz.dll `c:\ILMerge\ILMerge.exe /out:"Bundle.exe" "Original.exe" "*.dll" /target:exe /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 /wildcards` – Alan Feb 07 '19 at 18:18
  • @Zam I used it a few years ago yes, why? – Kevin Gosse Feb 07 '19 at 21:40
  • @KevinGosse It's real pain for WPF project – Zam Feb 08 '19 at 00:23

0 Answers0