开发者

WPF - Static Linking of DLLs

开发者 https://www.devze.com 2022-12-14 19:30 出处:网络
I have a WPF app that I want to send to others so they can use it.I have several 3rd party dlls that it uses.

I have a WPF app that I want to send to others so they can use it. I have several 3rd party dlls that it uses.

For ease of installation I would like to have one exe that just runs. Is there a way with WPF apps (and C#.NET in general) t开发者_C百科o say "Link in the DLL files"? (I am using visual Studio 2008 SP1.)


There are a number of third-party static linkers for .NET that will produce a single executable. Search for ".NET Static Linker" in your favorite search engine. Most of them also obfuscate your code as an added benefit to make it harder to reverse engineer back to readable source code.

I have not tried any of them so don't have a specific recommendation.

There's also an article on Code Project that talks about how to achieve the same goal yourself using framework tools.


You can't do directly in Visual Studio. However, there is a tool on Microsoft Research called ILMerge that will what you want (assuming that the dlls you want to link in are .Net assemblies).

0

精彩评论

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