"Mixed mode assembly is built against version v2.0.50727" error when compiling a Microsoft Dynamics SL SDK application

This article provides a solution to an error that occurs when you compile a Microsoft Dynamics SL Software Development Kit (SDK) application in Microsoft Visual Studio 2010.

Applies to:   Microsoft Dynamics SL
Original KB number:   2685048

Symptoms

When you compile a Microsoft Dynamics SL Software Development Kit (SDK) application in Microsoft Visual Studio 2010, you receive the following error:

Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

Cause

Microsoft Dynamics SL Software Development Kit (SDK) applications should target .NET Framework 3.5

Resolution

In Microsoft Visual Studio, set the advanced compile options to target .NET Framework 3.5. To do it, follow these steps:

  1. Open the project in Microsoft Visual Studio.
  2. From the Project menu, select Properties.
  3. On the Compile tab, select Advanced Compile Options....
  4. On the Target framework (all configurations): combo-box, select .NET Framework 3.5.