次の方法で共有


.NET Compact Framework (Compact 2013)

3/26/2014

The Microsoft .NET Compact Framework is a program execution environment for apps that are designed for resource-constrained computing devices. The .NET Compact Framework 3.9 is intended for embedded devices that run the Windows Embedded Compact 2013 operating system and is hardware-independent. The .NET Compact Framework 3.9 provides a familiar and rich development platform for embedded app development, with a small footprint and an extensive set of .NET Framework functionality. This version of the .NET Compact Framework 3.9 is based on the .NET Compact Framework 3.5, which shipped with Windows Embedded Compact 7, and enhances that earlier version with new features and bug fixes. In addition, you can develop apps that target the .NET Compact Framework 3.9 fromVisual Studio.This document lists the new features in the .NET Compact Framework 3.9, the issues you need to be aware of when using Visual Studio to develop apps for the .NET Compact Framework 3.9, and breaking changes.

New features

Here's what's new in the .NET Compact Framework 3.9

  • Generational garbage collection to improve app responsiveness. For more information about generational garbage collection, see the Generations section of Fundamentals of Garbage Collection in the MSDN Library.
  • Ability to fully leverage multicore hardware.
  • Sharing Server feature that reduces the memory working set and improves app launch time.
  • Visual Studio development support.

Networking Support

The .NET Compact Framework 3.9 includes support for Windows Communication Foundation (WCF). WCF provides an application model and class library that you can use to build service-oriented applications that interoperate with both client and service applications that run on remote devices or servers. For more information, see Windows Communication Foundation (WCF) Development and the .NET Compact Framework.

Visual Studio support

An SDK generated from a Windows Embedded Compact 2013 operating system will contain the Visual Studio project templates you need to develop apps that target the .NET Compact Framework 3.9. Visual Studio support enables you to build apps for Windows CE, the Windows Store, and Windows Phone within the same development environment. However, because of the multitargeting capabilities of Visual Studio, some aspects of a .NET Compact Framework 3.9 app may appear to be supported but won't compile with the Visual Studio compilers. The following features are not supported when developing .NET Compact Framework 3.9 apps with C# or Visual Basic:

  • Asynchronous programming with the Async and Await keywords.
  • Use of the dynamic keyword, when developing with C#.
  • Covariance and contravariance in generic interfaces and delegates.

In addition, the following feature is not supported when you develop apps with Visual Basic:

  • Type equivalence and embedded interop types.

For more information, see Get started developing for Windows Embedded Compact in Visual Studio.

Breaking changes

The .NET Compact Framework 3.5 and 3.9 are source-compatible, which means that you can reuse your version 3.5 source code to target version 3.9, but the code will require recompilation. Because the .NET Compact Framework 3.9 has been updated and improved, there are a few breaking changes you should be aware of:

Feature

Change in 3.9

Workaround/Comment

XmlConvert.ToDateTime method

ToDateTime now respects the DateTime.Kind setting instead of always returning DateTimeKind.Local.

If you have code that converts a local time back to UTC time, you will have to remove it to target version 3.9.

Denormal floating-point and double number values

On ARM systems, the value of a denormal number equals zero. In addition, the Double.Epsilon constant is too small to be detected, so it equates to zero.

You can define an alternative epsilon value that equals 2.2250738585072014E-308.

Type.TypeHandle property

Getting the TypeHandle returns the RuntimeTypeHandle for the type. In previous versions of the .NET Compact Framework, using this property would raise a NotSupportedException exception.

This property is now supported; no workaround is required.

SQLCE support

SQL Server Compact Edition is not supported in the .NET Compact Framework.

SQLite is a recommended alternative For more information, see SQLite.

XmlSchemaSet.Remove

After calling Remove, the Count property is updated immediately. In version 3.5, Count was not updated until after the Compile method was called.

Modify your code to expect an immediate update to the Count property.

For more information on changing the runtime version of your apps to target the .NET Compact Framework 3.9, see How to: Configure Runtime Version.

See Also

Concepts

Get started developing for Windows Embedded Compact in Visual Studio
Roadmap of .NET Compact Framework Documentation

Other Resources

Application Development