Is there a .Net 4 or 3.5 redistributable that is not in installer form? A DLL placed in the programs folder?

老子叫甜甜 提交于 2019-12-11 05:02:57

问题


I'm working on a program in Visual C# 2010 for a friends company and it does not have any .NET installed. I know you can download .NET 3.5 or 4 from Microsofts site, but the accounts that the program will run on will not be able to install anything. Is there a DLL I can download and then place in the programs folder to make it work? Or any other alternative that does not include installing things or downloading things.

Edit: Disregard the 5mb limit: I had mean that if I have to download any program on the computer the program will be executed on, it should be below 5mb. The final application can be double or triple the original programs size.

Thanks,


Varmitharen


回答1:


Let me answer this directly so that you don't waste neither your time nor your friends: No there isn't other way other than properly installing .NET (or rewriting your application with unmanaged C++ code which is unlikely something you are willing to do). Not to mention that most Windows PC should already have at least .NET 3.5 installed through Windows Update.

The .NET 4.0 Client Profile is 41MB and that's the minimum you get away with.




回答2:


While there are some options for running .NET applications without installing the framework properly (e.g. VMware ThinApp), I very much doubt that you'll find anything that fits in 5MB...

Heck, just mscorlib from .NET 4 is 5MB, then System.dll is nearly 3.5MB.




回答3:


If your application can run on top of Mono, you can try using mkbundle, normally the resulting exe file is relatively compact.




回答4:


Xenocode (now called Spoon Studio, I believe) allows you to deploy a single executable without previously installing the Framework.

It uses some kind of virtualization to achieve this. I don't believe it would fit in just 5 megs - but I might be wrong.




回答5:


If the framework has not been installed, there will be no interpreter/jitter and .NET programs will not run.

You need to install the framework in order for .NET software to run.



来源:https://stackoverflow.com/questions/4784680/is-there-a-net-4-or-3-5-redistributable-that-is-not-in-installer-form-a-dll-pl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!