Article ID: 2254240 - Last Review: June 30, 2010 - Revision: 1.0

.NET Compact Framework Assembly Redirection Fails

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

Symptoms

The .NET Compact Framework is ignoring the bindingRedirect requirement that has been specified in the .exe.config policy file or the device.config policy file. This causes it to fail to redirect a referenced assemble version to later version and causes an exception to be thrown (MissingMethod exception) on start up.
 
This has been observed when upgrading to Microsoft SQL Server Compact 3.5 SP1 since it changed the version for 3.5.0 (RTM) to 3.5.1.

Cause

The .NET Compact Framework start up code uses XQL to read the XML in the config policy file. If the Windows CE image that it is running on has been built without SYSGEN_MSXML_XQL then the selectNodes method in the XML COM object will return E_NOTIMPL. At this point the .NET Compact Framework start up code will give up reading the policy file and revert to processing as if it was not provided.
 
This issue was observed on the Windows CE 5 platform but the same issue is likely to occur on other Windows CE releases.

Resolution

Rebuild the Windows CE platform to include SYSGEN_MSXML_XQL.

More Information

During the installation of SQL Server Compact 3.5 SP1 it creates a device.config file in the \Windows directory of the device. It was observed that on devices that lacked the XQL component this file will contain no data.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.

APPLIES TO
  • Microsoft Windows CE Platform Builder 5.0
  • Microsoft Windows CE 5.0
  • Windows Embedded CE 6.0
  • Windows Embedded CE 6.0 R2
  • Windows Embedded CE 6.0 R3
  • Microsoft SQL Server Compact 3.5
Keywords: 
KB2254240