针对.NET框架3.5,使用.NET 2.0运行时。注意事项?框架、注意事项、NET

2023-09-03 01:01:51 作者:醉酒劍舞

我开发了瞄准的是.NET 3.5框架的应用程序。该应用程序的安装程序安装.NET 2.0 在目标机器上运行。到目前为止,我还没有与这样的任何问题,但我不知道是什么问题,我马上要开了线。难道我的需要的是安装在 3.5 运行?

I'm developing an application that is targeting the .NET 3.5 Framework. The application's setup installs the .NET 2.0 runtime on the target machine. So far I haven't had any issues with doing this, but I'm wondering what problems I'm going to have down the line. Do I need to be installing the 3.5 runtime?

我要封装的.NET运行时安装到我们的安装(无网络安装)。运行安装程序的大小是问题。在.NET 2.0运行时安装程序是23MBs(管理)的.NET 3.0运行安装程序50MBs(越来越大)和.NET 3.5运行时安装程序是200MBs(亚克西!)。到底是什么在那些额外的170MBs?

I must package the .NET runtime installer into our installation (no network install). The size of the runtime installer is the issue. The .NET 2.0 runtime installer is 23MBs (manageable), the .NET 3.0 runtime installer is 50MBs (getting big) and the .NET 3.5 runtime installer is 200MBs (yikes!). What the heck is in those extra 170MBs?

推荐答案

这是一个很难回答的问题,因为最终这取决于你使用的是什么样的.NET 3.5功能。如果您使用的是一些新的库,如LINQ的,那么,你就需要安装3.5运行时。但是,如果你只是使用一些在3.5中引入的新syntatic糖,你可能不会。这样做的理由是,.NET 3.5与2.0的CLR 100%兼容。

This is a tough question to answer, because ultimately it depends on what .NET 3.5 features you are using. If you are using some of the new libraries, such as LINQ, then yes, you'll need to install the 3.5 runtimes. However, if you are just using some of the new syntatic sugars introduced in 3.5, you may not. The reason for this is that .NET 3.5 is 100% compatible with the 2.0 CLR.