简体   繁体   English

.NET Framework从v3.5迁移到v4.0

[英]NET Framework migration from v3.5 to v4.0

I have a visual studio 2008 solution and .NET Framework v3.5. 我有一个visual studio 2008解决方案和.NET Framework v3.5。 Recently I have converted into Visual Studio 2010 and .NET Framework v4.0. 最近我已经转换为Visual Studio 2010和.NET Framework v4.0。

To change to .NET Framework v4.0 I have done through project properties and build tab, by changing target to target Framework v4.0 for each project. 要更改为.NET Framework v4.0,我已完成项目属性和构建选项卡,方法是将目标更改为每个项目的目标Framework v4.0。 However if I open configuration project file csproj, I can see there is a tag related to v3.5: 但是,如果我打开配置项目文件csproj,我可以看到有一个与v3.5相关的标签:

 <ItemGroup>
   <Reference Include="System" />
   <Reference Include="System.Core">
    <RequiredTargetFramework>3.5</RequiredTargetFramework>
   </Reference>
   <Reference Include="System.Data" />
   <Reference Include="System.Drawing" />
   <Reference Include="System.Xml" />
   <Reference Include="WindowsBase">
    <RequiredTargetFramework>3.0</RequiredTargetFramework>
   </Reference>
 </ItemGroup>

I would like to know why for some included references is referring to v3.0, v3.5 frameworks if project targets to .NET Framework v4.0. 我想知道为什么一些包含的引用是指v3.0,v3.5框架,如果项目目标是.NET Framework v4.0。 This also happens for other projects despite project is targeting to NET framework v4.0. 尽管项目针对的是.NET framework v4.0,但其他项目也会出现这种情况。

System.Core is targeting to 3.5 WindowsBase is targeting to 3.0 System.Core的目标是3.5 WindowsBase的目标是3.0

Those references themselves require 3.5 (for System.Core) and 3.0 (for WindowsBase). 这些引用本身需要3.5(对于System.Core)和3.0(对于WindowsBase)。 Actually, this isn't 100% correct (see Ramhound's comment to this answer). 实际上,这不是100%正确(参见Ramhound对此答案的评论)。

So far, any .NET framework above 2.0 is essentially DLLs that site on top of 2.0. 到目前为止,任何高于2.0的.NET框架本质上都是位于2.0之上的DLL。 For example, a few years and one job ago, I needed LINQ and Hashset<T> in .NET 2.0, since half my users were stuck on Win2K, which doesn't support anything above .NET 2.0. 例如,在几年和一个工作之前,我需要.NET 2.0中的LINQ和Hashset <T>,因为我的一半用户被卡在Win2K上,Win2K不支持.NET 2.0以上的任何东西。 I wound up recompiling System.Core from Mono and had it target 2.0, and was able to use newer features. 我结束了从Mono重新编译System.Core并将其定位到2.0,并且能够使用更新的功能。

I don't think it's anything you need to worry about. 我不认为这是你需要担心的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Windows 8中处理.Net Framework版本V4.0和V3.5 - How to deal with .Net framework versions V4.0 vs V3.5 in Windows 8 将目标框架从v4.0更改为v3.5后,找不到命名空间 - Namespace cannot be found after changing target framework from v4.0 to v3.5 从源文件编译程序时,如何将目标框架设置为v2.0或v3.5而不是4.0? - How to set the target framework to v2.0 or v3.5 instead of 4.0 when compiling a program from a source file? 调试时,托管旧版(v3.5,v3.0,v2.0)和托管旧版(v4.5,v4.0)的默认设置在哪里? - Where is the default setting for Managed Legacy (v3.5, v3.0, v2.0) vs Managed Legacy (v4.5, v4.0) when debugging? 如何使用.Net框架v3.5调用异步任务 - How to call async Task using the .Net framework v3.5 MSBuild TargetFrameworkVersion = v4.5.1目标.Net Framework v4.0 - MSBuild TargetFrameworkVersion = v4.5.1 targets .Net Framework v4.0 IIS7:为什么我不能选择v3.5 .net Framework? - IIS7: Why can't i Choose v3.5 .net Framework? 如何在没有.NET v4.0的目标环境上部署.NET v4.0应用程序? - How can I deploy .NET v4.0 application on target environment without .NET v4.0? 无法在多个项目上更改目标框架从v4.0到V4.5或4.5.1 - Cannot change Target Framework on Several Projects From v4.0 to V4.5 or 4.5.1 Visual Studio 2010无法再构建.NET v3.5 - Visual Studio 2010 Can no longer build .NET v3.5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM