计算机教程

当前位置:3522.com > 计算机教程 > Beta 1 到 Beta 2 改变详细列表(英文)3522.com:

Beta 1 到 Beta 2 改变详细列表(英文)3522.com:

来源:http://www.4sports-uk.com 作者:3522.com 时间:2019-11-16 09:31

Beta 1 to Beta 2 Changes

Heres the first thing I would do if you are a developer of .NET

  1. BOOKMARK THIS PAGE!
    It will save you a ton of time as you migrate your apps. Then as you find a broken namespace in your app, or something else that no longer works in Beta2, click one of the links below and search the page (Ctrl-F for IE users) for your term. These documents are part of the downloads found at www.asp.net.

Here is the change list

API Changes (thanks to Alex Lowe from http://www.aspalliance.com/aldotnet/)

  • API changes broken down by Namespace

Compiler and Language Changes

  • C#   (size 83k)
  • Visual Basic.NET   (size 13k)
  • JScript.NET   (size 10k)
  • Managed Extensions for C   (size 39k)
  • SDK Tools Changes   (size 55k)

Framework Class Library Changes

  • ASP.NET   (size 274k)
  • ClassLib   (size 410k)
  • Net Classes   (size 35k)
  • Framework   (size 390k)
  • Common Language Runtime   (size 39k)
  • Interop   (size 45k)
  • JIT   (size 3k)
  • Metadata   (size 5k)
  • Miscellaneous   (size 41k)
  • Security   (size 92k)

If you have alot of bandwidth, you can view the whole list, but it is 1.6MEG.
CLICK HERE to view the list.

说明:这只是页面的连接开始页,进去后,不下100个页面的连接,实在太恐怖,无法完全转贴过来,更不是一个人可以翻译完成的。所以就只转贴这个连接。需要的可以自己根据连接去查找。

Why APIs Aren’t Portable

3522.com 1

Here are some of the reasons APIs aren’t available in portable libraries (taken from David Kean’s MSDN article on Creating a Continuous Client Using Portable Class Libraries):

The API Isn’t Implemented by All Platforms  Traditional .NET Framework file IOs, such as System.IO.File and System.IO.Directory, fall into this bucket. Silverlight and Windows Phone use the System.IO.IsolatedStorage APIs (though different from the .NET Framework version), whereas Windows Store apps use Windows.Storage.

The API Isn’t Compatible Across All Platforms  Some APIs look and feel the same, but it’s hard or impossible to write code against them in a portable and consistent way. ThreadStaticAttribute, which enables static fields to have a unique value for each thread, is an example. Though it’s present on both the Windows Phone and Xbox platforms, neither of their runtimes supports it.

The API Is Considered Obsolete or Legacy 
These APIs either contain behavior that’s unlikely to be present on future platforms, or they’ve been replaced by newer technologies. BackgroundWorker is an example of this; it was replaced by Task and the new asynchronous program features in Visual Studio 2012.

We Ran out of Time 
Most APIs weren’t written with portability in mind. We spend a significant amount of time going through each API to make sure it can be programmed against in a portable manner. This might involve tweaking or adding to the API to make it portable. Because of the time and effort involved, in the first version of PCLs we made available on Visual Studio Gallery, we prioritized the high-value, highly used APIs. System.Xml.Linq.dll and System.ComponentModel.DataAnnotations.dll are examples of APIs that weren’t available in that first version but are now available in the Visual Studio 2012 release.

Portable Class Library.aspx) is a .NET library that can be used (in binary form, without recompiling) on multiple .NET platforms.  When you create a Portable Class Library in Visual Studio, you can choose which platforms to target.  Portable libraries support targeting the .NET Framework, Silverlight, Windows Phone, Windows Store apps, and XBox 360 XNA games.

 

 
Portable Class Library creation dialog in Visual Studio 2012

I bet it’s not fun to keep all those projects in sync each time a file needs to be added, removed, or renamed.  There are only three logical libraries here (the core library, extras, and the tests).  Wouldn’t it be great to just have one portable version of each of those libraries instead of seven different ones?

Reusable Portable Libraries

MVVM Light Toolkit Project Structure

Trouble in Paradise

Unfortunately, it’s not that simple.  The fact that Portable Class Libraries need to run on multiple platforms imposes some constraints on what you can do in them.  Many .NET Framework APIs (such as File I/O or anything to do with the user interface) aren’t available.  Portable libraries can’t reference non-portable libraries.  You can’t use P/Invoke from most portable libraries.  This is all because portable libraries are supposed to actually run on different platforms, but it means it can be more complicated to write them, and can in some cases be very difficult (or not possible) to convert existing .NET libraries to portable libraries.

We’ve seen lots of people excited about portable libraries, but we’ve also seen some people who have run into these limitations questioning whether portable libraries are useful for them.  In this post, I’ll cover how you can use Portable Class Libraries even when you run into these limitations.  First, let’s look at the reasons some APIs aren’t supported, and what functionality actually is supported.

本文由3522.com发布于计算机教程,转载请注明出处:Beta 1 到 Beta 2 改变详细列表(英文)3522.com:

关键词: 3522.com

上一篇:linux下的C语言开发,linuxC语言开发

下一篇:没有了