开发者

C# Visual Studio solution in one dll [duplicate]

This question already has answers here: one DLL, multiple projects? (5 answers) 开发者_Python百科 Closed 9 years ago.

I have a Visual Studio solution, and this solution contains a few projects. Can I build all the projects from this solution into one dll?


You can use ILMerge to merge a number of assemblies into one.

There is also a fairly old mono project with similar capabilities - mono.merge.


use ILMerge

http://blogs.msdn.com/b/jomo_fisher/archive/2006/03/05/544144.aspx


Try using ILMerge http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx


No, viusal studio will not combine the source/output from multiple projects into a single dll/application. Your best bet to do this is to set the post-build step of each project to call a third part application (like ILMerge). Just make sure the build order is correct and that the multiple projects are not trying to launch. You also may be able to get away with making another project that statically links to the other dlls.


Since you are talking about projects, you can also compile them as .netmodule and put them in one assembly like this: http://msdn.microsoft.com/en-us/library/226t7yxe(VS.90).aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜