Microsoft is posting code to its much-trumpeted CodePlex open-source projects site using licenses and conditions that go against the principles of open source.

The company has been posting projects under Microsoft licenses that stop you from running CodePlex projects on non-Windows platforms or restrict access to code.

The practice has surfaced as it emerged Microsoft changed the license of its recently released Managed Extensibility Framework (MEF) to the Microsoft Public License (Ms-PL), following complaints from at least one leading open-source representative - the Mono Project's Miguel de Icaza.

MEF was released under the Microsoft Limited Permissive License (Ms-LPL) that tied MEF to Windows while Ms-PL is recognized by the Open Source Initiative (OSI) and means code can run on platforms in addition to Windows.

Welcome to the CodePlex: open source, not as you know it

Microsoft explained the switch saying it always intended to go Ms-PL but that Ms-LPL had been "the easiest way for us to quickly get MEF out the door as we worked through some details." Community "feedback" had "accelerated' the timetable.

A trawl of CodePlex, though, revealed other Microsoft code also available under restrictive licenses not friendly to open source. ASP.NET is there under the Microsoft Source License, which limits code to qualified Microsoft customers, partners, and governments and requires you sign a non-disclosure agreement (NDA).

De Icaza had originally called for ASP.NET along with MEF and "all other platform-limiting software" to be pulled from CodePlex and urged developers to avoid MEF before the change to Ms-PL.

While the CodePlex site does not mandate the license for projects, you are told to pick your own license with CodePlex directing you to the open-source license page of Wikipedia for more information. CodePlex is home to projects under a range of licenses recognized by the OSI, such as Apache 2.0, and open-source-like custom licenses not officially recognized. ®