I built an application that used some extrnal libraries, Like Tag-lib, Naudio and Windows Media Player.
So they add me to my solution (in the same folder as my EXE file), some DLLs.
I wanted to embed those DLLs to my EXE file, so I looked at the internet and found some options.
The best answer I found was this:
Embedding DLLs in a compiled executable
And it worked, but not for all of the DLLs.
It successfully embedded Naudio and Tag-Lib, But Unabled to embed Windows Media Player's DLLs.
Can anyone help me embed the Windows Media Player's DLLs to my application's EXE?
Update:
After some help (Thanks Mathieu Wybrecht) it worked. I did everything that he said, but still it isn't working well. The EXE file work perfectlly, I can move him and it will work. But when I'm in the project's solution, it error me about the missing Dlls (The Dlls of WMP that Costura.Fody just embed...), and then I copy the Dll again to the folder and the error gone. It seccessed to build the solution, rebuild the solution or starting the program, the DLLs Disapear again (embed to the EXE) and the error comes up again...
Your question is not clear. What do you mean by "when I started to use Windows Media Player, it added a DLL file, and now it doesn't ..."
If the problem is that you want to embed one more DLL in your exe, follow the how-to you found about Costura.Fody.
If the problem occurs at run time, ensure that all embedded DLL don't try to load more dependencies. You can check for their dependencies using "Dependency Walker", it exists for x86 and x64 platform.
Edit: you edited your question, and now I'm back to edit my answer too :)
So, you succeeded to embed few DLL but not every one of them. It can be related to some of following reasons: