I was able to create single exe for my WinForm app using Costura and Fody (Any CPU .NET 4). All dll files used in my project are placed in a 'dll' folder inside project. And Build Action of each dll is set to none. Then each dll in this folder is added as a reference.
Now I want to add Aforge.Video.FFMPEG.dll as reference and did as above. But when running the app it shows an exception :
System.IO.FileLoadException: 'Could not load file or assembly 'AForge.Video.FFMPEG, Version=2.2.5.0, Culture=neutral, PublicKeyToken=03563089b1be05dd' or one of its dependencies. Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019)'
Finally I found that FFMPEG has 8 native dlls and this files should put in bin/Release folder along with Aforge.Video.FFMPEG.dll. Then I can only run the app.
Also Fody not embedding those native dll. How can I embed this FFMPEG to fody to create a single exe file?
User contributions licensed under CC BY-SA 3.0