简体   繁体   中英

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. This dropdown is missing in the properties of a Windows Phone 7+8 project.

Edit : I can change the .Net framework version via the dropdown in the following dialog when creating a new project:

新建项目对话框

Or is this setting completely irrelevant for the creation of the Windows Phone project?

WPF is a presentation layer on top of the .NET CLR and has been around since .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. Thus you have a project property to change the .NET version.

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. There is no 'I want WP 7 together with .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).

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.

.NET Framework

Available since 3.0

Silverlight

Available since 2.0

Windows Phone Silverlight

Available since 7.0

Source: MSDN

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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