本文转自;https://msdn.microsoft.com/en-us/library/hh264221.aspx


A project can be built to run on a target framework, which is a particular version of the .NET Framework, and a target platform, which is a particular software architecture.  For example, you can target an application to run on the .NET Framework 2.0 on a 32-bit platform that is compatible with the 802x86 processor family (“x86”). The combination of target framework and target platform is known as the target context.

A target framework is the particular version of the .NET Framework that your project is built to run on. Specification of a target framework is required because it enables compiler features and assembly references that are exclusive to that version of the framework.

Currently, the following versions of the .NET Framework are available for use:

  • The .NET Framework 2.0 (included in Visual Studio 2005)

  • The .NET Framework 3.0 (included in Windows Vista)

  • The .NET Framework 3.5 (included in Visual Studio 2008)

  • The .NET Framework 4 (included in Visual Studio 2010)

  • The .NET Framework 4.5 (included in Visual Studio 2012)

  • The .NET Framework 4.5.1 (included in Visual Studio 2013)

  • The .NET Framework 4.5.2

  • The .NET Framework 4.6 (included in Visual Studio 2015)

The versions of the .NET Framework differ from one another in the list of assemblies that each makes available to reference. For example, you cannot build Windows Presentation Foundation (WPF) applications unless your project targets the .NET Framework version 3.0 or above.

The target framework is specified in the TargetFrameworkVersion property in the project file. You can change the target framework for a project by using the project property pages in the Visual Studio integrated development environment (IDE). For more information, see How to: Target a Version of the .NET Framework. The available values for TargetFrameworkVersion are v2.0, v3.0, v3.5, v4.0, v4.5, v4.5.1, v4.5.2, and v4.6.

 
  1. <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

A target profile is a subset of a target framework. For example, the .NET Framework 4 Client profile does not include references to the MSBuild assemblies.

The target profile is specified in the TargetFrameworkProfile property in a project file. You can change the target profile by using the target-framework control in the project property pages in the IDE. For more information, see How to: Target a Version of the .NET Framework.

 
  1. <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  2. <TargetFrameworkProfile>Client</TargetFrameworkProfile>

A platform is combination of hardware and software that defines a particular runtime environment. For example,

  • x86 designates a 32-bit Windows operating system that is running on an Intel 80x86 processor or its equivalent.

  • Xbox designates the Microsoft Xbox 360 platform.

A target platform is the particular platform that your project is built to run on. The target platform is specified in the Platform build property in a project file. You can change the target platform by using the project property pages or the Configuration Manager in the IDE.

 
  1. <PropertyGroup>
  2. <Platform>x86</Platform>
  3. </PropertyGroup>

A target configuration is a subset of a target platform. For example, the x86``Debug configuration does not include most code optimizations. The target configuration is specified in the Configuration build property in a project file. You can change the target configuration by using the project property pages or the Configuration Manager.

 
  1. <PropertyGroup>
  2. <Platform>x86</Platform>
  3. <Configuration>Debug</Configuration>
  4. <PropertyGroup>
  5.  

http://stackoverflow.com/questions/328017/path-to-msbuild

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5

[转]MSBuild Target Framework and Target Platform的更多相关文章

  1. ASP.NET 5 Target framework dnx451 and dnxcore50

    中文不知如何定义标题,所以干脆就直接贴出关键字,在 ASP.NET 5 项目的 project.json 配置文件中,会有这样的定义: "frameworks": { " ...

  2. 什么是目标框架别名(What are the Target Framework Monikers (TFMs))?

    我们现在的.NET Core 1.0应用(ASP.NET Core 1.0应用或控制台应用)有了新的被运行在不同框架上的可能性:①运行在.NET Core平台上 ②运行在传统的.NET Framewo ...

  3. ASP.NTE 5 Target framework dnx451 and dnxcore50(转)原文:http://www.cnblogs.com/xishuai/p/aspnet5-target-framework-dnx451-and-dnxcore50.html

    中文不知如何定义标题,所以干脆就直接贴出关键字,在 ASP.NTE 5 项目的 project.json 配置文件中,会有这样的定义: "frameworks": { " ...

  4. 每次都要重新编译?太慢!让跨平台的 MSBuild/dotnet build 的 Target 支持差量编译

    如果你干预到了项目的编译过程,可能就需要考虑到差量编译了.不然--当你的项目大起来的时候,就会感受到每次都重新编译时,每次重复调试的过程都要进行漫长等待时的绝望和无奈. 如果你正遭遇差量编译失效,每次 ...

  5. .NET 5 中 Target Framework 详解

    作者:.NET Team 翻译:精致码农-王亮 原文:http://dwz.win/Q4v 我们希望极大地简化开发人员必须在项目文件和 NuGet 包中使用的TFM (Target Framework ...

  6. Vs2013 坑爹的Target framework问题

    之前的一个项目是使用Vs2008来开发的,因为这段时间家里有事情所以只能跟经理协商在家里来做此项目,因为家里的VS是2013的所以在迁移时没有什么问题 但今天我更改一个类库的文件后重新生成解决方案结果 ...

  7. target=_parent与target=_top的区别与用途

    转自:http://www.taoshaw.com/taoshaw/article.asp?id=1868 在手动改HTML代码时经常会用到target参数,常用的有两个target=_blank 和 ...

  8. HTML:target=_blank、target=_top、target=_parent、target=_self 的区别

    HTML:target=_blank.target=_top.target=_parent.target=_self 的区别 _blank 在新窗口中打开链接_parent 在父窗体中打开链接_sel ...

  9. 细说VS MSBuild 和 Framework 的区别

    如今已经是 VS2017 横行的时代,而据我所知,大部分人还停留在使用 VS2015 VS2013 或更低的版本,主要是因为他们参与的项目基本使用这几个VS的版本开发的.眼红VS2017却不敢升级,主 ...

随机推荐

  1. IdentityServer4与ocelot实现认证与客户端统一入口

    关于IdentityServer4与ocelot博客园里已经有很多介绍我这里就不再重复了. ocelot与IdentityServer4组合认证博客园里也有很多,但大多使用ocelot内置的认证,而且 ...

  2. 基于GOJS绘制流程图

    基于GOJS封装的流程图设计(展示)工具类,主要分为两个工具类: 工具库依赖于go.js.jquery以及layer.js http://gojs.net/ http://jquery.com/ ht ...

  3. [HNOI2004]宠物收养所

    题目链接:戳我 其实也就是一个splay而已了. 但是一定要注意这种需要计算的,刚开始insert的时候插入极大值极小值的时候不要让它爆掉int.......(比如我刚开始就写了一个214748364 ...

  4. jquery展开收缩列表

    <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8& ...

  5. 洛谷P2495 [SDOI2011]消耗战(虚树)

    题面 传送门 题解 为啥一直莫名其妙\(90\)分啊--重构了一下代码才\(A\)掉-- 先考虑直接\(dp\)怎么做 树形\(dp\)的时候,记一下断开某个节点的最小值,就是从根节点到它的路径上最短 ...

  6. [ActionScript 3.0] 运用Color类interpolateColor静态方法绘制渐变色

    以下类可直接作为文档类测试,效果如图: package { import fl.motion.Color; import flash.display.GradientType; import flas ...

  7. Ionic无法通过npm安装解决方案

    http://www.jianshu.com/p/5a99334eb62d 一般从 node.js官网下载安装完之后,npm也会同时安装完. 如果通过 $ npm install -g cordova ...

  8. 安装php,nginx 带debug

    gdb安装包   在CentOS6.4下使用gdb进行调试的时候, 使用bt(breaktrace)命令时,会弹出如下的提示: 头一天提示: Missing separate debuginfos, ...

  9. 使用bootstrap-table等自动使用ajax地址载入数据的插件的数据设计建议

    提出问题: bootstrap-table 可以根据ajax地址load的json数据.这个json数据一般就是数据库中查询的结果,而数据库中存放的数据一般不是用户友好的,比如数据表示一般使用简洁id ...

  10. 2016级算法第一次练习赛-F.AlvinZH的儿时梦想——机器人篇

    864 AlvinZH的儿时梦想----机器人篇 题目链接:https://buaacoding.cn/problem/868/index 思路 中等题. 判断无限玩耍: \(p\) 的值能够承担的起 ...