Search code examples
c#.netc#-4.0.net-2.0c#-2.0

Can I use .NET 4.0 API calls on .NET 2.0?


If I make .NET 4.0 API calls and the customer only has .NET 2.0 installed, will my EXE work? I assume no -- absolutely not. But I want to reconfirm and point this out to my client yes/no.

Background... I'm from the Linux/PHP world. My client uses a Windows C# app on the frontend, and Linux/PHP on the backend. He's asked me to investigate this issue.


Solution

  • Application code targeted against the .NET 4.0 framework will not run in an environment that only has the .NET 2.0 framework installed.

    See "Version Compatibility" section here: http://msdn.microsoft.com/en-us/library/8477k21c.aspx