问题
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