Targeting .NET Framework 3.5, Using .NET 2.0 Runtime. Caveats?

后端 未结 5 795
情深已故
情深已故 2020-12-19 13:19

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 fa

相关标签:
5条回答
  • 2020-12-19 13:34

    If you're referencing 3.5 specific libaries such as System.Core or System.Xml.Linq then you'll need to ship 3.5.

    0 讨论(0)
  • 2020-12-19 13:39

    If it's a client app that doesn't use asp.net etc you may be able to use the .Net Client Profile install which is much smaller (c. 26MB) - further details at:

    http://blogs.msdn.com/bclteam/archive/2008/05/21/net-framework-client-profile-justin-van-patten.aspx

    http://www.hanselman.com/blog/SmallestDotNetOnTheSizeOfTheNETFramework.aspx

    0 讨论(0)
  • 2020-12-19 13:45

    there is some différence in the generated code part of datasets between 3.5 SP1 and 3.5 (no sp), something about serialization. you may have trouble with this if you upgrade your installation to 3.5SP1, even in the core functionalities.

    0 讨论(0)
  • 2020-12-19 13:54

    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.

    0 讨论(0)
  • 2020-12-19 13:54

    .NET 3.5 is not literary 100% compatible with .NET 2.0, but with .NET 2.0 SP1.

    But I don't know if that will give you any problems. The .NET 2.0 SP1 update is said to be made to make Extension Methods and maybe Automatic Properties available (don't remember specifics).

    Scott Hanselman has a good blog post on this.

    As for the size of the .NET 3.5 deployable file is that it's .NET 2.0, 3.0 and 3.5 for x86, x64 and the other 64-bit architecture in one big file.

    0 讨论(0)
提交回复
热议问题