How to merge multiple assemblies into one?












75















I consuming my service stack using EXE project (startup task for azure application) in that I have copied following service stack's DLL & some Azure's DLLs in to EXE project.



dlls



When I build this EXE project then Azure DLLs will be bundled with my EXE but service stack's DLL will not be bundled with EXE, because to run my EXE on any machine I need to copy all service stack's DLL manually.



I have used this service stack's dll to use



JsonServiceClient client = new JsonServiceClient(servicepath);


What should I have to do to bundled all these DLLs in to my EXE?










share|improve this question





























    75















    I consuming my service stack using EXE project (startup task for azure application) in that I have copied following service stack's DLL & some Azure's DLLs in to EXE project.



    dlls



    When I build this EXE project then Azure DLLs will be bundled with my EXE but service stack's DLL will not be bundled with EXE, because to run my EXE on any machine I need to copy all service stack's DLL manually.



    I have used this service stack's dll to use



    JsonServiceClient client = new JsonServiceClient(servicepath);


    What should I have to do to bundled all these DLLs in to my EXE?










    share|improve this question



























      75












      75








      75


      43






      I consuming my service stack using EXE project (startup task for azure application) in that I have copied following service stack's DLL & some Azure's DLLs in to EXE project.



      dlls



      When I build this EXE project then Azure DLLs will be bundled with my EXE but service stack's DLL will not be bundled with EXE, because to run my EXE on any machine I need to copy all service stack's DLL manually.



      I have used this service stack's dll to use



      JsonServiceClient client = new JsonServiceClient(servicepath);


      What should I have to do to bundled all these DLLs in to my EXE?










      share|improve this question
















      I consuming my service stack using EXE project (startup task for azure application) in that I have copied following service stack's DLL & some Azure's DLLs in to EXE project.



      dlls



      When I build this EXE project then Azure DLLs will be bundled with my EXE but service stack's DLL will not be bundled with EXE, because to run my EXE on any machine I need to copy all service stack's DLL manually.



      I have used this service stack's dll to use



      JsonServiceClient client = new JsonServiceClient(servicepath);


      What should I have to do to bundled all these DLLs in to my EXE?







      c# assemblies exe ilmerge servicestack






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 26 '15 at 14:22









      BartoszKP

      26.9k1068107




      26.9k1068107










      asked Nov 10 '11 at 9:43









      Arun RanaArun Rana

      5,0311359104




      5,0311359104
























          6 Answers
          6






          active

          oldest

          votes


















          105














          You have several options:




          • use ILMerge (free)

            For howto see here and here


          OR




          • use some tool like SmartAssembly (commercial)

            it can embed and merge among other things (no need to change your source code)


          OR





          • code that yourself in less than 10 lines (free but minimal source code change)

            mark all needed dependencies as "embedded resource" - this way they are included in the EXE file... you need to setup an AssemblyResolve handler which at runtime reads from Resources and returns the needed DLLs to the .NET runtime...






          share|improve this answer



















          • 4





            Thanks for reminding me of Jeffrey Richter's solution of embedding assemblies! See my answer mentioning Costura for a tool that combines this with injecting the necessary code.

            – CodeFox
            Sep 23 '15 at 4:59



















          28














          The tool you are looking for is called ILMerge .
          It is a command line tool and can be used like this:



          ilmerge /target:winexe /out:MyApp.exe 
          MyExe.exe ServiceStack.dll ServiceStack.Interfaces.dll ServiceStack.ServiceInterface.dll ServiceStack.Text.dll


          There is also an article that describes how to include ILMerge into your VS project setup here






          share|improve this answer
























          • Hi, can I add external resource (file/image) into executable?

            – Emdadul Sawon
            Mar 14 '17 at 12:00











          • @EmdadulSawon maybe you can include them as resources in one of your libs?

            – Alexander
            Jul 19 '18 at 7:46



















          22














          A great tool to include referenced assemblies as embedded resources is Costura (a Fody add-in). The author Simon Kropp describes it as follows:




          [...] a combination of two methods:




          • Jeffrey Richter's suggestion of using embedded resources as a method of merging
            assemblies

          • Einar Egilsson's suggestion using cecil to create module initializers




          The result is a super simple solution which merely requires to fetch Costura.Fody from NuGet.



          Features:




          • Including debug symbols

          • Compression of embedded assemblies

          • Including/excluding specific assemblies

          • Others (see Readme)






          share|improve this answer



















          • 9





            OMG Costura.Fody is the right answer. Installed the package from nuget, rebuilt the project and now I have a standalone EXE AWESOME!!

            – Eric Labashosky
            Oct 30 '15 at 14:52






          • 4





            I can't believe how easy it is. Just install packages from nuget and your are done.

            – iraSenthil
            May 13 '16 at 15:55






          • 2





            I'm using Costura.Fody as well. It's trivial to setup and dead easy to include NuGet packages as resources. Get project.

            – Michael Silver
            May 4 '17 at 18:07











          • Is it possible to not lump all assemblies into the main executable but group them as DLLs such as Gui.dll assembly for all GUI related stuff etc?

            – user3700562
            Sep 4 '18 at 14:22






          • 1





            Great solution! I use it since a year and had no problem. But please note it only includes assemblies referenced by your top project. If your app reference another project which references a third party assembly you need to add it to your top level project.

            – Demir
            Oct 3 '18 at 7:57





















          7














          Try ILMerge-GUI, the .NET merger.
          It's a GUI based Ilmerge which avoids all command line work.






          share|improve this answer





















          • 2





            Fantastic! Worked great for me!

            – Alex Pelletier
            Jul 19 '16 at 18:36






          • 1





            Codeplex is shutting down, so here is the moved project link: bitbucket.org/wvd-vegt/ilmergegui

            – Hegi
            Jan 23 '18 at 11:07



















          3














          If you have WPF dependencies your options may be more limited..... ILMerge doesn't appear to deal with these. Costura.Fody (as mentioned by Codefox above) worked perfectly for us however and took about 5 minutes to get going... a very good experience.



          Install with Nuget (selecting the correct default project in the Package Manager Console).



          It merges the all DLLs marked "Copy Local" = true and produces a merged .EXE (alongside the standard output, most of which is now not necessary) which is also compressed. This can then be used standalone.



          The license is MIT as so you can modify/distribute as required.



          https://github.com/Fody/Costura/






          share|improve this answer































            2














            Checkout the ServiceStack.Gap project which shows several examples of howto ILMerge ServiceStack into a single cross-platform .exe.



            ServiceStack also includes a number of other features that's particularly well suited for these creating embedded apps where it:




            • Allows your services to be self-hosted using .NET's HTTP Listener

            • Supports pre-compiled Razor Views

            • Supports Embedded Resources

            • Supports an embedded database in Sqlite and OrmLite

            • Can be ILMerged into a single .exe






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f8077570%2fhow-to-merge-multiple-assemblies-into-one%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              6 Answers
              6






              active

              oldest

              votes








              6 Answers
              6






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              105














              You have several options:




              • use ILMerge (free)

                For howto see here and here


              OR




              • use some tool like SmartAssembly (commercial)

                it can embed and merge among other things (no need to change your source code)


              OR





              • code that yourself in less than 10 lines (free but minimal source code change)

                mark all needed dependencies as "embedded resource" - this way they are included in the EXE file... you need to setup an AssemblyResolve handler which at runtime reads from Resources and returns the needed DLLs to the .NET runtime...






              share|improve this answer



















              • 4





                Thanks for reminding me of Jeffrey Richter's solution of embedding assemblies! See my answer mentioning Costura for a tool that combines this with injecting the necessary code.

                – CodeFox
                Sep 23 '15 at 4:59
















              105














              You have several options:




              • use ILMerge (free)

                For howto see here and here


              OR




              • use some tool like SmartAssembly (commercial)

                it can embed and merge among other things (no need to change your source code)


              OR





              • code that yourself in less than 10 lines (free but minimal source code change)

                mark all needed dependencies as "embedded resource" - this way they are included in the EXE file... you need to setup an AssemblyResolve handler which at runtime reads from Resources and returns the needed DLLs to the .NET runtime...






              share|improve this answer



















              • 4





                Thanks for reminding me of Jeffrey Richter's solution of embedding assemblies! See my answer mentioning Costura for a tool that combines this with injecting the necessary code.

                – CodeFox
                Sep 23 '15 at 4:59














              105












              105








              105







              You have several options:




              • use ILMerge (free)

                For howto see here and here


              OR




              • use some tool like SmartAssembly (commercial)

                it can embed and merge among other things (no need to change your source code)


              OR





              • code that yourself in less than 10 lines (free but minimal source code change)

                mark all needed dependencies as "embedded resource" - this way they are included in the EXE file... you need to setup an AssemblyResolve handler which at runtime reads from Resources and returns the needed DLLs to the .NET runtime...






              share|improve this answer













              You have several options:




              • use ILMerge (free)

                For howto see here and here


              OR




              • use some tool like SmartAssembly (commercial)

                it can embed and merge among other things (no need to change your source code)


              OR





              • code that yourself in less than 10 lines (free but minimal source code change)

                mark all needed dependencies as "embedded resource" - this way they are included in the EXE file... you need to setup an AssemblyResolve handler which at runtime reads from Resources and returns the needed DLLs to the .NET runtime...







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 10 '11 at 12:04









              YahiaYahia

              63k790121




              63k790121








              • 4





                Thanks for reminding me of Jeffrey Richter's solution of embedding assemblies! See my answer mentioning Costura for a tool that combines this with injecting the necessary code.

                – CodeFox
                Sep 23 '15 at 4:59














              • 4





                Thanks for reminding me of Jeffrey Richter's solution of embedding assemblies! See my answer mentioning Costura for a tool that combines this with injecting the necessary code.

                – CodeFox
                Sep 23 '15 at 4:59








              4




              4





              Thanks for reminding me of Jeffrey Richter's solution of embedding assemblies! See my answer mentioning Costura for a tool that combines this with injecting the necessary code.

              – CodeFox
              Sep 23 '15 at 4:59





              Thanks for reminding me of Jeffrey Richter's solution of embedding assemblies! See my answer mentioning Costura for a tool that combines this with injecting the necessary code.

              – CodeFox
              Sep 23 '15 at 4:59













              28














              The tool you are looking for is called ILMerge .
              It is a command line tool and can be used like this:



              ilmerge /target:winexe /out:MyApp.exe 
              MyExe.exe ServiceStack.dll ServiceStack.Interfaces.dll ServiceStack.ServiceInterface.dll ServiceStack.Text.dll


              There is also an article that describes how to include ILMerge into your VS project setup here






              share|improve this answer
























              • Hi, can I add external resource (file/image) into executable?

                – Emdadul Sawon
                Mar 14 '17 at 12:00











              • @EmdadulSawon maybe you can include them as resources in one of your libs?

                – Alexander
                Jul 19 '18 at 7:46
















              28














              The tool you are looking for is called ILMerge .
              It is a command line tool and can be used like this:



              ilmerge /target:winexe /out:MyApp.exe 
              MyExe.exe ServiceStack.dll ServiceStack.Interfaces.dll ServiceStack.ServiceInterface.dll ServiceStack.Text.dll


              There is also an article that describes how to include ILMerge into your VS project setup here






              share|improve this answer
























              • Hi, can I add external resource (file/image) into executable?

                – Emdadul Sawon
                Mar 14 '17 at 12:00











              • @EmdadulSawon maybe you can include them as resources in one of your libs?

                – Alexander
                Jul 19 '18 at 7:46














              28












              28








              28







              The tool you are looking for is called ILMerge .
              It is a command line tool and can be used like this:



              ilmerge /target:winexe /out:MyApp.exe 
              MyExe.exe ServiceStack.dll ServiceStack.Interfaces.dll ServiceStack.ServiceInterface.dll ServiceStack.Text.dll


              There is also an article that describes how to include ILMerge into your VS project setup here






              share|improve this answer













              The tool you are looking for is called ILMerge .
              It is a command line tool and can be used like this:



              ilmerge /target:winexe /out:MyApp.exe 
              MyExe.exe ServiceStack.dll ServiceStack.Interfaces.dll ServiceStack.ServiceInterface.dll ServiceStack.Text.dll


              There is also an article that describes how to include ILMerge into your VS project setup here







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 10 '11 at 11:41









              yas4891yas4891

              3,77122248




              3,77122248













              • Hi, can I add external resource (file/image) into executable?

                – Emdadul Sawon
                Mar 14 '17 at 12:00











              • @EmdadulSawon maybe you can include them as resources in one of your libs?

                – Alexander
                Jul 19 '18 at 7:46



















              • Hi, can I add external resource (file/image) into executable?

                – Emdadul Sawon
                Mar 14 '17 at 12:00











              • @EmdadulSawon maybe you can include them as resources in one of your libs?

                – Alexander
                Jul 19 '18 at 7:46

















              Hi, can I add external resource (file/image) into executable?

              – Emdadul Sawon
              Mar 14 '17 at 12:00





              Hi, can I add external resource (file/image) into executable?

              – Emdadul Sawon
              Mar 14 '17 at 12:00













              @EmdadulSawon maybe you can include them as resources in one of your libs?

              – Alexander
              Jul 19 '18 at 7:46





              @EmdadulSawon maybe you can include them as resources in one of your libs?

              – Alexander
              Jul 19 '18 at 7:46











              22














              A great tool to include referenced assemblies as embedded resources is Costura (a Fody add-in). The author Simon Kropp describes it as follows:




              [...] a combination of two methods:




              • Jeffrey Richter's suggestion of using embedded resources as a method of merging
                assemblies

              • Einar Egilsson's suggestion using cecil to create module initializers




              The result is a super simple solution which merely requires to fetch Costura.Fody from NuGet.



              Features:




              • Including debug symbols

              • Compression of embedded assemblies

              • Including/excluding specific assemblies

              • Others (see Readme)






              share|improve this answer



















              • 9





                OMG Costura.Fody is the right answer. Installed the package from nuget, rebuilt the project and now I have a standalone EXE AWESOME!!

                – Eric Labashosky
                Oct 30 '15 at 14:52






              • 4





                I can't believe how easy it is. Just install packages from nuget and your are done.

                – iraSenthil
                May 13 '16 at 15:55






              • 2





                I'm using Costura.Fody as well. It's trivial to setup and dead easy to include NuGet packages as resources. Get project.

                – Michael Silver
                May 4 '17 at 18:07











              • Is it possible to not lump all assemblies into the main executable but group them as DLLs such as Gui.dll assembly for all GUI related stuff etc?

                – user3700562
                Sep 4 '18 at 14:22






              • 1





                Great solution! I use it since a year and had no problem. But please note it only includes assemblies referenced by your top project. If your app reference another project which references a third party assembly you need to add it to your top level project.

                – Demir
                Oct 3 '18 at 7:57


















              22














              A great tool to include referenced assemblies as embedded resources is Costura (a Fody add-in). The author Simon Kropp describes it as follows:




              [...] a combination of two methods:




              • Jeffrey Richter's suggestion of using embedded resources as a method of merging
                assemblies

              • Einar Egilsson's suggestion using cecil to create module initializers




              The result is a super simple solution which merely requires to fetch Costura.Fody from NuGet.



              Features:




              • Including debug symbols

              • Compression of embedded assemblies

              • Including/excluding specific assemblies

              • Others (see Readme)






              share|improve this answer



















              • 9





                OMG Costura.Fody is the right answer. Installed the package from nuget, rebuilt the project and now I have a standalone EXE AWESOME!!

                – Eric Labashosky
                Oct 30 '15 at 14:52






              • 4





                I can't believe how easy it is. Just install packages from nuget and your are done.

                – iraSenthil
                May 13 '16 at 15:55






              • 2





                I'm using Costura.Fody as well. It's trivial to setup and dead easy to include NuGet packages as resources. Get project.

                – Michael Silver
                May 4 '17 at 18:07











              • Is it possible to not lump all assemblies into the main executable but group them as DLLs such as Gui.dll assembly for all GUI related stuff etc?

                – user3700562
                Sep 4 '18 at 14:22






              • 1





                Great solution! I use it since a year and had no problem. But please note it only includes assemblies referenced by your top project. If your app reference another project which references a third party assembly you need to add it to your top level project.

                – Demir
                Oct 3 '18 at 7:57
















              22












              22








              22







              A great tool to include referenced assemblies as embedded resources is Costura (a Fody add-in). The author Simon Kropp describes it as follows:




              [...] a combination of two methods:




              • Jeffrey Richter's suggestion of using embedded resources as a method of merging
                assemblies

              • Einar Egilsson's suggestion using cecil to create module initializers




              The result is a super simple solution which merely requires to fetch Costura.Fody from NuGet.



              Features:




              • Including debug symbols

              • Compression of embedded assemblies

              • Including/excluding specific assemblies

              • Others (see Readme)






              share|improve this answer













              A great tool to include referenced assemblies as embedded resources is Costura (a Fody add-in). The author Simon Kropp describes it as follows:




              [...] a combination of two methods:




              • Jeffrey Richter's suggestion of using embedded resources as a method of merging
                assemblies

              • Einar Egilsson's suggestion using cecil to create module initializers




              The result is a super simple solution which merely requires to fetch Costura.Fody from NuGet.



              Features:




              • Including debug symbols

              • Compression of embedded assemblies

              • Including/excluding specific assemblies

              • Others (see Readme)







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Sep 23 '15 at 4:56









              CodeFoxCodeFox

              1,61411835




              1,61411835








              • 9





                OMG Costura.Fody is the right answer. Installed the package from nuget, rebuilt the project and now I have a standalone EXE AWESOME!!

                – Eric Labashosky
                Oct 30 '15 at 14:52






              • 4





                I can't believe how easy it is. Just install packages from nuget and your are done.

                – iraSenthil
                May 13 '16 at 15:55






              • 2





                I'm using Costura.Fody as well. It's trivial to setup and dead easy to include NuGet packages as resources. Get project.

                – Michael Silver
                May 4 '17 at 18:07











              • Is it possible to not lump all assemblies into the main executable but group them as DLLs such as Gui.dll assembly for all GUI related stuff etc?

                – user3700562
                Sep 4 '18 at 14:22






              • 1





                Great solution! I use it since a year and had no problem. But please note it only includes assemblies referenced by your top project. If your app reference another project which references a third party assembly you need to add it to your top level project.

                – Demir
                Oct 3 '18 at 7:57
















              • 9





                OMG Costura.Fody is the right answer. Installed the package from nuget, rebuilt the project and now I have a standalone EXE AWESOME!!

                – Eric Labashosky
                Oct 30 '15 at 14:52






              • 4





                I can't believe how easy it is. Just install packages from nuget and your are done.

                – iraSenthil
                May 13 '16 at 15:55






              • 2





                I'm using Costura.Fody as well. It's trivial to setup and dead easy to include NuGet packages as resources. Get project.

                – Michael Silver
                May 4 '17 at 18:07











              • Is it possible to not lump all assemblies into the main executable but group them as DLLs such as Gui.dll assembly for all GUI related stuff etc?

                – user3700562
                Sep 4 '18 at 14:22






              • 1





                Great solution! I use it since a year and had no problem. But please note it only includes assemblies referenced by your top project. If your app reference another project which references a third party assembly you need to add it to your top level project.

                – Demir
                Oct 3 '18 at 7:57










              9




              9





              OMG Costura.Fody is the right answer. Installed the package from nuget, rebuilt the project and now I have a standalone EXE AWESOME!!

              – Eric Labashosky
              Oct 30 '15 at 14:52





              OMG Costura.Fody is the right answer. Installed the package from nuget, rebuilt the project and now I have a standalone EXE AWESOME!!

              – Eric Labashosky
              Oct 30 '15 at 14:52




              4




              4





              I can't believe how easy it is. Just install packages from nuget and your are done.

              – iraSenthil
              May 13 '16 at 15:55





              I can't believe how easy it is. Just install packages from nuget and your are done.

              – iraSenthil
              May 13 '16 at 15:55




              2




              2





              I'm using Costura.Fody as well. It's trivial to setup and dead easy to include NuGet packages as resources. Get project.

              – Michael Silver
              May 4 '17 at 18:07





              I'm using Costura.Fody as well. It's trivial to setup and dead easy to include NuGet packages as resources. Get project.

              – Michael Silver
              May 4 '17 at 18:07













              Is it possible to not lump all assemblies into the main executable but group them as DLLs such as Gui.dll assembly for all GUI related stuff etc?

              – user3700562
              Sep 4 '18 at 14:22





              Is it possible to not lump all assemblies into the main executable but group them as DLLs such as Gui.dll assembly for all GUI related stuff etc?

              – user3700562
              Sep 4 '18 at 14:22




              1




              1





              Great solution! I use it since a year and had no problem. But please note it only includes assemblies referenced by your top project. If your app reference another project which references a third party assembly you need to add it to your top level project.

              – Demir
              Oct 3 '18 at 7:57







              Great solution! I use it since a year and had no problem. But please note it only includes assemblies referenced by your top project. If your app reference another project which references a third party assembly you need to add it to your top level project.

              – Demir
              Oct 3 '18 at 7:57













              7














              Try ILMerge-GUI, the .NET merger.
              It's a GUI based Ilmerge which avoids all command line work.






              share|improve this answer





















              • 2





                Fantastic! Worked great for me!

                – Alex Pelletier
                Jul 19 '16 at 18:36






              • 1





                Codeplex is shutting down, so here is the moved project link: bitbucket.org/wvd-vegt/ilmergegui

                – Hegi
                Jan 23 '18 at 11:07
















              7














              Try ILMerge-GUI, the .NET merger.
              It's a GUI based Ilmerge which avoids all command line work.






              share|improve this answer





















              • 2





                Fantastic! Worked great for me!

                – Alex Pelletier
                Jul 19 '16 at 18:36






              • 1





                Codeplex is shutting down, so here is the moved project link: bitbucket.org/wvd-vegt/ilmergegui

                – Hegi
                Jan 23 '18 at 11:07














              7












              7








              7







              Try ILMerge-GUI, the .NET merger.
              It's a GUI based Ilmerge which avoids all command line work.






              share|improve this answer















              Try ILMerge-GUI, the .NET merger.
              It's a GUI based Ilmerge which avoids all command line work.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Dec 23 '16 at 4:37









              Maitry Shah

              426




              426










              answered Jun 26 '15 at 12:48









              PritamPritam

              5251126




              5251126








              • 2





                Fantastic! Worked great for me!

                – Alex Pelletier
                Jul 19 '16 at 18:36






              • 1





                Codeplex is shutting down, so here is the moved project link: bitbucket.org/wvd-vegt/ilmergegui

                – Hegi
                Jan 23 '18 at 11:07














              • 2





                Fantastic! Worked great for me!

                – Alex Pelletier
                Jul 19 '16 at 18:36






              • 1





                Codeplex is shutting down, so here is the moved project link: bitbucket.org/wvd-vegt/ilmergegui

                – Hegi
                Jan 23 '18 at 11:07








              2




              2





              Fantastic! Worked great for me!

              – Alex Pelletier
              Jul 19 '16 at 18:36





              Fantastic! Worked great for me!

              – Alex Pelletier
              Jul 19 '16 at 18:36




              1




              1





              Codeplex is shutting down, so here is the moved project link: bitbucket.org/wvd-vegt/ilmergegui

              – Hegi
              Jan 23 '18 at 11:07





              Codeplex is shutting down, so here is the moved project link: bitbucket.org/wvd-vegt/ilmergegui

              – Hegi
              Jan 23 '18 at 11:07











              3














              If you have WPF dependencies your options may be more limited..... ILMerge doesn't appear to deal with these. Costura.Fody (as mentioned by Codefox above) worked perfectly for us however and took about 5 minutes to get going... a very good experience.



              Install with Nuget (selecting the correct default project in the Package Manager Console).



              It merges the all DLLs marked "Copy Local" = true and produces a merged .EXE (alongside the standard output, most of which is now not necessary) which is also compressed. This can then be used standalone.



              The license is MIT as so you can modify/distribute as required.



              https://github.com/Fody/Costura/






              share|improve this answer




























                3














                If you have WPF dependencies your options may be more limited..... ILMerge doesn't appear to deal with these. Costura.Fody (as mentioned by Codefox above) worked perfectly for us however and took about 5 minutes to get going... a very good experience.



                Install with Nuget (selecting the correct default project in the Package Manager Console).



                It merges the all DLLs marked "Copy Local" = true and produces a merged .EXE (alongside the standard output, most of which is now not necessary) which is also compressed. This can then be used standalone.



                The license is MIT as so you can modify/distribute as required.



                https://github.com/Fody/Costura/






                share|improve this answer


























                  3












                  3








                  3







                  If you have WPF dependencies your options may be more limited..... ILMerge doesn't appear to deal with these. Costura.Fody (as mentioned by Codefox above) worked perfectly for us however and took about 5 minutes to get going... a very good experience.



                  Install with Nuget (selecting the correct default project in the Package Manager Console).



                  It merges the all DLLs marked "Copy Local" = true and produces a merged .EXE (alongside the standard output, most of which is now not necessary) which is also compressed. This can then be used standalone.



                  The license is MIT as so you can modify/distribute as required.



                  https://github.com/Fody/Costura/






                  share|improve this answer













                  If you have WPF dependencies your options may be more limited..... ILMerge doesn't appear to deal with these. Costura.Fody (as mentioned by Codefox above) worked perfectly for us however and took about 5 minutes to get going... a very good experience.



                  Install with Nuget (selecting the correct default project in the Package Manager Console).



                  It merges the all DLLs marked "Copy Local" = true and produces a merged .EXE (alongside the standard output, most of which is now not necessary) which is also compressed. This can then be used standalone.



                  The license is MIT as so you can modify/distribute as required.



                  https://github.com/Fody/Costura/







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 13 '16 at 14:21









                  rexallrexall

                  714




                  714























                      2














                      Checkout the ServiceStack.Gap project which shows several examples of howto ILMerge ServiceStack into a single cross-platform .exe.



                      ServiceStack also includes a number of other features that's particularly well suited for these creating embedded apps where it:




                      • Allows your services to be self-hosted using .NET's HTTP Listener

                      • Supports pre-compiled Razor Views

                      • Supports Embedded Resources

                      • Supports an embedded database in Sqlite and OrmLite

                      • Can be ILMerged into a single .exe






                      share|improve this answer




























                        2














                        Checkout the ServiceStack.Gap project which shows several examples of howto ILMerge ServiceStack into a single cross-platform .exe.



                        ServiceStack also includes a number of other features that's particularly well suited for these creating embedded apps where it:




                        • Allows your services to be self-hosted using .NET's HTTP Listener

                        • Supports pre-compiled Razor Views

                        • Supports Embedded Resources

                        • Supports an embedded database in Sqlite and OrmLite

                        • Can be ILMerged into a single .exe






                        share|improve this answer


























                          2












                          2








                          2







                          Checkout the ServiceStack.Gap project which shows several examples of howto ILMerge ServiceStack into a single cross-platform .exe.



                          ServiceStack also includes a number of other features that's particularly well suited for these creating embedded apps where it:




                          • Allows your services to be self-hosted using .NET's HTTP Listener

                          • Supports pre-compiled Razor Views

                          • Supports Embedded Resources

                          • Supports an embedded database in Sqlite and OrmLite

                          • Can be ILMerged into a single .exe






                          share|improve this answer













                          Checkout the ServiceStack.Gap project which shows several examples of howto ILMerge ServiceStack into a single cross-platform .exe.



                          ServiceStack also includes a number of other features that's particularly well suited for these creating embedded apps where it:




                          • Allows your services to be self-hosted using .NET's HTTP Listener

                          • Supports pre-compiled Razor Views

                          • Supports Embedded Resources

                          • Supports an embedded database in Sqlite and OrmLite

                          • Can be ILMerged into a single .exe







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jun 26 '15 at 13:12









                          mythzmythz

                          119k14196339




                          119k14196339






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f8077570%2fhow-to-merge-multiple-assemblies-into-one%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                              ComboBox Display Member on multiple fields

                              Is it possible to collect Nectar points via Trainline?