I'm debating what version of the .net framework开发者_Go百科 to target.
I need to build a small client utility, and I need it to run on as many machines as possible. Having to install any version of the .net framework is undesirable, although I realize in certain circumstances I can't avoid that.
If I target .NET 2.0, is it safe to assume it will run on machines that have .NET 3.0 (Vista) and .NET 3.5 (Windows 7) without installing anything?
I realize that with the XP machines, there will be some percentage that do not have any .NET installed, although this will be the vast minority.
I'm building with VS2010.
Working on the largest number of machines is the primary concern. I can live without LINQ or advanced WPF. I'm going to use WinForms and some Telerik controls.
Am I safe with .NET 2.0? Will that code just run on most user's machines?
If I target .NET 2.0, is it safe to assume it will run on machines that have .NET 3.0 (Vista) and .NET 3.5 (Windows 7) without installing anything?
Yes.
Longer answer:
.NET 3.0 and 3.5 use the same runtime that shipped with 2.0, so anything that targets the 2.0 runtime will run fine on all three.
精彩评论