Mar 19, 2010

Window Server, .Net Framwork and Visual Studio

Recently my coworker install Ajax Extension 1.0 on Window Server 2008 R2. As we know, Ajax 1.0 is an add-on only for .Net 2.0 framework, and Ajax support in .Net 3.5 is native. This installation doesn't make senses, however, the installation did fix issues for sharepoint content deployment. The story is, even though .Net Framework 3 is shipped, you still need to install it, otherwise, you only get .Net 2.0



As developer, most of us get .Net framework from the development tool we use: Visual Studio,


So it is important to know what .Net version on your deployment target server.

As a SharePoint developer, we know what .Net framework SharePoint is built on:

  • SharePoint 2010 .Net 3.5
  • SharePoint 2007 .Net 2.0
  • SharePoint 2003 .Net 1.0
If you want your sharepoint 2007 to run .Net 3.5 framework ( maybe  because you develop in VS 2008 and use some features such as LinQ), you need to modify the web.config as below:

<sharepoint >
  < system.web >
     <compilation >
        < assembly >
           < add assembly="System.Core, Version=3.5.0.0, Culture=neutral, publicKeyToken = B77A5C561934E089" >

 
Running SharePoint 2007 on a Window 2008 server doesn't mean SharePoint can run .Net 3.5 features such as SilverLight, Ajax and LinQ etc. see this article for more details.