Question

I've been tasked with adding some new functionality to an old SharePoint site. I need to take advantage of some .net 3 features. I figure I just have to update the webconfig, but with the plethora of directives in here with very specific attributes the incantation escapes me.

Anyone know how to make this site run on .net >= 3?

Thanks

Was it helpful?

Solution

The .NET Framework only (currently) has 3 runtime versions: 1.0, 2.0 and 4.0. The changes between the 2.0 and 4.0 runtimes are too different for SharePoint to cope. But you can use .NET 3.5 features as they only require the 2.0 runtime.

There really are no specific changes to the web.config I can think of other than adding binding redirects for System.Web.Extensions and System.Web.Extensions.Design like below:

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
      <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
      <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
    </dependentAssembly>
  ...
  </assemblyBinding>
</runtime>

Also be aware if you want to add the Microsoft AJAX stuff, there are many, many sites out there that detail the web.config changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top