"目标框架"在Visual Studio中 [英] "Target Framework" in Visual Studio

查看:140
本文介绍了"目标框架"在Visual Studio中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在面向.NET 3.5框架在Visual Studio中实际上会发生什么?这是什么实际上做?它是否有点标志的任何输出文件,并将它们与框架版本进行关联?

What actually happens when you target the .NET 3.5 framework in Visual Studio? What does that actually do? Does it somehow "flag" any of the output files and associate them with the framework version?

推荐答案

它设置的.csproj文件的属性:

It sets an attribute in the .csproj file:

<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>

和更新任何引用到的命名空间,如果他们需要新的版本:

and updates any references to namespaces if they require the newer version:

<Reference Include="System.Core">
  <RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>

这告诉编译器的命名空间的版本,因此dll的需要来链接。

This tells the compiler which version of the namespace and hence dll it needs to link against.

这篇关于&QUOT;目标框架&QUOT;在Visual Studio中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆