问题
Wondering if anyone knows how to see what parts of the .NET framework need to be installed to get cerftain functions working on older machines. Is there a way I can install them with my application without installing the entire .NET framework?
回答1:
You could use Mono, the open source implementation of the .NET framework. The Mono installer is smaller than the .NET installer. Also, Mono works with Windows versions older than XP.
With Mono you can use the Linker to bundle only a small subset of the .NET framework, the one you need, with your application.
The downside is that Mono doesn't implement the entire .NET framework, at the moment is only compatible with the version 2.0 and parts of the 3.0. Anyway, there is a tool called MoMa which tell you how compatible with Mono is your application.
回答2:
How old are these older machines? Looks like .NET 2.0 can be installed on Win98 machines, see the system requirements at http://msdn.microsoft.com/en-us/library/aa480241.aspx.
回答3:
Well, VMWare ThinApp (previously called Thinstall) may help you - but I've not used it myself, and I'd be somewhat wary of running .NET apps on anything other than a real .NET installation.
If you're only using part of the framework, you might be interested in the .NET 3.5 client profile which is at least somewhat smaller than the full framework - but of course, it may not contain everything you need...
回答4:
You can, with enough time and/or money, generate native code from C#. I've never had much need to investigate these deeply, but Xenocode and Salamander both can generate native code, and/or statically link framework assemblies to your code for running without the FX install.
I don't think I'd undertake this lightly, though...Any machine not capable of running at least Windows 98 isn't something I'd want to be writing managed code for.
回答5:
As far as I know this is not possible, you must have the .NET framework runtimes fully installed for them to work. Trying to piece it together just doesn't sound like a good idea at all anyway, in my opinion.
来源:https://stackoverflow.com/questions/335450/making-applications-programmed-in-net-languages-work-on-older-machines