vgmarimon Posted December 15, 2014 Report Posted December 15, 2014 Hi, it's possible to embed .DLL file into .EXE in VS2013? Many Thx.
Paul Henty Posted December 15, 2014 Report Posted December 15, 2014 Not with Visual Studio. You can download a tool called ILMerge that will merge the .exe and the dlls into a single .exe after they are compiled by VS. It's a command line utility but it's quite simple to use. You can get it here: http://www.microsoft.com/en-us/download/details.aspx?id=17630 Here is an example of the command to merge my example project .exe with the FSUIPCClient.dll. This is run from the folder with the two files in, e.g. the bin/release folder, so 'cd' there first. "C:\program files (x86)\microsoft\ilmerge\ilmerge.exe" FSUIPCCLientExample_CSharp.exe FSUIPCClient.dll /out:ExampleMerged.exe /target:winexe /targetplatform:v4 /log:mergelog.log /ndebug After the ilmerge.exe command, list the name of the main .exe followed by all the dlls you want to merge (I just have one in this example). Set the /out: parameter to the name you want your single .exe to be. Then add the other options, but make sure you set the target platform correctly, i.e. if you're targeting version 2 of the .NET runtime then you would need /targetplatform:v2. In my example I was targeting version 4.0. Paul
vgmarimon Posted December 15, 2014 Author Report Posted December 15, 2014 Many Thx, command line better, runs fine.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now