简体   繁体   English

.net 4.6框架是在适当的升级,然后.net框架4.5如何在vs2015中运行?

[英].net 4.6 framework is inplace upgrade then how is the .net framework 4.5 works in vs2015?

.net 4.6 framework is inplace upgrade then how is the .net framework 4.5 works in vs2015? .net 4.6框架是在适当的升级,然后.net框架4.5如何在vs2015中运行? I see only one folder v4.0.30319 . 我只看到一个文件夹v4.0.30319。 How is the dll stored and where ? dll是如何存储的?

.NET Framework 4.5 was an in-place upgrade for 4.0. .NET Framework 4.5是4.0的就地升级。 4.5.1 was an in-place for 4.5. 4.5.1是4.5的就地。 4.5.2 was an in-place for 4.5.1. 4.5.2是4.5.1的原位。 4.6 is also in place. 4.6也到位。

So it goes to reason that the 4.6 framework installs the v4.0.xxxxx directory. 因此,可以理解4.6框架安装了v4.0.xxxxx目录。

Now, Visual Studio 2015 supports .NET Framework 4.5 for targeting . 现在,Visual Studio 2015支持.NET Framework 4.5进行定位 When you create a project that targets the 4.5 Framework, it limits you to using features that are only available in that version of the framework. 当您创建面向4.5 Framework的项目时,它限制您使用仅在该版本的框架中可用的功能。 If you have .NET Framework 4.6 installed (and you will with Visual Studio 2015), and target 4.5, the code will still be execute using the 4.6 Framework. 如果您安装了.NET Framework 4.6(并且您将使用Visual Studio 2015)和目标4.5,则仍将使用4.6 Framework执行代码。

Update : Note that Reference Assemblies only contain metadata and NOT any code at all. 更新 :请注意, 参考装配体仅包含元数据,而不包含任何代码。 Thanks @vcsjones for pointing this out below! 感谢@vcsjones指出这一点!

You can find a "Reference Assemblies" folder on your system in which the exact binaries for each framework version are kept: 您可以在系统上找到“Reference Assemblies”文件夹,其中保留了每个框架版本的确切二进制文件

参考装配文件夹截图

Visual Studio then uses those depending on which version you are targeting. 然后,Visual Studio将根据您要定位的版本使用这些版本。 This is the System.dll reference from a project targeting .Net 4.5.1: 这是针对.Net 4.5.1的项目的System.dll引用:

VS汇编参考截图

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM