简体   繁体   English

如何在Windows Phone项目中更改.net版本?

[英]How do I change the .net version in a Windows Phone project?

In a WPF project I go to the properties of the project and am able to change the .Net version used via the dropdown. 在WPF项目中,我转到项目的属性,并能够通过下拉菜单更改使用的.Net版本。 This dropdown is missing in the properties of a Windows Phone 7+8 project. Windows Phone 7 + 8项目的属性中缺少此下拉列表。

Edit : I can change the .Net framework version via the dropdown in the following dialog when creating a new project: 编辑 :创建新项目时,可以通过以下对话框中的下拉菜单更改.Net框架版本:

新建项目对话框

Or is this setting completely irrelevant for the creation of the Windows Phone project? 还是此设置与Windows Phone项目的创建完全无关?

WPF is a presentation layer on top of the .NET CLR and has been around since .NET 3.0. WPF是.NET CLR之上的表示层,自.NET 3.0开始就存在。 If you want to use it with 3.0, 3.5, 4.5, ... it's still called WPF and in the latest Visual Studio releases it's still one single project template to target all these. 如果您想将其与3.0、3.5、4.5等一起使用,它仍称为WPF,在最新的Visual Studio版本中,它仍然是针对所有这些的单个项目模板。 Thus you have a project property to change the .NET version. 因此,您具有一个项目属性来更改.NET版本。

Windows Phone 7 or Windows Phone 8 (and 8.1 Silverlight) is each a complete set of a single .NET version (subset, not even the full .NET stack), SDK, ... specific for that version. Windows Phone 7或Windows Phone 8(和8.1 Silverlight)每个都是单个.NET版本(子集,甚至不是完整的.NET堆栈),SDK的完整集合,...特定于该版本。 There is no 'I want WP 7 together with .NET 4.6'. 没有“我想要WP 7与.NET 4.6一起使用”。 The only thing you can do to change framework, is change between an 8 and 8.1 Silverlight app (which will give you a larger subset of the .NET Framework). 更改框架唯一可以做的就是在8和8.1 Silverlight应用程序之间进行更改(这将为您提供.NET Framework的更大子集)。

If we have a look at System.Windows.Application , you see that they clearly state Windows Phone Silverlight as a different framework and not part of .NET. 如果我们看一下System.Windows.Application ,您会发现它们清楚地将Windows Phone Silverlight声明为不同的框架,而不是.NET的一部分。

.NET Framework .NET Framework

Available since 3.0 从3.0开始可用

Silverlight Silverlight的

Available since 2.0 从2.0开始可用

Windows Phone Silverlight Windows Phone Silverlight

Available since 7.0 自7.0起可用

Source: MSDN 资料来源: MSDN

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

相关问题 如何在项目中更改.NET框架版本? - How do I change the .NET framework version on a project? 如何找到现有项目中使用的.NET版本? - How do I find the .NET version used in an existing project? 如何在Xamarin中为MonoMac exe更改.NET版本? - How do I change .NET version in Xamarin for a MonoMac exe? 如何更改.net项目中默认.config文件的名称 - How do I change the name of a default .config file in a .net project 如何将.Net Framework从版本3.5更改为版本4.0 - How do I change the .Net Framework from version 3.5 to version 4.0 如何使用.Net阅读公共Twitter提要(在Windows Phone上) - How do I read a public twitter feed using .Net (on Windows Phone) 如何在Windows资源管理器中使用.NET或Windows API更改特定文件夹中的View列? (Windows 7及更高版本) - How do I use .NET or the Windows API to change the View columns in a particular folder in Windows Explorer? (Windows 7 and Up) 我如何知道正在使用哪个版本的.net,以及如何更改它? - How do I tell what version of .net i am compiling with, and how would I change it? 我怎么知道一个项目是哪个版本的asp.net mvc? - How do I know which version of asp.net mvc one project is? 如何在 Visual Studio 2019 中创建 .NET framework 4.6 版本的 XUnit 项目? - How do I create .NET framework 4.6 version of XUnit project in Visual Studio 2019?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM