如何在C#程序集中嵌入大型可执行文件? [英] How to embed a large executable file in C# assembly?
本文介绍了如何在C#程序集中嵌入大型可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有.msu文件,文件大小约为1GB。我想把它嵌入c#assembly作为嵌入式资源。我可以这样做吗?是否嵌入了具有任何限制大小的资源?请给我一些建议。谢谢提前
我尝试过:
当我尝试它时显示没有足够的内存来执行此操作。但是如果我添加30-40MB的文件我可以构建它。
I have .msu file which file size is around 1GB.I wanted to embed this into c# assembly as Embedded resource.how could i do this? does embedding resource having any limit size to embed? kindly give me some suggesstions.Thanks in advance
What I have tried:
When I tried it shows not enough memory to perform this operation.But if I add file which has 30-40MB I can able to build it.
推荐答案
理论上没有限制,但实际上在内存中完成了资源的打包,所以你可以用这么大的文件轻松打破VS ...
无论如何不建议嵌入这样一个文件(大小和类型)...如果你想获得任何安全性 - 忘记它...资源可以从汇编中轻松提取...拉链可能更好,用密码保护存档并添加该部署的文件......
In theory there is no limit, but in practice the packaging of the resources done in-memory, so you can easily break VS with such a large file...
In any case it is not advised to embed such a file (size and type)... If you think to gain any security - forget it... resources can be extracted easily from assembly... It may be better to zip it, protect the archive with password and add that file to your deployment...
这篇关于如何在C#程序集中嵌入大型可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文