图书馆对C#.NET创建静态链接 [英] Static Linking of libraries created on C# .NET
问题描述
我用VS2008 C#.net。
I'm using VS2008 C#.NET.
我在3个项目在3个不同的类别库。我写了使用这些库(DLL)的应用程序。
I created 3 different classes of libraries in 3 projects. I wrote an application which uses these libraries (dlls).
正在发生的事情是每一个项目编译成一个类库。所以,我有3 dll和exe文件1
What is happening is each project is compiling into a class library. So, I've 3 dlls and 1 exe.
相反,我想在两个方面有这些:
Instead I want to have these in two ways:
- 只有类库组件(DLL),其中包含3人及1 exe文件。
- 只有一个EXE文件(里面的所有东西)::静态链接。
我怎么能这样做呢?我找不到在VS2008的静态链接的任何选项也请注明命令行选项了。
How could I do that? I cannot find any options for static linking in VS2008 also please mention commandline options too.
推荐答案
ILMerge 是你追求的是什么。
我不知道我真的称之为静态链接 - 它只是合并几个组件为一体。 (特别是,请不要在IM pression,这是建立一个本地,非托管的可执行文件。)但是,我认为这就是你以后:)
I'm not sure I'd really call this "static linking" - it's just merging several assemblies into one. (In particular, please don't get the impression that this is building a native, unmanaged executable.) However, I think it's what you're after :)
这篇关于图书馆对C#.NET创建静态链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!