Ways to deploying console applications in C#

前端 未结 5 1474
感动是毒
感动是毒 2020-12-04 12:20

I have a relatively complex console application which relies on several dlls. I would like to \"ship\" this in the best form. My preferred way would be an exe file with all

5条回答
  •  时光说笑
    2020-12-04 13:01

    If you just copy the Foo.exe, dlls and Foo.exe.config files, it's likely to be okay. Have a look at what else is in the debug folder though - you (probably) don't want to ship the .pdb files, or Foo.vshost.exe. Is there anything else? If you've got any items marked as Content which are copied to the output folder, you'll need those too.

    You could use ilmerge to put all the dependencies into one exe file, but I'm somewhat leery of that approach - I'd stick with exe + dependency dlls.

提交回复
热议问题